views:

305

answers:

3

I'm picking up support on a project that is currently built with MyEclipse and has a decent sized development team that has been working without any CI processes.

From what I can tell, the MyEclipse folks don't see any value in being able to build outside of the Eclipse platform, which makes no sense at all to me. Continuous Integration is extremely helpful when you have to integrate changes into a codebase from more than one development environment, and it's pretty tough to automate builds when you're tied to a GUI.

Does anyone have continuous integration processes set up around MyEclipse style project-sets? If so, what strategy did you use to accomplish it?

AFAIKT there is no OOTB feature that can generate an Ant script (or equivalent headless-build script) from MyEclipse, nor is there an exposed way to invoke MyEclipse builders from a build-script platform.

This would lead me to believe that I'll need to reverse engineer the scripts based on what MyEclipse generates, which I'd rather not have to do.

I'm not particularly concerned with a Maven-style solution for my needs, but if you know of one I'd like to hear about it. From my initial research it looks like Maven/MyEclipse integration is even worse.

+1  A: 

This is remarkably similar to the problems I had working with a websphere 5.1 application that could only be built from WSAD6 running on build machine built from a disk image from the company IT dept. WSAD did have a headless mode. It was a real pain to get that working from Hudson.

I would not be surprised if there was a Maven plugin and/or Ant task for each of the builders you are using. I would start there.

sal
cwash
+1  A: 

Here is a Maven based solution so maybee a bit off topic for you..

In our company, we use MyEclipse as IDE and Hudson and Team City for continuous integration. The projects are Maven based, so Hudson and TC can work with them.

When you want to open the project in Eclipse, you have to check out the sources, setup maven repository path for eclipse with mvn eclispse:add-maven-repo, build them with mvn install and then run target mvn eclipse:eclipse, which creates the Eclipse project setup from the maven's POM configuration. Then it is possible to import the project into Eclipse and work with it seamlessly..

More information can be found on maven-eclipse-plugin project page

..seamlessly until you change something in the POM configuration - then you have to run the mvn eclipse:eclipse again and have the eclipse project configuration recreated acording to the new POM.. it's important not to forget about this step, unless your project in the IDE won't work properly and you'll be wondering why ;)

Me personally don't find this solution the best, but that's the way how Eclipse folks work with Maven :/

Hope this should inspire you at least :)

Martin Lazar
Thanks for the suggestions, Martin - my beef isn't with Eclipse, and your ideas are sound for working with standard Eclipse projects. My question has to do specifically with the MyEclipse Genuitec product that includes some specific plugins for creating "project sets" which generate project-specific artifacts (web.xml, ejb-jar.xml, etc.) and build/deploy projects for you.
cwash
This shouldn't be a probleam I think. In our company, we are all using MyEclipse as well, I just wrote about Eclipse, because this procedure is generic for both Eclipse/MyEclipse..The building/deployment in Eclipse is independent on build/deploy by Maven - for example we have to configure MyEclipse project's build path to include xml and html files in a build. It's because MyEclipse doesn't use pom.xml for the build, but builds the project acording to the MyEclipse's project files. That means that you can configure Maven build/deploy and MyEclipse build/deploy process separately.
Martin Lazar
"That means that you can configure Maven build/deploy and MyEclipse build/deploy process separately." Right - but that's what I'm trying to avoid - having to maintain 2 different build processes. Looks as though until MyEclipse supports a headless mode the only thing you can do is reverse engineer what it's doing in an Ant or Maven friendly way.
cwash
Aha, I see now :) I'm afraid you're right with the reverse engineering :/
Martin Lazar
+1  A: 

This is another reason why I intensely dislike Eclipse. The fact that an IDE can force you away from something that's acknowledged to be a best practice is shameful.

"AFAIKT there is no OOTB feature that can generate an Ant script (or equivalent headless-build script) from MyEclipse" - I'm not sure I understand why this is a problem. It's possible to write a simple Ant build.xml in an hour or two that would do the job for most Java EE apps packaged as WAR files. I don't know if you're using EJBs, but even adding app server specific tasks such as EJB and JSP compilation wouldn't be much of a challenge. If you can agree on a common directory structure it would even be reusable across projects.

With that Ant build.xml in hand, you should be able to drive your CI process simply by checking into Subversion. The Eclipse plug-ins to do that work well, I hear.

If it's really a problem, I'd recommend IntelliJ. It works nicely with CI based on either Cruise Control or Hudson or Jet Brains' own Team City. The cost isn't excessive, and it'll pay for itself quickly.

If I'm misreading your question, I apologize. But if I've got it right, there's no way I'd let the IDE dictate to the team this way.

duffymo
Agreed w/ your philosophical points here. There is a large codebase in place, many different kinds of projects built with this MyEclipse product (similar to Rational, a layer on top of Eclipse) and it massages a lot of the dependency management and packaging problems for the developer. It does a pretty good job at what it tries to solve. The only problem is it doesn't expose an interface that can build code outside of the IDE. The designers obviously don't see this as a problem. As you point out, I can reverse engineer Ant scripts, but that's gonna be a nightmare for a codebase this size.
cwash