Hi all,
I'm a new user on Maven since few weeks and i'd like to know how can i
use a property defined in a filter properties file directly in my
pom.xml ?
Here is an example :
    * the file filter.properties contains this property :
        my_prop=a_value
 
    * in my pom.xml i have :
       <project>
            <build>
                <filters>
 
<filter>[path_to_filter_dir]/filter.properties</filter>
                </filters>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.0.2</version>
                        <configuration>
                            <!-- I want to use my_prop here but i can't
(the ${my_prop} isn't replaced by the value)-->
 
<webappDirectory>${my_prop}</webappDirectory>
                            <webResources>
                                <resource>
                                    <!-- my_prop is used too in some
files under [path_to_resource_dir] -->
 
<directory>[path_to_resource_dir]</directory>
 
<target>[path_to_target_dir]</target>
                                    <filtering>true</filtering>
                                </resource>
                            </webResources>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </project>
 
Alternatively, in the POM reference there is this sentence : x: Set
within a <properties /> element or an external files, the value may be
used as ${someVar}.
How can i use an external file containg my property used in the pom.xml
in an another ways than defining this property in the user's
settings.xml file ?
 
Please help me.
                
/David BERNIER
 

Reply via email to