The Java Project build really only does two things: it compiles source .java files into .class files into your project's Build Output location, and it copies any non-.java files it finds in your Source Locations to the corresponding place in your Build Output location (Source Locations and Build Output Locations are configured in the Java Build Path section of the project properties). If you want or need to do more during the builds, you can augment it with your own Ant script.
Open the Properties dialog for your project and select the Builders section. There you can add your own builder to run after the Java Builder.
Be aware that all custom Builders will be executed for every build, which by default happens every time you save a source file (or something that the project depends on gets built). So having a Builder that takes more than a few seconds to start up and execute can be a real drag your the coding flow. If you find that you don't really want it to run on every build, I recommend opening the Ant View (I like to make it a Fast View to tuck it out of the way but still easily accessible) and adding your Ant script there. That way it is only a couple of clicks away at all times, easy to manually invoke at the times when you need it.
No comments:
Post a Comment