Sounds a little bit like GenJar which I used once in the past, except GenJar wouldn't pull in classes from dependent JARs. Your example syntax shown below though is too simple. You need to run the Java app for real somehow to how all the classes it uses, so you need all the elements/attributes of <java>. And even then some functionality could not have been used, and thus the corresponding classes not loaded, so you would still need to do some static analysis to pull in these extra classes (maybe making this analysis optional!?!?). And then, if you 'execute' a jar with Main-Class set, the output of -verbose:class doesn't say explicitly where the class was loaded from)... Etc... Lots of little things that makes this not as trivial as it seems, and tricky to use right/safely.
All that said, used right, it could be useful to someone. Cheers, --DD -----Original Message----- From: Magesh Umasankar [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 03, 2002 3:53 PM To: Ant Developers List Subject: Jar file from Verbose Output Hi, I propose to create a task that reads in the output of java -verbose:class MyApp (stored in a file) and create a jar file that contains all the classes that were loaded to run MyApp. The use case is described here (though the implementation is not quite elegant enough) http://www.michaelmoser.org/jarjar/jarjar.htm Weblogic ships with a verboseToZip utility too, primarily to create a jar that contains just those weblogic files that are needed for a remote EJB client to run without having to have the huge weblogic.jar copied over to the client machine as well. The task's syntax would be: <verbosetojar srcFile="verbose.txt" destFile="mini.jar" <!-- optional --> manifest="mymanifest.mf"> <!-- optional --> <patternset> <exclude name="java**"/> </patternset> </verbosetojar> Would such a task be useful? Cheers, Magesh ************************************************** * Opportunist: A person who starts taking bath * * if he accidentally falls into a river. * ************************************************** -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
