Hi all,
I need to package ant files in a jar archive and then call these
ant files from the jar.
The ProjectHelperImpl class only uses an instance of File to parse
a file.
Project project = new Project();
ProjectHelperImpl helper = new ProjectHelperImpl();
=> helper.parse( project, new File( "build.xml" ) );
project.init();
project.executeTarget( "do" );
There are no possibilities to use an InputStream (from a jar for example) :
JarFile jar = new JarFile( "myjar.jar" );
ZipEntry xml = jar.getEntry( "build.xml" );
InputStream stream = jar.getInputStream( xml );
Project project = new Project();
ProjectHelperImpl helper = new ProjectHelperImpl();
=> helper.parse( project, stream );
project.init();
project.executeTarget( "do" );
1: Should I copy and rewrite ProjectHelperImpl for my personal use
? Or is there another way (because I don't like to fork OpenSource code) ?
I notice that ProjectHelper2 class have an InputStream source which is
commented !!!
2: Do you need my contribution for refactoring helpers to accept
multiple sources ?
Best regards,
Benjamin de Dardel