Resource filtering does not use Maven properties specified on the mvn command 
line via -D command line switches
---------------------------------------------------------------------------------------------------------------

                 Key: FELIX-2449
                 URL: https://issues.apache.org/jira/browse/FELIX-2449
             Project: Felix
          Issue Type: Bug
          Components: Maven Bundle Plugin
    Affects Versions: maven-bundle-plugin-2.0.1
         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
Java version: 1.6.0_20
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"
            Reporter: Keith Wedinger


Inside my pom, I have the following properties specified:
        <derby.host>localhost</derby.host>
        <derby.port>1527</derby.port>

I also turn on resource filtering using the following in my pom:
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

In the src/main/resources directory, there is file named jdbc.properties which 
contains the following:
jdbc.driverClassName=org.apache.derby.jdbc.ClientDriver
jdbc.url=jdbc:derby://${derby.host}:${derby.port}/test
jdbc.username=mri
jdbc.password=test

When I run mvn install on my project, jdbc.properties is properly included into 
the final bundle jar as follows:
jdbc.driverClassName=org.apache.derby.jdbc.ClientDriver
jdbc.url=jdbc:derby://localhost:1527/test
jdbc.username=mri
jdbc.password=test

When I run mvn install -Dderby.host=jkwdev -Dderby.port=1600, the filtering of 
jdbc.properties before packaging into the bundle jar does not honor the 
properties I specifed on the command line.  target/classes contains this:

jdbc.driverClassName=org.apache.derby.jdbc.ClientDriver
jdbc.url=jdbc:derby://jkwdev:1600/test
jdbc.username=mri
jdbc.password=test

But, the bundle jar contains this:
jdbc.driverClassName=org.apache.derby.jdbc.ClientDriver
jdbc.url=jdbc:derby://localhost:1527/test
jdbc.username=mri
jdbc.password=test


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to