Hi Jörg, Thanks for the answer.
Can you point me to a place where this behaviour is documented? It seems to hold for most, but not all URLs, i.e. scm, project URL and documentation site URL (except for the webAccessUrl of the maven-project-info-reports-plugin which remains untouched!) seem to be affected, repository URLs seem to be not affected. ... and it's not always the current artifactId either - frequently it's the parent-POMs artifactId followed by the current artifactId, but again this does not seem to be the case always. Thanks again, Wolf On Thu, 2011-04-07 at 14:35 +0200, Jörg Schaible wrote: > 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: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
