Builde IntelliJ project from ant (or command line)

I understand we can use Team City to build an IntelliJ project. Is there an ant plugin that allows me to build from command line also, without starting IntelliJ. (If not, how does Team City to the build).

3 comments
Comment actions Permalink

In the main menu (at the top of the Idea screen) choose Build->Generate Ant Build... Sounds like this is what you are looking for. It will create an Ant script (or scripts, for individual modules) for your existing project structure.

Based on the way you worded your question, I get a feeling that it also may be helpful for you to read up on using Ant, build scripts, Team City, Maven, etc. - just to get a better idea on how, when, and for what all of those things are being used. I would recommend using Maven vs. plain Ant, because creating Maven configuration files is much simpler - and less work - than writing Ant scripts from scratch. Plus, Maven promotes "comprehension and productivity by providing a clear path in the use of best practices."

0
Comment actions Permalink

Yes but the ant script does not do all the validations that Team City does. That is what we really need.

0
Comment actions Permalink

What kind of checking are you talking about? Yes, TC runs the build, and if there are no errors, commits the submitted code changes to the version control system, such as Perforce, CVS, etc. If there are build errors, it won't let you commit your code to the VCS. Well, that's why it's called an Integration Build Server, it integrates builds... It also does many other things. You could write an Ant script that would perform many different tasks too. But I am not sure what exactly you want to do. If you want to run a build and see if there are compilation, test, javadoc, deployment, etc. errors, you may do that with Ant or Maven. The same scrip can also generate all sorts of reports. If you need a fully-blown integration build process that coordinates concurrent check-ins by multiple developers to the same code repository, then you need a) a code repository, b) an integration build server, such as TeamCity, or CruiseControl, or QuickBuild, or.... there are lots available. As far as I know, TC is the only one that does the build before it checks the code in, which is cool. In other words, there are tools that do all those things, you just need to learn how to use them to create builds for your specific project. But if you are looking for a magic button somewhere in IntelliJ that just will do all those things for your custom project, then, hmmm, I am afraid you are out of luck.

0

Please sign in to leave a comment.