Reputation: 33
I want to make the file build automatically using Eclipse. I need this file creates the JAR of the application. And if it were possible, I would like to insert the command to pass some test of JUnit. How can I do all of this automatically?
Upvotes: 2
Views: 17206
Reputation: 7807
Generally to create jar files in Eclipse I do this things:
In the ant files I put for example something similar:
<project name="My Project" default="createjar">
<property name="projectHome" location="." />
<target name="createjar">
<jar destfile="${projectHome}/file.jar" basedir="${projectHome}/bin" />
</target>
</project>
You can add other instructions to the ant file and process whatever you need after the jar creation. But my suggestion is to not launch JUnit test on very file change, can be very ugly.
Upvotes: 13