maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jackman" <>
Subject RE: [m2 & m1]Inject POM values into application
Date Wed, 19 Oct 2005 16:36:58 GMT
In m2, you just turn filtering on for resources in your pom.  Assuming
you've put the files being filtered in the default place
(src/main/resources), you may not have anything about resources in your
pom already, so you'll need to add everything about this resource
With that, any resource file that contains ${pom.version} will replace
that text with the value from the version element of the pom.  The same
is true for other values in the pom.  I don't think values from
settings.xml are available, however.  Someone else can correct me if I'm


-----Original Message-----
From: news [] On Behalf Of Geoffrey
Sent: Wednesday, October 19, 2005 9:05 AM
Subject: [m2 & m1]Inject POM values into application

What is the best practice for injecting POM values into the application?
For example, I want my application to get it's version (in pom.xml),
releaseDate and productionMode (in settings.xml) variables feeded in the
build process.

In m1 I made a general resources template and I replaced tokens in it
and put a copy of that file in the target/classes after the resources
where copied. I did this in maven.xml of course.
Surely there must be a better way in maven 2?

Thanks for any and all help.

With kind regards,
Geoffrey De Smet

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message