packagedrone icon indicating copy to clipboard operation
packagedrone copied to clipboard

Fix the parent artifact for maven uploads

Open peterjeschke opened this issue 8 years ago • 2 comments

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).

peterjeschke avatar Nov 01 '17 13:11 peterjeschke

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.

ctron avatar Nov 02 '17 08:11 ctron

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.

peterjeschke avatar Nov 03 '17 08:11 peterjeschke