Currently the cargo plugin requires that the file extension of the deployable file matches the dependency type. However, this is not always the case. For example, the jboss packaging maven plugin defines a project type called jboss-sar and sets the file extension to ".sar". When trying to deploy this artifact from the project where it is defined, I get the following error:
[WARNING] The defined deployable has the same groupId and artifactId as your project's main artifact but the type is different. You've defined a [sar] type whereas the project's packaging is [jboss-sar]. This is possibly an error and as a consequence the plugin will try to find this deployable in the project's dependencies.
The cargo plugin should be able to handle this difference.
I attached a basic project that reproduces the issue. Just run "mvn cargo:deploy" to see the problem.