R
RyanC
I want to have Ant read version information from my manifest files and
append the version to the end of the jar files it creates. I know I
could easily just define the versions at the top of the build script
but they are already maintained in the manifests, so its easier to
leave them there.
I understand how to define my own Ant Task and pass information to it,
but I don't see how I can receive data back from the Ant task.
Something like (pseudocode):
import org.apache.tools.ant.Task
public class GetVersionInfo extends Task {
String filename;
String version;
public void execute() {
version = readVersionFromFile(filename);
}
public void setManifestFileName(String filename) {
this.filename = filename;
}
public String getVersion() .....
}
I don't see how this would/could work, or what the task would look
like. How is it done? Thanks
RyanC
append the version to the end of the jar files it creates. I know I
could easily just define the versions at the top of the build script
but they are already maintained in the manifests, so its easier to
leave them there.
I understand how to define my own Ant Task and pass information to it,
but I don't see how I can receive data back from the Ant task.
Something like (pseudocode):
import org.apache.tools.ant.Task
public class GetVersionInfo extends Task {
String filename;
String version;
public void execute() {
version = readVersionFromFile(filename);
}
public void setManifestFileName(String filename) {
this.filename = filename;
}
public String getVersion() .....
}
I don't see how this would/could work, or what the task would look
like. How is it done? Thanks
RyanC