MyEclipse: Re-Naming EAR and WAR deployment archives/folders
skanjo - May 03, 2007 - 07:40 PM
Post subject: Re-Naming EAR and WAR deployment archives/folders
I recently needed to create an EAR for my web application so I could take advantage of virtual hosting provided with JBoss/Tomcat.
Previously when I deployed WARs to Tomcat I was able to specify the context name, which was used for exploded deployments but I needed to edit the .mymetadata file to change the archive name for packaged views so it used the context name as the archive name rather than the project name as the archive name. This worked well for me.
Now that I am deploying EARs I am running into the same problem only I cannot change the default name of the either the exploded or archived EAR. The default for EARs is to use the project name. As with the WARs I edited the .mymetadata file to change the EAR archive name to something more appropriate but MyEclipse will not use the archive name I specify either for exploded or packaged deployments. In addition, I needed to modify the EAR .mymetadata file to change the included WAR archive name, otherwise MyEclipse would use the Web project name, this does work. To get around the problem with the EAR I am exporting it to my application server rather than deploying it.
I read through the forums and it seems that users have been complaining about this for several years, at least as far back as 2004.
I am sure this convention may have been adopted to provide defaults but could you also provide the ability to override the default, either by using the values specified in the .mymetadata file, or better yet, providing some screens in the project properties that allow modifying the values. I do not want to name my projects something more cryptic than verbose because the tool I use cannot handle it when it comes time to deploy.
skanjo - May 03, 2007 - 07:58 PM
I also just thought of another thing. When setting up web projects to include library projects it would be nice to specify the JAR name that is included in the web projects WEB-INF/lib folder. Right now MyEclipse uses the project name converted to lower case.
support-rkalla - May 04, 2007 - 06:24 PM
You are right that the first issues *is* a feature we have been needing to add for a long time, but keeps getting bumped for higher priority items. I'm going to add your comments to the issue and see if we can bump it up. I'm really sorry about this inconvenience.
skanjo - May 07, 2007 - 05:07 PM
Developing this feature would really help using MyEclipse for deployment. The way I set it, Eclipse in general is not well suited to making deployments without the assistance of some other build tool, like Ant. MyEclipse brings some new features to support the development life-cycle, the biggest to me is brainless debugging my web app in the app server of my choice. However, there is a gap between using Eclipse for development and for deployment. Within MyEclipse you need to setup your web application source as if you were editing the deployment in place. This is a major drawback and the reason you need something like Ant.
If I have code that changes by environment I cannot swap the code I want in and out of my source tree, well becasue, it needs to be in the source tree as it is source. I have gotten around this using custom Spring placeholder classes and custom context loaders that are environment specific. Using these custom classes I only need to create one build for all environments and then only specify a environment discriminator so that the application only uses properties and context files based on the current environment.
The problem I still have is building different versions of the same source for distribution in dependent projects. For example, my services project provides a well defined interface for clients and the complete implementation of that interface. When deploying the service as a POJO I need to JAR the entire project. When deploying it as a remote service, I only need to deploy the interface. Right now I am forced to deploy the entire service project in all usage cases. The only way around this, that I can currently foresee, is to split my service interface out into its own project. This would allow me to use Eclipse dependencies as I do now at a more fine-grained level (fine-grained here using boulder sized grains).
Let me use those immortal words of death, "It would be nice if..." MyEclipse dependency management was more configurable. I know I have the manual option but I am addicted to the deployment button. I know I can still debug in MyEclipse even if I use Ant to deploy. It just seems like a disconnect to use both Ant and MyEclipse for deployment. I guess Ant would actually give me the added deployment flexibility but then I would basically need to stop using the deploy button.
In the end I guess there are enough ways to get around this issue. However, the ways things are now just feels wrong to me.
IronDuck - Nov 20, 2007 - 02:31 PM
+1 for this feature request. It hasn't been a big deal in previous projects that were smaller and simpler, but we're working on some more EAR projects and not being able to control the archive name is a headache. Particularly since JBoss uses the archive name as the prefix for the JNDI name of EJBs it deploys.
support-rkalla - Nov 21, 2007 - 05:28 PM
IronDuck, management marked it for 6.1 and I'm going to try and sit on someone's head until it gets done if possible.
skanjo - Nov 21, 2007 - 05:54 PM
Sitting on heads to get features implemented! That is an interesting approach.
support-rkalla - Nov 21, 2007 - 06:21 PM
Sometimes we have to get creative on the support team :)
IronDuck - Mar 04, 2008 - 10:59 PM
Can we get an update on how well the head-sitting went? I found a related bug just recently. If a project name contains a period (.) then MyEclipse does not append .ear or .jar or .war to the directory/archive when it performs a deployment. This causes the deployment to fail on JBoss. Our convention is to include the version in the project name (e.g. My Project 1.0) so this is a major issue for us.
support-rkalla - Mar 04, 2008 - 11:16 PM
IronDuck, I just checked our issue tracker and management has targetted it for 6.5 because I threatened to drown myself in my coffee, if it gets descoped I'll let you know but I really want to get it in if I can.
IronDuck - May 18, 2008 - 01:38 PM
I don't see any obvious way to specify the archive name when deploying in 6.5M1 :(
Did it get descoped?
support-rkalla - May 19, 2008 - 05:18 PM
It's still scoped, but I don't know if it will make the cut or not. The Maven2 work going into the 6.5 release is touching all aspects of packaging, building and project deployment which this change touches as well; management might push it off to focus on the Maven changes exclusively for 6.5 to keep changes more manageable at this point. We also have the GA release in a few weeks to get ready.
IronDuck - May 20, 2008 - 01:55 AM
Well, I'm glad to hear that you haven't had to drown yourself in coffee, but I would very much like to see this feature sooner rather than later. I had to put a whole bunch of ant nonsense in my last project to be able to build for deployment and still let MyEclipse do it's thing on the development side.
IronDuck - Jun 25, 2008 - 12:39 PM
Doesn't look like this made it into 6.5. Any hope for 6.5.1?
support-rkalla - Jun 25, 2008 - 06:27 PM
IronDuck not ETA from management on this one. I hate being the bearer of bad news each release because so much good work goes into these... I'll see what I can do for 7.0, but no promises.
IronDuck - Oct 09, 2008 - 01:19 PM
Doesn't look like this made it into 7.0 M1 or M2. Any word from the bureaucrats?
IronDuck - Dec 16, 2008 - 03:29 AM
So, we missed 7.0 - is this still on the roadmap?
support-rkalla - Dec 16, 2008 - 07:02 PM
It's still on there, and I still pester for it with every release. I don't have the power to promise a target release for it, just that I keep pushing... and pushing... and pushing.
anthonyestelita - Oct 13, 2011 - 11:33 PM
This still doesn't appear to be implemented in 9.1. So I guess we all need to stop putting periods in our project names. :(
adampatterson - Sep 25, 2012 - 06:45 PM
Post subject: Still Not Available
This 'feature' is still not available in Blue 10.6. The Module Projects view says it's going to honor your Archive name, and does for pure eclipse EAR exports, but when you do a deployment (packaged or exploded) the project name is still used for the WAR instead of the EAR. This is a major mess for our developers since our EAR and WAR projects use the same name for deployment (myapp.ear and myapp.war), but obviously that isn't allowed in the workspace.
support-swapna - Sep 26, 2012 - 01:02 PM
I could not replicate the issue at my end on MyEclipse Blue 10.6 and WAS 7/8.
I modified the archive names from the Add and Remove Modules dialog (Right click on the EAR > MyEclipse > Add and Remove modules).
Attached is the screenshot for your reference.
If this is not the issue you are seeing, then please give us steps in detail to help us replicate the issue at our end.
torman - Feb 13, 2013 - 03:21 AM
This seems still be an issue.
The only way that I found to change the name of the war file is by changing the archive name in .mymetadata of the war project. But again, it only works for the ear export. When MyEclipse deploys the ear (either exploded archive or packaged mode) it still uses the war project name for the war.
I also didn't found a way to modify the resulted ear file name - same issues as with the war (projects name is being used).
All times are GMT - 6 Hours
Powered by PNphpBB2
© 2003-2004 The PNphpBB GroupCredits