Given,
Apache Maven 3.0.3 and a src/main/resources/application.properties file with
project.root=${basedir}
and a pom.xml file with
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
...
When I run “mvn clean package”, I get a target/classes/application.properties file with filtering
project.root=/path/to/MyProject
However, the application.properties file that is included in the jar has not been filtered.
project.root=${basedir}
Why is the application.properties file that is included in the jar not filtered? According to the documentation, the filtered properties file(s) from target/classes ought to be included in the jar.
Self-service.
Needed to add
<Include-Resources>{maven-resources}</Include-Resources>to configuration of maven-bundle-plugin.