Hervé I don't know why but my change works as expected. I really can't change the artifact id of the main parent pom because it will be a nuisance for consumers.
So you think that my patch is working only because of a bug in Maven core? I shouldn't be able to override finalName. I could change finalName root property without changing the artifactid Thanks for your help Enrico Il sab 18 gen 2020, 12:46 Hervé BOUTEMY <[email protected]> ha scritto: > WARNING: finalName is read-only > There is a bug in Maven 3 that does not check, but this will be fixed in > Maven > 3.7.0 (see MNG-5001 [1]), then you'll get soon the expected failure > > Either you should rename parent artifact to zookeeper, then you'll have to > rename the current zookeeper to zookeeper-server for example. > Either you're stuck with your specific assembly. > > In Maven itself, we have 2 cases: > - Maven core, that has a specific assembly in apache-maven module where > source- > release is published [2] with a specific src+bin and zip+tar.gz output > - every other multi-module project (surefire, jxr, doxia, archetype, ...) > use > the standard Apache source-release assembly descriptor, with root reactor > POM > artifactId being the name of the project (without any "parent") > > Perhaps renaming your parent artifact to "apache-zookeeper" may be a > solution, > to avoid renaming the current zookeeper artifact, and getting a apache- > zookeeper-*.tar.gz output > > HTH > > Hervé > > [1] https://issues.apache.org/jira/browse/MNG-5001 > > [2] > https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/ > > Le vendredi 17 janvier 2020, 17:37:52 CET Enrico Olivelli a écrit : > > Self answer, I have cloned the execution but I have reused the common > > assembly descriptor. It is a trade off but it works > > > > > https://github.com/apache/zookeeper/commit/9053f7c431bb17ed79c2be129b6ba4ba1 > > 8d15ab1 > > > > Enrico > > > > Il giorno ven 17 gen 2020 alle ore 08:50 Enrico Olivelli < > > > > [email protected]> ha scritto: > > > Hi, > > > In Apache ZooKeeper community we want to switch to using the "source > > > package" generated by the apache parent pom with the execution of > > > "source-release-assembly". > > > https://github.com/apache/maven-apache-parent/blob/master/pom.xml#L381 > > > > > > What is the *best* way to achieve these goals (without redefining the > full > > > execution): > > > 1) create a tar.gz file ? > > > 2) use a custom file name > > > > > > > > > 1) We have historically always distributed the sources in tar.gz > format, > > > the ZIP file works well but if we keep the usual format we will give > less > > > troubles to downstream consumers > > > > > > 2) Such execution is bound to the root project, that has "parent" as > > > artifact id, so the ZIP file name is like parent-3.6.0-sources.zip > > > I would like it to be apache-zookeeper-3.6.0.tar.gz > > > > > > Any comment/help is appreciated. > > > > > > My personal solution would be to create a separate execution with a > copy > > > and paste of the Apache Parent POM, but if will it is not ideal > > > > > > Cheers > > > Enrico > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
