Il sab 18 gen 2020, 22:27 Hervé BOUTEMY <[email protected]> ha scritto:

> Le samedi 18 janvier 2020, 14:24:29 CET Enrico Olivelli a écrit :
> > 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?
> more than that, I'm sure it's the case and that MNG-5001 will fix the bug,
> then
> your build will fail
>
> >
> > I shouldn't be able to override finalName.
> yes, it's tempting to do so, but if this parameter is not documented, it's
> because it's read-only then is not expected to be overridden. And given
> you're
> not the first one I saw to override it, MNG-5001 is absolutely required
>

Just for info my IDE suggested that there is such parameter.
Maybe the IDE should not suggest to override read-only parameters

Not a big deal, if we enforce 'read only' then the build will fail


> >
> >  I could change finalName root property without changing the artifactid
> no, you can't, and this is for a reason: in the repository, every attached
> sub-artifact is expected to have the same artifactId, then have a filename
> starting with the artifactId. This is key to our convention, sorry.
>
> Looking at Zookeeper distribution [1], what about renaming
> zookeeper-assembly
> module to apache-zookeeper and publish its content to central? It would be
> the
> equivalent to our apache-maven module.
> And given you need a specific assembly for the bin distribution, this
> would not
> be an issue, isn't it?
>

I will try, thank you for this good suggestion


Enrico

>
> Regards,
>
> Hervé
>
> [1] https://www-us.apache.org/dist/zookeeper/current/
>
> >
> > 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/9053f7c431bb17ed79c2be129b6ba4b
> > > a1>
> > > > 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]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to