I have turned on filtering on my pom.xml file for web resources. I am updating build-date in a jsp using maven.
For this, I have written following lines in pom.xml.
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>MMM dd, yyyy</maven.build.timestamp.format>
<build-date>${maven.build.timestamp}</build-date>
</properties>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>default-war</id>
<phase>package</phase>
<goals>
<goal>war</goal>
</goals>
</execution>
</executions>
<configuration>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
In my jsp, I am writing date as -
<span class="note">Last updated on ${build-date}</span>
When I build it on my windows system, it works perfectly and replaces date in correct format (MMM dd, yyyy) but when I build this project using jenkins on linux system, date is not in the correct format (not MMM dd, yyyy). It shows in some other format e.g. it shows 20131022-1416.
I am unable to find the problem. Is it due to linux system, or jenkins, or different maven version.