0

SHORT VERSION:

In the context of a JEE6 application: What's the best way to setup an IDE-independent, master build process, in a dedicated build server (for CI / Integration test), while still using an IDE at the developer workstations? Which Java IDE is more suitable to such an approach?

LONG VERSION:

We are building a JSF2/PrimeFaces/EJB3.1 JEE6 application to be deployed on a JBoss application server. We need the EAR, WAR and JAR artefacts to be generated in a dedicated machine using an Ant script and be subject to integration testing in a CI fashion (perhaps using Jenkins).

It is also a requirement that the team will use a Java IDE (one kind only, no extra worries there). As a result, developers will produce their local artefacts for the own testing and development using their own, locally-installed IDE. However, I want the main build script on the build server to be independent of any IDE. If the IDE used by the team cannot accept and integrate closely with an externally provided Ant script this can lead to a situation where the main Ant build script will be different and will have to be maintained and evolved independently. So ideally, I would like the same hand-crafted build script to be used both by the developers' IDEs and the build server. In such a setting, if a developer sees the need to modify the Ant script, the modification reaches through git / svn the CI server and is used for subsequent builds. I am stressing "hand-crafted" since, e.g. in NetBeans case, I don't want to use the Ant build script created automatically from the IDE. See the mind-boggling minutiae one has to deal with in this approach (and which I would rather avoid), here.

Therefore I would like to know which of the major Java IDEs (Eclipse, Netbeans, IntelliJ IDEA, other?) is in your opinion more amenable to accepting an externally provided Ant script as the "project definition" and integrating closely to it (in terms of auto-complete and debug, addition of libraries, etc.). The discussion in this SO article seems relevant but is not quite the same situation as my team won't be using two different IDEs. Finally, I understand that Maven might provide a solution since NetBeans can use Maven-based projects where the Maven pom.xml is the project file and one doesn't have to deal with other IDE-specific artefacts, however there is enough Maven FUD on the web (I don't cite sources as I don't want to sidetrack the discussion) that I don't feel comfortable using it for a major undertaking without any significant prior exposure to it.

Community
  • 1
  • 1
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
  • I'm not sure what the IDE has to do with it. Personally, I like IntelliJ's Maven integration the best, but I'm not a big NetBeans user. Any IDE can take an Ant or Maven file and set up the IDE as far as I know, although I'm only comfortable with IntelliJ an Eclipse. – Dave Newton Jul 17 '12 at 21:30
  • I'm also not convinced this is a great SO question since it's asking for "best" etc. Any IDE will be fine. I'm also not a fan of dis-allowing multiple IDEs on the same project. And you don't *need* to use a NetBeans-generated Ant file, and as you've discovered, you shouldn't. – Dave Newton Jul 17 '12 at 21:34
  • @Dave IDE has to do in making it easy to keep the IDE "project" files out of the way and integrating closely with the Ant file in terms of auto-complete, errors highlighting, navigation, etc. Although some IDEs can indeed "import" Ant-based projects, they still build their own "project" alongside it and that tells me that certain configurations and options are stored there, as opposed to using the Ant file to track all changes. Also "import" strikes me as one-way. AFAIK only a Maven pom can be used by Netbeans as a project file in its own right but I try to avoid Maven if I can help it. – Marcus Junius Brutus Jul 17 '12 at 21:44
  • But IDE-specific config files are just that--IDE-specific config files. Ant *can't* keep track of IDE-specific configuration, which is why the IDEs get things from the Ant file, not vice-versa, and also why Maven files are way more helpful to an IDE--Maven *does* keep dependency information. In any case, I've worked on giant projects with multiple IDEs using both Ant and Maven and never had issues like you seem to be concerned about having. – Dave Newton Jul 17 '12 at 22:34

0 Answers0