Meaningless Drivel is fun!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Issue with Build script for generating multiple jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Issue with Build script for generating multiple jar files" Watch "Issue with Build script for generating multiple jar files" New topic
Author

Issue with Build script for generating multiple jar files

Varshini Priya
Ranch Hand

Joined: Feb 17, 2008
Posts: 93

Hi All,

I have a requirement where I need to build multiple jar files from each of the project that exists in my workspace.. In my case, there are 5 projects in my workspace and I would have to create 5 different jars. Also there are external dependency jars, that needs to be included in some projects to build the jar file. Below is the sample code that I have written to create two jar files.



The code works fine. I.e Im able to get the jar files generated. But when I try to execute the target "compileHib". It has a dependency task to be completed. I.E the 'clean' task. But the 'clean' task does not get executed. The jar files that are generated for HibernateService1.jar seems to contain the class files for the ValueObjects as well. This is because the dependency task 'clean' is not executed when trying to run the 'compileHib'. Please let me know if Im missing anything in this. Require help in getting this issue resolved. Thanks in Advance.
Varshini Priya
Ranch Hand

Joined: Feb 17, 2008
Posts: 93

Hi All,

I was able to resolve the issue by using antcall(calling the 'clean' target by using antcall inside 'compileHib' . For reference purpose, below is wat I tried and it worked.



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with Build script for generating multiple jar files