William wang wrote:
hi:
in ant build.xml we can define a variable refer in furture like this:
<property name="JBoss.home" value="C:/jboss-3.2.3"/>
refer like this:
<property name="JBoss.3.x+.Client.home" value="${JBoss.home}/client"/>
but in maven 2.x pom.xml ,how to define a similar pom variable refer in
furture?
thanks.
You could add something like that to your pom.xml
<properties>
<jboss.home>/path/to/jboss</jboss.home>
<jboss.client.home>${jboss.home}/client</jboss.client.home>
</properties>
Absolute pathnames in the pom are probably not the best idea. You can pass the initial value from
command line:
mvn -Djboss.home=/my/path/to/jboss
or from environment variable, just add prefix "env.":
<jboss.client.home>${env.JBOSS_HOME}/client</jboss.client.home>
D.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]