Reputation: 2067
I have a Java project where:
The problem is in maintaining project files which are independent of the IDEs, but at the same time can be easily imported into both IDEs.
I have considered the following possibilities, but wasn't happy with them:
Personally I'm leaning towards the third solution as it seems more generic (despite the hassle). Any suggestions are welcome.
Upvotes: 3
Views: 623
Reputation: 77971
The choice of source code editing environment can be highly contentious, in a software development project.
Rather than take sides, I have always mandated the following simple rules:
The first rule is common sense, it's the latter rule that generates controversy. Each IDE has its own settings format, additionally these files tend to be very specific to the developers machine. It's simply not practical to track collective changes to these files.
Instead, I encourage encourage developers use build tool plugins, for their chosen IDE. This is really the reason behind the popularity of Maven, the "pom.xml" file has become a common standard for determining a project's build classpath (cross IDE support).
A very fine build tool that appears to have adopted some of the modern approaches of Maven, but preserves the control of ANT. It's build files may appear alien at first (no XML), but tend to be shorter and simpler to understand
ANT pre-dates Maven so has no standard way to track it's classpath. It's left up to the "build.xml" author.
The best solution is to integrate the apache ivy plugin. It also has plugins for both Eclipse and Netbeans
If you'd prefer the traditional "do-it-myself" ANT approach, then you can create additional targets in your build file, generating the configuration files required by your supported IDEs.
For example, the answers to the following question give two approaches for generating Eclipse's ".project" file:
Upvotes: 3