Uploaded image for project: 'Maven Resources Plugin'
  1. Maven Resources Plugin
  2. MRESOURCES-80

Resource File Filtering is Too Verbose

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.3
    • None
    • None
    • Windows XP, IBM Websphere 6.1

    Description

      When filtering a resource file, maven is too verbose. It's filtering a property that should not be filtered. Here's a snippet of the pom file:

      <filters>
         <filter>src/test/resources/local.properties</filter>
      </filters>
      <resources>
         <resource>
            <directory>src/test/resources</directory>
            <filtering>true</filtering>
         </resource>
      </resources>
      

      The filtering is done correctly, however in the src/test/resources folder there is a spring configuation file which has the following:

      <bean id="oracleDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
         <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
         <property name="url" value="${oracleDataSource.url}"/>
         <property name="username" value="${oracleDataSource.username}"/>
         <property name="password" value="${oracleDataSource.password}"/>
      </bean>
      

      After the filtering is done here is the result of the spring configuration:

      <bean id="oracleDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
         <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
         <property name="url" value="http://maven.apache.org/acd-core"/>
         <property name="username" value="${oracleDataSource.username}"/>
         <property name="password" value="${oracleDataSource.password}"/>
      </bean>
      

      Note the filtered property of url. Since this is a specific property of Spring and not maven, it should not be filtered.

      Thanks,
      Tim

      Attachments

        1. MRESOURCES-80.zip
          2 kB
          dennislundberg

        Activity

          People

            Unassigned Unassigned
            tim273 Tim Urberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: