Analyzed the MyEclipse 7.5 deployment problem

My colleague an me analyzed the MyEclipse 7.5 deployment problem. We think there is missing a possibility to disable the Export/Deployment of related Projects
under WebProject->Properties->Java Build Path->Projects,
like it is possible for jars under WebProject->Properties->Java Build Path->Order and Export.

In our Project structure we have several webprojects and many Java projects
which are needed by the webprojects. We deploy these projects as jar files
into different lib folders of the server. This job is done by an ant task.

The jar projects are attached to the webprojects by the jar files under
WebProject->Properties->Java Build Path->Order and Export with
an unchecked export check box.
Some of these Projects are also attached to the webproject via
WebProject->Properties->Java Build Path->Projects.

This causes the new deployment builder to deploy the classes
of these projects into the webproject .war too. Therefore the project
is deployed twice – once as .class files in the war and secondly as .jar in a
lib folder of the server. The server crashes on start up.

The old deployment builder doesn’t care about these projects,
everything worked as supposed.

I assume that the new deployment builder looks into the .project
files of the Java projects. There he finds an entry
com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder
which causes this instance of the deployment bulider to deploy the
Java Project into the webproject of the calling deployment builder.

If I remove the entry in the .project file and everything works fine.
Unfortunately, after some starts of MyEclipse, the entry is rewritten
by MyEclipse.

As solution I can remove the project dependency’s under
WebProject->Properties->Java Build Path->Projects.
But why is Eclipse deploying these projects into my server? I think
there must be a possibility to tell eclipse not to deploy these projects.

Maybe the Genuitec guys will provide a solution…

2 thoughts on “Analyzed the MyEclipse 7.5 deployment problem

  1. We dug into this and you found a bug that we are working on fixing right now for 8.0M1.

    First there is a bit of confusion around how to filter out the deployment of dependent projects — historically we’ve always done this by going to Project Properties > MyEclipse > Web > Deployment, then in the top group select “Ignore” — so the dependent Java projects won’t be deployed with your Web projects. Our deployer doesn’t key off the Export and Order settings at this time.

    However, it looks this works on initial deploy, but if any classes change in the dependent projects during dev time, the hot-sync process will fire and then deploy the dependent Java projects. That is the bug we are fixing.

    So if you guys aren’t working on those Java projects and are just working with the Web Project, using the “Ignore” setting will do exactly what you need it to do and will stop putting those additional classes on the server.

    Then in 8.0M1 we’ll get it fixed so it never ignores that setting for you.

    Thanks for the heads up!

Leave a Reply

Your email address will not be published. Required fields are marked *

*