Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
maven-bundle-plugin-2.0.1
-
None
Description
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