- This topic has 4 replies, 2 voices, and was last updated 10 years, 3 months ago by support-swapna.
-
AuthorPosts
-
Chris CranfordParticipantI am facing a problem with maven integration with MyEclipse around packaging and deployment. Our workspace consists of a parent POM project and two child module projects.
The first child module called core is a utility jar which uses annotation processing to generate source files to /target/generated-sources/annotations. The files from this path are included during the packaging process of the jar to place the metamodel files next to the actual compiled sources.
The second child module called web which is a war packaged web application that depends on core. From within MyEclipse, I have this project set to deploy exploded but to include the core utility as a packaged jar. The configurations get imported from the pom.xml files for both projects fine and I can run the maven command line and everything compiles and packages just fine.
The problem however is when I deploy the application from within MyEclipse to my tomcat container, the IDE shows the deployment was successful. On the first deployment, everything is fine. But if I make changes and select redeploy then the container complains it can no longer find files in the core during the restart of the container. I tracked this down to where the core jar file is doubling in size everytime I select ‘redeploy’. Running a zip check on the file, it appears that the packaging process MyEclipse is doing to create the jar file is simply appending the new jar stream to the existing jar file rather than replacing or updating the contents accordingly.
To make sure that none of my POM configurations are affecting this behavior, I created a simple new workspace and project setup as follows
1. Create new workspace
2. Create a parent pom project
3. Create module project as jar type called core
4. Create module project as war type called web
5. In core project, create a class in a dummy package.
6. In web project, select Properties -> Deployment Assembly -> Merge Deployment of modules
A. Enable project settings
B. Turn off merge (this forces core to be packaged at deployment rather than merged).
7. Add core as a dependency to the web project
8. Deploy web to tomcat (leave container shutdown as its not needed)
9. Navigate to CATALINA_HOME/webapps/project/WEB-INF/lib (pay attention to core.jar’s size).
10. Reselect redeploy in the servers section to redeploy web.
11. Notice core.jar filesize grew.Without any specific things in my POM, no annotation processing, none of that. Just literally an empty project — same behavior is observed. Any ideas on what could be the cause or what I could check? In both cases, it’s a brand new workspace. This appears to be an issue on both MyEclipse 2014 and 2015 CI.
support-swapnaModeratorHi,
Thank you for pointing this issue. The fix will be out with our release tomorrow. Please update and let us know if you see any issues.
Chris CranfordParticipant@support-swapna wrote:
Hi,
Thank you for pointing this issue. The fix will be out with our release tomorrow. Please update and let us know if you see any issues.
Is the fix being included for both 2014 and 2015 builds or just 2015?
support-swapnaModeratorHi,
The fix will be available only with the MyEclipse 2015 release.
Let us know if you see any issues.
support-swapnaModeratorHi,
MyEclipse 2015 CI 5 is out along with the fix for the issue you are seeing.
Please download and install MyEclipse 2015 CI 5 from here : https://www.genuitec.com/products/myeclipse/download/Let us know if you see any issues.
-
AuthorPosts