- This topic has 9 replies, 3 voices, and was last updated 17 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
kevinstembridgeMemberHi folks,
I have my projects in Eclipse separated as per the architectural layer that they belong to. So my Web Layer project (the one that MyEclipse deploys) is dependent on a Business Services layer project which is in turn dependent on my Persistence layer project. There is no direct dependency between the Web layer and the Persistence layer.When I deploy using MyEclipse, it won’t deploy the persistence layer classes. In other words, if project A is dependent on project B, and project B is dependent on project C, deploying project A with MyEclipse will cause A and B to be deployed but not C. However, it looks as though it is able to deploy JAR files exported from project C. I haven’t tried it but the option is there in the preferences panel.
I’ve had a quick search through the forums and documentation without any luck. Is there any way of enabling MyEclipse to deploy nested dependent projects?
I’m using version 4.1.1 GA.
Cheers,
Kevin
Riyad KallaMemberKevin,
What are the actual project *types* of Project A (top), Project B (middle) and Project C (bottom)?
kevinstembridgeMemberHi Riyad,
Project A is a MyEclipse web project, and the other two are Java projects.The simple workaround is to specify that project A is also directly dependent on project C, even though technically in isn’t. I don’t really like this solution even though I can’t really think of any major flaws with it. It could lead to issues with loading the wrong class but this is fairly unlikely. It just feels safer to specify correct dependencies in Eclipse.
I may have jumped the gun a little bit, but I’ve added a feature request for the type of nested dependency deployment I’m talking about.
Anyway, thanks for the response. I’d be interested to hear if I’ve made a mistake by not configuring MyEclipse correctly.
Cheers,
Kevin
Riyad KallaMemberKevin,
I saw your request and will file it. I know we *talked* about the issue of recursively dependent projects and we were worried about a cycle, so we cut it off at 1 layer deep and this is the first time in over a year anyone has asked for it.So we agree it would be nice if it were smarter and I’ll prod the developers on this, although management may not prioritize it right now with 5.0 on the horizon.
kevinstembridgeMemberYeah, I understand it’s not going to be a high priority.
As far as cycles are concerned, Eclipse can help out there. It prevents all projects involved in a circular dependency from building.Thanks for your time. You guys do a great job on the support forums!
snbMemberHi
We use MyEclipse 5.1.0GA with nested project dependencies (as decribed above). As far as I can see it still does not work, is this right?
Is there a new solution?thx
Daniel
Riyad KallaMemberDaniel,
Dependencies are still resolved 1 level deep, but there ways to get around this depending on the project layout. If you outline your project, I may be able to help.
snbMemberWould be great Riyad,
WebProject
|
————–
| |
Java Project 1 Java Project 2
|
————–
| |
Java Project 3 Java Project 4The Java Projects containes source and jar files, which are all marked to be exported.
Would be great if you have an idea how to deploy the source and jar files form the Java Projects 3+4.greetings
Daniel
snbMemberoups forgot to preview first…
Web Project depends on Java Project 1 and Java Project 2.
Java Project 1 depends on Java Project 3 and Java Project 4.
Riyad KallaMemberFor reference, this is how I understand it:
+ Web Project + Java Project 1 + Java Project 3 + Java Project 4 + Java Project 2
This is a pretty deep layer of dependencies, but to get MyEclipse to deploy this automatically I would suggest the following (assuming you are using a container that can accept an EAR):
1) Create a new Enterprise APplication Project with 1 Web module
2) Mark your existing web project as the module of the EAR (don’t create a new one).
3) Go to your EAR properties, under MyEclipse > EAR and tell it to package and deploy dependent Java Projects
4) Make the EAR reference Java Project 3 and 4Now when you deploy the app you will get:
+ EAR + JAR (Java Project 3) + JAR (Java Project 4) + WAR (Web Project) + JAR (Java Project 1) + JAR (Java Project 2)
JP3 and 4 are exposed to the Web Project and the subsequent children under Web, which in this case, is JP1 that we care about. It’s not perfect, but it should allow you to automate the deployment process.
-
AuthorPosts