You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Barrie Treloar <ba...@gmail.com> on 2015/08/26 23:06:09 UTC

Re: [jira] [Moved] (MNG-5878) Subversion SCM module URLs incorrectly build when module name != artifactId

On 27 August 2015 at 05:02, Hervé Boutemy (JIRA) <ji...@apache.org> wrote:

>
> > Say you have this project structure:
> > {noformat}
> > /
> >   |-- module1
> >   |-- module2
> > {noformat}
> > and artifactIds are named:
> > {noformat}
> > my-parent
> >   |-- my-module1
> >   |-- my-module2
> > {noformat}
> > Prefix {{my-}} is omitted for brevity in module names. For instance,
> Jersey does that.
> > When the SCM report is built, the artifactId is always used for path
> composition which leads to incorrect URLs. You can of course set the
> parameter {{checkoutDirectoryName}} but this would be extremely tedious for
> all modules down the tree.
> > The code should obtain the module name and use it for URL composition.


Is this a feature or a bug of Maven?

I've always named my modules == artifactId because of this problem in lots
of of other places.

Is module name really allowed to be different to the artifactId?

Re: [jira] [Moved] (MNG-5878) Subversion SCM module URLs incorrectly build when module name != artifactId

Posted by Hervé BOUTEMY <he...@free.fr>.
Le jeudi 27 août 2015 06:36:09 Barrie Treloar a écrit :
> On 27 August 2015 at 05:02, Hervé Boutemy (JIRA) <ji...@apache.org> wrote:
> > > Say you have this project structure:
> > > {noformat}
> > > /
> > > 
> > >   |-- module1
> > >   |-- module2
> > > 
> > > {noformat}
> > > and artifactIds are named:
> > > {noformat}
> > > my-parent
> > > 
> > >   |-- my-module1
> > >   |-- my-module2
> > > 
> > > {noformat}
> > > Prefix {{my-}} is omitted for brevity in module names. For instance,
> > 
> > Jersey does that.
> > 
> > > When the SCM report is built, the artifactId is always used for path
> > 
> > composition which leads to incorrect URLs. You can of course set the
> > parameter {{checkoutDirectoryName}} but this would be extremely tedious
> > for
> > all modules down the tree.
> > 
> > > The code should obtain the module name and use it for URL composition.
> 
> Is this a feature or a bug of Maven?
> 
> I've always named my modules == artifactId because of this problem in lots
> of of other places.
I added documentation previously [1]: "lots of other places" = 5 fields = 
project.url, project.scm.connection, project.scm.developerConnection, 
project.scm.url and project.distributionManagement.site.url

> 
> Is module name really allowed to be different to the artifactId?
if module name is different of the artifact id, it's harder to know it when the 
pom is in repository, since the repository is  really strict about its 
structure

the idea I implemented in MNG-5878 is a way to configure the module name: with 
MNG-5878, AFAIK, it is safe to choose a module name that is not like 
artifactId => you have to configure it in "project.directory" property

Regards,

Hervé



[1] http://maven.apache.org/ref/3-LATEST/maven-model-builder/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org