Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-171

External Web Resources are not properly filtered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1-alpha-1
    • 2.1-beta-1
    • None
    • None
    • Windows XP SP2

    Description

      I have configured an external web resource location in the project's web module
      ..
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <configuration>
      <webResources>
      <resource>
      <directory>${basedir}/src/main/webresources</directory>
      <filtering>true</filtering>
      </resource>
      </webResources>
      </configuration>
      </plugin>

      I need to apply a filter to jetty-env.xml
      ...
      <Arg>
      <New class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
      <Set name="URL">${jdbc.url}</Set>
      <Set name="user">${jdbc.user}</Set>
      <Set name="password">${jdbc.password}</Set>
      </New>
      </Arg>
      ...

      Parent POM contains properties like these:
      ...
      <properties>
      <jdbc.url>jdbc:oracle:thin:@localhost:1521:orcl</jdbc.url>
      <website.url>scp://www.yourcompany.com/www/docs/project</website.url>
      ...

      The result aftre filtering is following:
      ..
      <Arg>
      <New class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
      <Set name="URL">http://maven.apache.org</Set>
      ...

      I have enclosed example project.

      Attachments

        1. example-project.zip
          10 kB
          Valeriy Molyakov

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              molyakov Valeriy Molyakov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: