On Jan 28, 2008 2:22 PM, Rex Huang <[EMAIL PROTECTED]> wrote:
> when I doing a migration project, I found that many places using filter
> and replace to replace java in ant scripts, so It's necessary to have a
> plugin to replace java code.
>
> Does anyone knows how to do it?
>
> BR//Rex
>
> On Ja
when I doing a migration project, I found that many places using filter and
replace to replace java in ant scripts, so It's necessary to have a plugin
to replace java code.
Does anyone knows how to do it?
BR//Rex
On Jan 22, 2008 5:50 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
> When Maven builds
When Maven builds a jar, it writes a file named pom.properties to:
/META-INF/maven///pom.properties
It looks like this:
#Generated by Maven
#Thu Sep 13 15:43:41 PDT 2007
version=2.0
groupId=org.apache.maven.plugins
artifactId=maven-ant-plugin
You can just read this file directly to access the ver
On Jan 22, 2008 5:38 PM, Rex Huang <[EMAIL PROTECTED]> wrote:
> for example, I had a Version.java
> public class Version {
> private static String VERSION = "${buildNumber}";
> public static String getVersion() {
> return VERSION;
> }
> }
>
> I need to set version number when co
for example, I had a Version.java
public class Version {
private static String VERSION = "${buildNumber}";
public static String getVersion() {
return VERSION;
}
}
I need to set version number when compile, so I use filter to change the
version information in java file.
Rex
On
This is not going to work. There is a difference between sources and resources.
And filtering is also not what you want.
Resources are copied to target/classes and never compiled. Filtering is used to
replace ${variable} kind of things.
This is not easy to accomplish. Maybe you could first answ