You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stuart McCulloch (JIRA)" <ji...@apache.org> on 2011/06/27 02:35:47 UTC

[jira] [Assigned] (FELIX-2449) Resource filtering does not use Maven properties specified on the mvn command line via -D command line switches

     [ https://issues.apache.org/jira/browse/FELIX-2449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch reassigned FELIX-2449:
---------------------------------------

    Assignee: Stuart McCulloch

> 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
>            Assignee: Stuart McCulloch
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira