Affects Version/s: 4.1.1, 4.1.2
Fix Version/s: None
Number of attachments :
When having a classifier with dots (classifier.with.dots) and an extension with or without dots (e.g. tar.gz), the calculation of Gav changes classifier and type/extension to something clearly not intended:
|Attached artifact definition||M2GavCalculator result|
The problem seems to be located in lines 136ff, 175ff and 216ff (do you have a code duplication issue as well? ):
This code assumes that the classifier ends at the first dot in the "tail" (which is everything after the version number).
Since Maven allows dots in classifiers as well as in extensions, the parsing has to be made more intelligent. So, it is not enough to just turn the parsing around and use the part after the last dot as extension and before it as classifier (that's why I used the 'tar.gz' extension in my example above).
I do not have a solution for this except checking for well-known extensions (tar.gz, xml, jar, zip, a.s.o.) and build the classifier/extension parsing around it.