For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 10 replies, 4 voices, and was last updated 22 years, 1 month ago by
Scott Anderson.
-
AuthorPosts
-
anniemaxMemberHi,
We are looking at MyEclipse and are trying to figure out how to perform the following to leverage the multi-project capabilities of Eclipse.
1) Eclipse Struts Project with JSP’s, Actions and Forms (View and Controller)
2) Separate Eclipse Projects which support shared Model, Utility Persistance Codebases.Each of the projects will have their own class files and each of the projects will have their own jar files. In effect, they are standalone components.
We would like to be able to use the deploy facility to combine the projects and deploy them to the appropriate application server.
Eclipse Projects have the capability to select project dependencies for compilation purposes and it has the capability to export classes and JAR files from the project as well.
I have redirected compiled class files to the WEB-INF/classes directory from the supporting projects, but that does not support the movement of JAR files.
Any thoughts would be helpful…thanks.
/mdb
January 6, 2004 at 12:56 pm #201469
anniemaxMemberForgot about this information:
OS: windowsNT
Eclipse verison 2.1.2, newly installed, with no other plugins
MyEclipse version 2.7 RC2
Eclipse JDK 1.4
Tomcat JDK 1.4
Tomcat version 4.1.29January 6, 2004 at 1:16 pm #201472
Riyad KallaMembermdb,
I think you are going to have to write an Ant script for this, as I’m not aware of ME supporting the combination of dependant projects into a master project during deployment. I’m curious how it would know HOW to combine these projects… for example, lets say you had the following:Project 1:
JSP pages that are a frontend for a storeProject 2:
EJBs providing all the business logic and Beans necessary for the store functionalityProject 3:
Encapsulations of all database access into DAO classes that are cached and used by Project 2Now just as an example, if you are working on Project 1 or 2, you can add 2 or 3 to the dependant project in Eclipse so the classpaths and so forth resolve correctly, but when you go to deploy the project, how would ME be able to know that all of project 3 should go into the /lib dir of Project 2 and all of Project 2 and 3 should go into the WEB-INF/lib dir of Project 1? (I don’t think that previous sentence syntactically makes sense, but you get the idea).
mdb if you can give a little more detail about your situation and the behavior you would like to see, i’m sure the ME dev team could evaluate its feasibility and probably get the functionality (or atleast a reasonable middle ground) in that you needed for your team (time permitting).
There was a lot of talk about the deployment process before the Christmas break and the conclusion was to help make it a little bit more flexible, so its possible that some of the upcomming deployment enhancements could give you just what you needed (or atleast minimize the complexity of any ant scripts you have to write to accomplish this task).
January 6, 2004 at 2:11 pm #201475
anniemaxMemberHi rkalla,
I appreciate the fast response. we are looking at ME for a project of about 8-12 developers and this functionality would be great to have since we can then partition the project as we see fit.
Sysdeo Tomcat Plugin has this capability for running tomcat inside of Eclipse. They use the following in the project properties:
1) Projects Tab for the dependent projects. This is well known.
2) You can then use the Order and Export Tab to export the class files and the dependent jar files to the dependent projects.As a starter, it would be nice to automatically export the class files to the WEB-INF/classes and the jar files to the WEB-INF/lib directory when a change has occured in these files.
Another avenue might be to consider a separate deployment project that gathers the jar and class files automatically and we deploy from there…just a thought.
Is there a way of hooking an ant script into the deployment mechanism so that we could hack it ourselves?
One more thing, we are having trouble getting the JSP debugging to work on the above configuration. any thoughts?
/mdb
January 6, 2004 at 3:08 pm #201477
Riyad KallaMembermdb,
Hmm I’d like to defer your requests to Scott/Michael as they can provide more detail (given your requirements) as to how changes to the deployment may or may not help you. Also they would be able to take your requirements and file them internally for the devel team.Overall I do like your suggestion especially using Sysdeo as a reference so the dev team has some rough guideline to work by and can use Sysdeo as a proof-of-concept example of the type of functionality you are looking for.
Sorry I couldn’t be of more help.
January 6, 2004 at 9:42 pm #201507
Scott AndersonParticipantmdb,
As a starter, it would be nice to automatically export the class files to the WEB-INF/classes and the jar files to the WEB-INF/lib directory when a change has occured in these files.
This really goes back to the dependent project support that is currently an open (but very high priority) enhancement request for us. You can contribute to the requirements by posting a followup to the thread in the Enhancements forum. A technique that might work for you is to set the output location of your source library projects to be the class output location to the WEB-INF/classes directory of your web project. For things that are already libraries, you’ll have to add them directly to the web project build path.
Another avenue might be to consider a separate deployment project that gathers the jar and class files automatically and we deploy from there…just a thought.
Is there a way of hooking an ant script into the deployment mechanism so that we could hack it ourselves?
Writing an Ant script to consolidate everything will work fine. Unfortunately we don’t have an extension point to allow you to participate in the build loop though, although we’ve kicked it around. Once your script is written, you can run it and deploy the project. Once deployed, each time you rerun your script our deployer will copy out any updates.
–Scott
MyEclipse SupportJanuary 10, 2004 at 5:07 pm #201670
anniemaxMemberHi Scott,
Thank you for the reponse. I have been disconnected for the past few days…so i was unable to repond.
I hacked out an ANT script to perform the deployment from the multiple projects and I am writing a little eclipse plugin to perform the deployment of the jar and class files to the ME aware web application by pressing a button on the tool bar. It gave me a chance to see what the plugin development is really like. 😉
thanks.
/mdb
January 12, 2004 at 12:11 am #201690
Scott AndersonParticipantmdb,
It gave me a chance to see what the plugin development is really like.
Decided to come experience our pain, huh? 😉
January 13, 2004 at 9:35 pm #201780
James I. FalekMemberHas anyone been able to solve this problem? One nice thing about MyEclipse was that there was no need to write Ant scripts to deploy and debug. 🙂
For our work, we have separate Eclipse projects for the resource layer, the application layer (Web Application) and utilities. We expect to have other applications, but currently, we have these three projects. If I understand correctly, we will need to write an Ant script to copy the libs and classes from the non-main projects to the main application project and then hit the deploy button. I’ll also need to write a clear task to remove the classes and libraries. Easy at first, but I would rather have it automated than to maintain it over time. All things being equal, I would rather have one step deployment than a two step deployment.
Can anyone tell me what happens when I hit the deploy button? What will I lose out if I write the Ant task to copy the classes and libraries directly to the web server itself?
Also, a question about the deployment dialog. We only are deploying to one server. Is it possible to have that menu option selected in the dialog box?
Thanks for the help,
James
January 13, 2004 at 11:13 pm #201785
Riyad KallaMemberJames,
I’ve forwarded your detailed questions on to the internal team so they can give you some more details.January 14, 2004 at 10:51 pm #201880
Scott AndersonParticipantJames,
Right now we don’t have support for dependent library projects,which would automatically perform the packaging and copying you’d like. However itis a high-priority enhancement request that we hope to get to soon. Until then, you can simply export your utility projects as a jar file to the WEB-INF/lib directory of your web project. Remember to save the .jardesc file so from then on you can just run it to redo the export. It’s just an Ant script, but it’s one Eclipse will generate for you so you don’t have to writeit.
Can anyone tell me what happens when I hit the deploy button?
Everything under your web root is copied “as is” to the exploded deployment location of your server since it’s already in exploded war format.
What will I lose out if I write the Ant task to copy the classes and libraries directly to the web server itself?
I’d suggest you use the Export facility and .jardesc above and not write anything yourself.
Also, a question about the deployment dialog. We only are deploying to one server. Is it possible to have that menu option selected in the dialog box?
Sounds like a nice small enhancement. 🙂
-
AuthorPosts
