Use <dependencyManagement> tag for dependency versions in your parent pom.

See http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

-allan

Sasvata Chatterjee wrote:

Hi,

I have a multipoject build.  In the submodules, in the parent section,
I am using a variable like this:

<parent>
   <groupId>mygroup</groupId>
   <artifactId>myartifact</myartifact>
   <version>${mygroup.myartifact.version}</version>
</parent>

In the parent pom, I define:

<project>
   ....
   <properties>
       <mygroup.myartifact.version>2.2-SNAPSHOT</mygroup.myartifact.version>
   </properties>
   ....
</project>

When I kick off my multiproject build, everything works fine.  But, if
I go into a module dir and build it individually like this it fails (I
have also specified the property in settings.xml as a test), where I
have dependencies into other modules built like this:

mvn -Dmygroup.myartifact.version=2.2-SNAPSHOT install

The reason is that when the POMs installed do not have the version
element interpolated, instead have the ${...} syntax verbatim.

Is this a bug?

Thanks,
Shash

---------------------------------------------------------------------
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