1

I have two properties in my pom.xml as below that I will use to filter a txt file:

<properties>
    <date>${maven.build.timestamp}</date>
    <dateFormatted>${maven.build.timestamp}</dateFormatted>
</properties>

I want date to be in the format yyyyMMdd-HHmm and dateFormatted to be in the form yyyy-MM-dd HH:mm. Is it possible to use two different timestamp formats or is there an alternate way to do this?

1 Answer 1

0

Answered by Tunaki in this thread. Using the method he describes, you can build whatever format you need based on the individual components. It seems like this wasn't initially working for me because I was only calling mvn resources:resources. When I ran the complete build, mvn package, the correct changes appeared in the file I was filtering.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.