Here's my properties file:
version = ${maven.build.timestamp}
Here's how my pom.xml file looks like:
<properties>
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
...
<build>
<plugins>
...
</plugins>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
And here's how my directory structure looks like:
.
├── pom.xml
├── src
│ └── main
│ ├── java
│ │ └── ...
│ ├── resources
│ │ └── application.properties
But when I do a mvn clean install
and open up the target/classes/application.properties
file, the contents of it is still the same: version = ${maven.build.timestamp}
Why isn't the property being properly replaced?