You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Damon Silver <da...@diio.net> on 2009/08/21 06:29:32 UTC

Problems with property interpolation

I've been trying unsuccessfully to get property interpolation to work in
non-pom.xml files using maven 2.0.9 on WinXP Pro with maven-resources-plugin
2.3.  What am I missing here?

Any help would be much appreciated.

Thanks,

Damon Silver

$ mvn -version
Maven version: 2.0.9
Java version: 1.6.0_14
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

Here are the relevant sections:

File:  foo.bar

...
texttext ${foo.bar} moretext
...

File:  pom.xml

<build>
  <resources>
    <resource>
      <filtering>true</filtering>
      <directory>path/to/dir</directory>
      <includes>
        <include>**/foo.bar</include>
      </includes>
    </resource>
  </resources>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
    </plugin>
  ...
</build>

File:  Parent pom.xml

<build>
  <defaultGoal>install</defaultGoal>
  <pluginManagement>
    <plugins>
     ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${resources-plugin.version}</version>
        <configuration>
          <encoding>${plugin.encoding.default}</encoding>
        </configuration>
      </plugin>
     ...
    </plugins>
  </pluginManagement>
  ...
</build>

...

<properties>
  <plugin.encoding.default>UTF-8</plugin.encoding.default>
  <resources-plugin.version>2.3</resources-plugin.version>
</properties>




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