- This topic has 9 replies, 3 voices, and was last updated 18 years, 1 month ago by rhe.
-
AuthorPosts
-
rheMemberI have a question about how we deploy a ear project, some of our team member are using WSAD and some using myeclipse, we want to have a standard way to deploy EAR, what is the best way? using ANT build?
Riyad KallaMemberYes, I believe Ant is going to be the only way to keep this consistent across all the groups.
rheMemberRiyad,
Thanks for reply. Does MyEclipse support automated ant scripts generation? or I have to write it manully? Say, if a developer using myclipse developed a hibernate capability module, the ant scripts have to make relative change, it is going to be so painful to keep in consistent.
Riyad KallaMemberDoes MyEclipse support automated ant scripts generation?
No, not at this time.
Say, if a developer using myclipse developed a hibernate capability module, the ant scripts have to make relative change, it is going to be so painful to keep in consistent.
I know what you mean, I really wouldn’t encourage you to try and create an all knowing script, You’ll burn up so much time doing it. The only timely solutions I see are:
1) Designate one developer as the “deployment developer”, he handles all deployments of the project regardless of the IDE he uses.
2) Let everyone else keep using their own IDEs for development as long as it works.Optionally… make everyone use MyEclipse 🙂
rheMemberFor a enterprise project, the managing for deployment becomes more differcult based on the team size. I don’t see a easy way to do this.
Even all team uses same IDE (myeclipse) for development, still a problem when deploy to client’s production, you can’t force client to use myclipse to deploy a project.
So the only solution as you said before is to use ant build.
Please suggest. correct me if i m wrong or i missing something
Riyad KallaMemberI don’t know how your development and distrobution is setup, but if you need a custom non-IDE based solution, yes, Ant is going to be the way to do this.
tarantulaParticipant+1.
I made a lot of progress with Ant as my J2EE packaging and deployment tool, then decided to try MyEclipse 5.1 GA EAR deployment for adding and removing project modules and I found Ant is a much more reliable solution.
I tried adding multiple Web project modules to an EAR project using MyEclipse and it only adds one! The last module added replaces the previous one. The application.xml file only shows one WAR module.
Also, because my Web projects have a dot (“.”) in their names, the deployed EAR file contains subfolders missing the “.war” file extension, which breaks the enterprise application at runtime. I was informed this is a “hidden feature” of MyEclipse that is possibly going to be removed in the future.
Also, there is no way to add a standard Java library module (JAR) to an EAR file with MyEclipse, only EJB and Web modules.
A related issue I have with MyEclipse is that a project MUST have Web project capabilities (i.e. it must be a web application) to use the JSF configuration editor. This doesn’t make sense. JSF supports JAR packaging for JSF utility libraries containing UI components, converters, managed beans, etc. (eg. declared in META-INF/faces-config.xml).
If I am forced to deploy my JSF components as a WAR file, this makes such JAR packaging and deployment within an EAR or WAR file impossible to do with MyEclipse.
I highly encourage the MyEclipse team to fix this broken J2EE deployment and project tooling and for developers to stick to Ant in the meantime.
Ian
Riyad KallaMemberI tried adding multiple Web project modules to an EAR project using MyEclipse and it only adds one! The last module added replaces the previous one. The application.xml file only shows one WAR module.
I cannot reproduce this using a clean install of 5.0.1 or 5.1.0. I created an EAR with a web module, then I edited the EAR’s modules and added 2 other random Web applications to it’s module list. They were all listed and the application.xml file correctly listed them. If you want to start a separate thread on this I’d be happy to work with you.
Also, because my Web projects have a dot (“.”) in their names, the deployed EAR file contains subfolders missing the “.war” file extension, which breaks the enterprise application at runtime. I was informed this is a “hidden feature” of MyEclipse that is possibly going to be removed in the future.
I put in another reminder that we need to remove this and replace it with full custom archive functionality for deployable units. This was a quick fix for our JBoss users a few years ago, and now it’s comming back to haunt us. We appologize for this strange behavior.
Also, there is no way to add a standard Java library module (JAR) to an EAR file with MyEclipse, only EJB and Web modules.
It’s manual, but covered in the EAR document here in Section 9: http://www.myeclipseide.com/images/tutorials/quickstarts/earprojects/
A related issue I have with MyEclipse is that a project MUST have Web project capabilities (i.e. it must be a web application) to use the JSF configuration editor. This doesn’t make sense. JSF supports JAR packaging for JSF utility libraries containing UI components, converters, managed beans, etc. (eg. declared in META-INF/faces-config.xml).
If I am forced to deploy my JSF components as a WAR file, this makes such JAR packaging and deployment within an EAR or WAR file impossible to do with MyEclipse.
Ian, you certainly aren’t required to deploy them as a WAR. In fact if you just make the Java project a dependency of the EAR project and turn on the appropriate deployment rules under the EAR project properties, then MyEclipse > EAR, MyEclipse will JAR the project for you and place it in the root of the EAR.
It’s true that if you want to use the MyEclipse/JSF facilities, they are intended to be used on a JSF web project, which is why you need web and JSF capabilities. I see from your example that there is room for improvement in the realm of custom component development though and will make a note for our team to look into that.
I highly encourage the MyEclipse team to fix this broken J2EE deployment and project tooling and for developers to stick to Ant in the meantime.
We understand you are frustrated and will work with you to help you the best we can with your individual needs, but the deployment and project model is quite robust and serves over 300k developers without incident. It’s not helpful or appreciated to declare the entirety of the project or deployment model “broken” because it’s not working in your particular case… it makes me loose my hair.
tarantulaParticipantThanks for your prompt reply Riyad. I will try some of your suggestions and follow up on the links you recommended.
Don’t lose your hair! 😮 MyEclipse is a very good product and more than meets my needs for 90% of development tasks. I will start a thread soon to discuss the issues I’m having.
rheMemberThanks Guys, I think a ant deployment must be needed for project level management. Ear export is only useful for individule developer.
-
AuthorPosts