Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Accessing ${maven.build.timestamp} while running in eclipse

Constant? It's the time the build happened. Please give me an example of how this can work.

Thanks.

On 04/17/2013 01:00 PM, Igor Fedorenko wrote:
The easiest is to introduce pom profile that defines the property to a
well-known constant when running inside m2e.

--
Regards,
Igor

On 2013-04-17 1:50 PM, Steve Cohen wrote:
I am building a standalone java project with maven and it needs to
display the build timestamp in the application.

Based on
http://stackoverflow.com/questions/13228472/how-to-acces-maven-build-timestamp-for-resource-filtering



which refers to

http://java.dzone.com/tips/stamping-version-number-and

which in turn refers to a bug in maven

I define the following property in my pom

<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd
HH:mm</maven.build.timestamp.format>

and then in a property resource, define

build.date=${timestamp}.

This works fine when I build using Maven explicitly, but does not work
when running the application from within eclipse.

Is there some way I can make m2e do this resource filtering when running
code from eclipse?

Thanks
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users





Back to the top