I will like to assist my group standardize to a reproducable Java tooling environment that aligns with some good practices to improve on our workflow. We are predominantly a .NET shop that has been doing quite a bit of Java development recently and have been burned too many times with our current Java development process.
The process is ad-hoc, since we are kind of new to all things Java. Each developer decides on their tool of choice (somewhat a good thing) and due to the lack of any kind of procedure in terms of 3rd party dependency management, we more often than not run into build or deployment problems and hit serious setbacks when developer machines have to be rebuilt for one reason or another. Our Java development environments are simply neither consistent nor repeatable from one machine to another.
We do not have a similar problem with our .NET projects. Everyone runs the same version of Visual Studio, Resharper, and all 3rd party and open source libraries. Possibly because we pay for most of the stuff but there is also a consistent pattern across our C# projects where everything one needs is encapsulated into the solution file and all 3rd party dlls required for this solution are checked into sub a directory relative to the parent solution in source control. Visual Studio helps here too with its version check but this process is working well and I feel it could be replicated for our Java development efforts.
To help achieve this goal, I have compiled the following list of questions to gauge what the experts are using out there.
- What Java development IDE do you use? Eclipse, NetBeans or IntelliJ ?
- Do you use a dependency management tool such as Apache Maven, Gradle, a standardize home grown solution, or does each developer determine what works best for them? What we have
- If the answer to 2, is yes, how do you integrate such tools with your build system?
- Do you standardize on a specific version of the IDE, related tools and runtime? For example, are all devs running Eclipse IDE for Java EE Developers 3.7, IntelliJ 12.1.6, JDK1.7 or 1.8 and are there any policies to enforce that all devs are using the same version?
- How do you ensure that projects settings are consistent and repeatable across dev machines? Do you mandate checking in all of a project settings into source control or just the respective source files?
- For each tool, including IDE, dependency management and build, what selection process did you use?
Items highlighted in bold is what we are learning towards based on past experiences. But it will be good to learn from what others are doing.
I will start by answering some of the questions, listing some of the problems we are facing:
- Every developer uses Eclipse. However Eclipse and JDK versions could differ from one machine to another. Dev A could be running Eclipse Juno with JDK 1.6 while Dev B is running Eclipse Galileo with JDK 1.7. The build machine could be running something different and we will only know there is a problem next morning when build is broken. WIth resources also distributed across continents, this causes serious headaches. For IDE standardization, I am leaning towards IntelliJ for usability and consistency, just to name a few.
- We do not use any such tool. Instead all 3rd party libs are stored in a 3rdParty central folder outside of the solution tree. Then we have an Eclipse project setup to reference these JARs. This works well but this 3rdparty folder is very large. So if you do not want to selectively checkout the JARs you need just to get this project compile, you are in for a long morning waiting to check out the entire 3rdParty folder from SVN. For dependency management, I am leaning towards Maven.
- We use raw ANT scripts. Each developer needs to ensure that all the stuff required to build the project is checked into source control. But because these resources are all over the place, remember, the 3rd party folder is not part of the project tree, it is very easy to forget checking in that new dependent JAR downloaded from somewhere. And if you use Maven, like I do, I need to copy the JAR from my local Maven repo to the relevant centrll 3rdParty folder so that the build machine does not complain. However, there is still a good chance that this build will fail since the build environment could also be different. For build and packaging, I am also leaning towards Maven to ensure that the build environment is similar to the dev environment. I want to relieve the pain of having to remember where to put dependencies.
- No. See answer 1.
We do not, possibly because we are not saving the entire Eclipse workspace into source control. So if I receive a new machine and check out an Eclipse project, I will have to spend a good portion of my day configuring project settings that should have been saved in source control.
TIA for all comments.
EDIT: Just to add that we do have a CI server and use Jenkins/ANT scripts for building.
Klaus