Hello all,
I'm trying to read an ant script through java and find where all its .java files and libraries are located. I've gone through the Apache ant API but couldn't find an appropriate method. So far all I could come up was the below code, it gives the properties and all but the problem is if the .java classes are not in a src folder I won't be able to sort the results. I would appreciate any help. Thanx in advance.

public class PropertyReader {
    public static void main(String[] args) throws Exception {

        File buildFile = new File("build1.xml");
        final Project project = new Project();
        ProjectHelper.configureProject(project, buildFile);
        Hashtable<String, Integer> prop = project.getProperties();
        for (Entry<String, Integer> entry : prop.entrySet()) {
            String key = entry.getKey();
            Object value = entry.getValue();
            System.out.println(key+" --- "+value);


5 Years
Discussion Span
Last Post by peter_budo
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.