Open peterjeschke opened 6 years ago
Honestly, I can't remember 🙄 ... That would have been a nice location for a few lines of documentation 😉
I do remember that there were numerous scenarios which causes issues, as Maven uploading doesn't allow at all to track uploads and artifacts belonging together during an upload.
I do remember there where a bunch of issues with Maven projects having no JAR file, and signatures/hashes being uploaded. And IIRC then there where a few use cases which where not supported (like you mentioned adding the unzipper, extractor and uploaded at the same time).
However I am not sure if simply switching the line will make the overall situation better. I understand it makes you problem go away, but before merging I would like to ensure that it doesn't create problems for others.
I am not sure what the correct approach to that is, but I am happy to help you out.
Oh yes, builds without JAR files wouldn't properly link artifacts anymore. Didn't consider this use-case.
Maybe refactoring the behavior into aspects would help, so that users could switch between different aspects to choose how the files should be organized? I'm not sure whether this is even possible with the aspects-interface, but there could be two aspects, one for assigning a POM file as parent and one for assigning a JAR file as parent.
I asked a question about this in the chat, but I decided to just create a PR instead.
This commit changes the behavior of maven uploads. Instead of choosing a pom-file as a parent, the uploader looks for a JAR file now. This may be necessary if the POM is auto-generated by the POM-extractor aspect (virtual files can't act as a parent, apparently).