Hi Wolf, Wolf Geldmacher wrote:
> Hello List. > > I'm aiming at introducing maven (mvn 3.0.3 to be precise) in our > company. > > In preparation for the task I've set up a company wide POM (c-p-p) and a > project specific POM (c-p-p-p) plus a sample project for the developers > here to use as a template (sample-project) - all included below. > > The SCM used is Subversion and the structure of the repositories is > historically grown, which requires me to define a <scm-loc> property > which needs to be reset for every project. > > The problem I'm encountering: > > After "mvn install" for the company and project wide parent POMs I run > "mvn help:effective-pom" from within the sample-project with unexpected > results: > > ... > <groupId>com.company</groupId> > <artifactId>sample-project</artifactId> > <version>2012.0.0-SNAPSHOT</version> > <name>A sample project</name> > <description>A very simple example project.</description> > <url>https://doc.company.com/build/trunk/maven/sample-project</url> > <scm> > <connection>scm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project</connection> > > <developerConnection>scm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project</developerConnection> > <url>scm:svn:https://svn.company.com/repos/build/trunk/maven/sample- project/c-p-p-p/sample-project</url> > </scm> ... > > -> The project URL that I explicitly (re-)defined in the > sample-project's POM is expanded as I would expect. > -> All URLs in the SCM section of the effective POM have a trailing > "c-p-p-p/sample-project" (as does the project URL if it is inherited > and not explicitly set it in the sample-project's POM). > > I understand that maven does "inheritance before interpolation", so as > the <scm-loc> property is set in the sample-project's POM I would expect > all expansions of the property to have the value defined in the POM. > > What am I missing? > Where does the additional suffixing come from? The artifactId is automatically appended as suffix when URLs are inherited. > Is this a bug? No. > Is there a way to achieve my goal without having to make it explicit in > every single derived POM? No. > As side remarks: The effective POM fpr c-p-p-p looks ok - no unexpected > tailing traces of the parent POM there; and mvn 2.2.1 behaves exactly > the same way. BTW: The behavior *is* annoying. It's not only that it prevents interpolation, it also silently implies that the artifactId matches the folder structure in the SCM. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org