maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Redmond" <eric.redm...@gmail.com>
Subject Re: Parent POM, properties and scm problem
Date Tue, 31 Jul 2007 13:53:22 GMT
Maven does this so that child module's scm can be defined once in the
parent.

<scm>
  <connection>scm:svn:https://url/project/trunk
</scm>

<modules>
  <module>Child

Then the Child module's scm url is automatically set as:

<scm>
  <connection>scm:svn:https://url/project/trunk/Child
</scm>

Which is the convention for a multi-module project.

If your "Child" project has to be seperate, with it's own trunk, etc. I
would suggest (if svn) using svn:externals to access the child under the
parent project. Since it ownly appends the name on a multi-module project,
I'm trying to figure out how you locally check out your project... perhaps
create a "trunks"-style setup in your version control would be best?

Eric

On 7/30/07, Oscar Picasso <oscarpicasso@gmail.com> wrote:
>
> I have also noticed the same behavior with the project url, the sit url
> and
> the scm url even if in the effective the corresponding properties are
> correct (without the artifactId appended).
>
> On 7/30/07, Oscar Picasso <oscarpicasso@gmail.com> wrote:
> >
> > Hi,
> >
> > In the parent POM I have the following:
> > [...]
> >   <properties>
> >     <scmConnection>
> http://localhost/repos/repo/${groupId}/${artifactId}/trunk
> > <http://localhost/repos/repo/$%7BgroupId%7D/$%7BartifactId%7D/trunk>
> > </scmConnection>
> >   </properties>
> >
> >
> >   <scm>
> >     <connection>${scmConnection}</connection>
> >     <developerConnection>${scmConnection}</developerConnection>
> >   </scm>
> > [...]
> >
> > The child POM has nothing expect mandatory elements and the reference to
> > the parent POM. Both the child and the parent are snapshots. The parent
> POM
> > has been deployed to the remote repository.
> >
> > When I run mvn help:effective-pom on the child project, I get:
> > [...]
> >   <scm>
> >     <connection>
> http://localhost/repos/repo/com.opicasso/Child/trunk/Child
> > </connection>
> >     <developerConnection>
> > http://localhost/repos/repo/com.opicasso/Child/trunk/Child
> > </developerConnection>
> >   </scm>
> > [..]
> >
> > I would have expected:
> > [...]
> >   <scm>
> >     <connection>http://localhost/repos/repo/com.opicasso/Child/trunk
> > </connection>
> >     <developerConnection>
> > http://localhost/repos/repo/com.opicasso/Child/trunk
> </developerConnection>
> >   </scm>
> > [..]
> >
> > Why does maven happen the child artifactId to the connections? Does
> maven
> > merge the parent scm connections with the children ones ? But in the
> current
> > case the child has no scm connections defined in its pom.
> >
> > How to get rid of this extra artifactId?
> >
> > Thanks
> >
> > Oscar
> >
> >
> >
>



-- 
Eric Redmond
http://blog.propellors.net

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message