Scenario
Let's say I have an Eclipse workspace with Project A, Project B, and Project C in it. Is there any way that I can configure eclipse to create a folder (anywhere) under my workspace called build
that gets Project A.jar
, Project B.jar
, and Project C.jar
when a build is executed? (Note that it doesn't have to automatically build, this can be something I click on to launch.)
I'm open to a number of solutions, including Ant, as long as it meets the requirements below.
Requirements
Project A.jar
must contain all of the classes and resource files that would typically appear in/Project A/bin/
when Eclipse does a build.When I add Project D to my workspace, I don't want to have to do anything special to Project D to make it play nicely with the build setup. That is, simply adding Project D to the workspace in eclipse will cause
Project D.jar
to appear in thebuild
folder the next time a build is run. All of these requirements should also be satisfied for Project D with only standard Eclipse configuration for dependencies, etc.The classpath and other required build settings that are set in the eclipse project should carry through to the JAR files. That is, if
Project A.jar
requiresProject B.jar
to be able to run, thenProject B.jar
should be included in the classpath ofProject A.jar
.As a further extension of
3
, 3rd party libraries that are not projects in the eclipse workspace must also be copied and referenced. That is, ifProject A.jar
requiresspring.jar
,spring.jar
must also be copied tobuild
and a reference must be added to theProject A.jar
classpath. It would be really nice if these 3rd party libraries could go in a/build/lib
folder.It cannot rely on any 3rd party tools or plugins that do not come with Eclipse Helios.
Related
Build project into a JAR automatically in Eclipse seems to be related and it may fit requirement 1
and 5
, but I do not believe it fits any of the other 3.