Create Jar file from within IntelliJ.. Is it possible?
I wanted to know if there is a command available or plugin that someone has seen that will allow me to compile a project into a jar file instead of having to go to the command line and jaring up my output folder manually?
Thanks,
Grant
P.S EAP 823 Build is awesome and the GUI Builder is slick! Good work JetBrains, you never cease to amaze!
Please sign in to leave a comment.
Nope. If your build needs jarring, RMIC, code generation, obfuscation, or anything else other than simple compilation, the recommended procedure is to create an Ant build file, and use it. IDEA has very nice Ant integration for helping you create, maintain, and run your build scripts, but the decision was made (correctly, to my mind) to not put anything other that simple compilation in IDEA. Ant is too good a build system for it to make sense to to try to replicate it's functionality directly in IDEA.
(Is there a FAQ somewhere that this can be put in? I swear I've answered it four times already.)
Grant Gochnauer wrote:
use ANT :
write an ant projectfile with a target that uses the jar task
tell your idea project what is your antfile (click on the ant window
button ...) and you'll have your targets integrated with the IDE build menu.
Edo
Just to add to David's post:
You can specify Ant target to be run before/after compilation/run
-- dimiter
Thanks!
I thought that was the approach I should go down. Sounds like a good solution.....
--Grant
I was just gonna say...
It would be cool to be able to "unplug" the compile and run buttons and instead of having IDEA do that for you, specify ant tasks in your build file to run.
That way I could have a "compile" task that I would "connect" my build button to, a "clean-compile" task that would be connected to my rebuild project button and a run task that would be connected to my run button.
What do you guys think? Should I create a Feature Request Issue?
Kind regards, Stefan Freyr.
Something that I think may be along similar lines without you having to "unplug" anything...
http://www.intellij.net/tracker/idea/viewSCR?publicId=10314
No votes yet. :(