Attempting to deploy the WebSphere MQ JMS resource adapter (which has Maven coordinates com.ibm.mq:wmq.jmsra:188.8.131.52:rar) using the following swarm yaml config:
results in the following exception:
As you can see, jmsra is being interpreted as the artifact type, and the actual type (rar) has been dropped.
The relevant code in ArtifactDeployer.java shows that a split is done on the second part of the colon-separated deployment spec, and the assumption is made that it contains a single dot. That assumption is incorrect.
I would propose to change it to the following:
I'm working on a unit test to reproduce the issue and I'll submit a patch with the test and the fix shortly.
Also, can we not just use the official Maven GAV annotation, e.g.: com.foo:bar:war:classifier?
This would remove any ambiguity created in the current notation (the artifactId.type makes the artifact type look like a file extension, even though the two aren't necessarily the same) and allow the user to specify a classifier, something that's currently missing.
To keep backwards compatibility, the artifact specification can be interpreted as the old notation if it contains a single colon and as the new notation otherwise.
I can submit a patch with unit tests and code for this if it is seen as a valuable addition.