Hi Tamás, thanks for following up!
So let me try to provide some context: 1) the javadoc archive contains only a subset of the classes from the project 2) the jar as the main file of the project is built in a normal build and then in a later build stage outside of the maven build packaged into a container image (in a GitHub action) 3) we don't build snapshots, each build produces artifacts with release version if you will, but we don't deploy them – each container image contains the jars with 'release' version – the only difference between a 'snapshot' and 'release' image is the tag version, the files inside the image are the same (have the same (release) version 4) we're deploying the javadoc archive to GitHub Packages to share it with others 5) the POM of the javadoc archive in GitHub Packages has the wrong packaging (jar default packaging), but this was acceptable for us (we didn't care) It seems for my use case I should use deploy:deploy-file instead. Tamás, could you point me to an example how to use it as part of a build with the other steps as you suggested below? I guess I was considering it not a fit because I assumed I had to provide all the parameters again vs. with deploy:deploy (pre 3.0.0) all parameters were set for me. Initially I tried to find a solution with a short command to produce and deploy the javadoc archive manually. However, the next step is anyway to automate this process and then it's less of a problem to split creation of the javadoc archive and deploying it into two steps – and use deploy:deploy-file with all needed parameters ('file', 'url', etc.) – which I intended to avoid, I thought I'd rather configure it in the POM (like distributionManagement) instead of command arguments. Thanks again, Tamás, for guiding me here! It helped me understand, what we're currently doing needs to be changed, given the changes to maven-install-plugin and maven-deploy-plugin. I'm still inclined to think our original use case is valid (deploy one part of a project even if it's in incomplete state), but can understand the reasons why this option has been cut off and the alternative might be more than just a workaround. Thanks Bernhard PS: my initial question showed up twice accidentally – as a novice I posted first without subscribing. Subscribed, posted again and you all thankfully responded already. And then my initial post finally also made it to the list… Bernhard Schuhmann Senior Software Engineer Jedox Bismarckallee 7a 79098Freiburg im Breisgau Germany Jedox GmbH Chief Executive Officer (Geschäftsführer): Florian Winterstein Place of Business: Freiburg i. Br. | Registry Court: Amtsgericht Freiburg | HRB 723467 [TM.V06112018] Von: Tamás Cservenák <ta...@cservenak.net> Datum: Donnerstag, 23. Februar 2023 um 12:23 An: Maven Users List <users@maven.apache.org> Betreff: Re: [m-deploy-plugin] Deploy javadoc archive only Howdy, so, personally I am in "limbo" about this, and let me explain why. First let me state that I lack some context here: - why is Bernhard doing this? (is he editing and then "testing" the edited Javadoc? I mean, why is roundtrip needed [the deploy]) - where is he deploying it (some shared local repository? or his personal one-man-show MrM?) - is the project he works on a RELEASE or a SNAPSHOT? - etc And about my limbo opinion: I do agree with the part of the original discussion, about the "general repo hygiene" bit, that with pre-3.9.0 Maven this project would deploy "incomplete" (the POM would state packaging is JAR, but there is no JAR present). A lot of further conclusions depend on the context above (where is deployed, etc). I have a feeling like Bernhard should do something like this instead: $ mvn javadoc:javadoc assembly:single deploy:deploy-file As "deploy" means "deploy the project", that is obviously in "incomplete state". One more point for this is Bernhard saying "I am building a JavaDoc archive for a jar", so he also states he is NOT building the whole project intentionally, only one archive from it. OTOH, I disagree with implementation (or the behaviour change) of both issues (see below), as for me, this really looks like some sort of "validation" (or "sanity check"), and install/deploy plugins should NOT be smart at all, in fact, they should be as "dumb" as possible. If there is some validation needed, these plugins are for sure not the place to have them. Issues: https://issues.apache.org/jira/browse/MDEPLOY-205 https://issues.apache.org/jira/browse/MINSTALL-118 T On Wed, Feb 22, 2023 at 8:20 PM Greg Chabala <greg.chab...@gmail.com> wrote: > Am I correct in my reading, that they found a similar use case for why > installing/deploying without a main artifact was allowed, and thus why a > test was guarding that behavior, but then decided it wasn't 'the Maven Way' > enough and ripped it out? > > That makes it seem like a dummy jar is the only solution to Bernhard's > problem (or hanging back on an older version of the deploy plugin). > > On Wed, Feb 22, 2023 at 12:43 PM Tamás Cservenák <ta...@cservenak.net> > wrote: > > > Found this thread discussing this very change, may be helpful: > > https://markmail.org/message/cmu5rh6i4cbmkh6e > > > > HTH > > Tamas > > > > On Wed, Feb 22, 2023 at 7:27 PM Tamás Cservenák <ta...@cservenak.net> > > wrote: > > > > > Howdy, > > > > > > Not directly helpful, but this change was introduced in early 3.0.0-M1: > > > https://issues.apache.org/jira/browse/MDEPLOY-205 > > > > > > By reading the issue, I am really unsure about the exact intent. > > > But, there is already a comment on issue (someone else having similar > > > problem) > > > > > > Let's see if anyone else chimes in. > > > > > > HTH > > > Tamas > > > > > > On Wed, Feb 22, 2023 at 7:20 PM Bernhard Schuhmann < > > > bernhard.schuhm...@jedox.com> wrote: > > > > > >> Hello! > > >> > > >> > > >> > > >> I'm building a JavaDoc archive for a jar file with > > >> > > >> > > >> > > >> mvn javadoc:javadoc assembly:single deploy > > >> > > >> > > >> > > >> and maven-jar-plugin disabled so that only the JavaDoc archive gets > > >> deployed. This has been working until updating to 3.9.0 > > >> (maven-deploy-plugin 3.x) -because I only attach the JavaDoc archive I > > now > > >> get > > >> > > >> > > >> > > >> The packaging plugin for this project did not assign a main file to > > the > > >> project but it has attachments. Change packaging to 'pom'. > > >> > > >> > > >> > > >> However, when I change packaging to pom as suggested, > > >> maven-javadoc-plugin no longer generates the Javadoc files that I want > > to > > >> assemble into the zip archive. > > >> > > >> > > >> > > >> Any help how to still do that in a single command? How can I deploy an > > >> attachment without a main file assigned? > > >> > > >> > > >> > > >> Bernhard > > >> > > >> > > >> > > >>