You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Joël Wijngaarde [Us Media]" <jo...@usmedia.nl> on 2003/07/21 17:46:20 UTC

Howto access properties set by war plugin in maven.xml

Hi All,

Trying to create different goals to create different war files I tried
the following code to create a war containing different log4j config
files depending on the called goal.

I defined the 'war:staging' goal:

<goal name="war:staging" prereqs="war:webapp" 
      description="Create a WAR file for the staging server">

  <ant:echo>Building WAR ${pom.artifactId} for staging server</ant:echo>
  <ant:echo>Using log4j configuration: ${maven.war.webapp.dir}/WEB-INF/log4j-staging.xml</ant:echo>

  <ant:copy file="${maven.war.webapp.dir}/WEB-INF/log4j-staging.xml"
            tofile="${maven.war.webapp.dir}/WEB-INF/log4j.xml"/>

  <attainGoal name="war:war" />

</goal>

But I do not seem to be able to access the '${maven.war.webapp.dir}'
property from my script. It is empty when I echo the property. So, I was
wondering how I could access the properties set by the war plugin. And
how I can use them in additional defined goals


Sincerely,

Joel Wijngaarde


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org