We want to compile our version, build, time of compilation, location of
compilation, and other information into a java class that our web app
references (this way we can check the info online while it's running, and
know that it can't be inadvertantly changed in properties, xml or manifest
file)
How do I do that before building it?
For example, our java file has pretty simple variables where the filter
needs to be applied:
from the myproject/src/main/java/com/example/info/Info.java file:
private static final String APPLICATION_VERSION = "${APP_VERSION}"; //
Substituted by the build
private static final String BUILD_NUMBER = "${BUILD_NUMBER}"; //
Substituted by the build
private static final String BUILD_TIMESTAMP = "${BUILD_TIMESTAMP}"; //
Substituted by the build
How do I apply a filter so that when I build "myproject", the values are
updated prior to compilation, yet the original java file isn't written over
so that I can repeat it over and over again?
Thanks!
~ Andrew
--
View this message in context:
http://n2.nabble.com/How-do-I-repeatably-filter-a-java-file-before-it-is-compiled--tp1578216p1578216.html
Sent from the Apache Buildr - User mailing list archive at Nabble.com.