- This topic has 11 replies, 2 voices, and was last updated 10 years, 11 months ago by support-tony.
-
AuthorPosts
-
Tom McCobbParticipantWhen I try to do an exploded deployment of a maven project containing a WAR with overlay the dependent classes are not deployed. Here is the POM.XML defining the overlay in the maven war plugin:
<plugin> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <overlays> <overlay> <groupId>com.ravencsi.war</groupId> <artifactId>ARMCORE_WAR</artifactId> <excludes> <exclude>WEB-INF/applicationContext.xml</exclude> <exclude>WEB-INF/ldap.properties</exclude> <exclude>WEB-INF/jboss-web.xml</exclude> <exclude>WEB-INF/web.xml</exclude> <exclude>css/customer.css</exclude> <exclude>images/logo-small.gif</exclude> <exclude>WEB-INF/classes/com/ravencsi/faces/messages_en_US.properties</exclude> </excludes> </overlay> </overlays> </configuration> </plugin>
The dependent jars are added to the WEB-INF/lib OK, but none of the classes in the com.ravencsi package are added. This only happens in an exploded deployment; if I do a packaged deployment all the classes show. up.
support-tonyKeymastertmccobb,
Sorry you’re seeing this issue. However, I’ve been unable to replicate it. Although I’ve used your pom snippet to test with, I’m not sure configuration of the overlay, beyond the default behavior would affect this; is it possible for you to try this without the <overlays> element, just to see if there is an effect?
I’ve tried it with two simple web projects (with maven support), with and without your overlays configuration. I get all classes deployed in exploded and packaged modes. If you can put together a couple of projects that exhibit the problem, that would help us replicate it. Alternatively, you could provide the steps for us to replicate it here.
Tom McCobbParticipantIt is entirely possible that I am not deploying properly. (I just recently began using Maven for all projects).
I do a mvn clean/compile/build from the command line (maven 3.1) and use the ME ‘Manage Deployment” function to do the exploded deployment to JBoss.
For the dependent project by itself this works just fine. It is only when I jigger the config files with the overlay that there is a problem.
So it is entirely possible that I am skipping over something in ME that I need to be doing. Is that the case?
support-tonyKeymastertmccobb,
I’m sorry but I am still not sure exactly what and how you are trying to do your deployment. As I understand it, you have two web projects, let’s say Web1 and Web2, which are both Maven projects. You have added a maven dependency to Web1, which is the group, artifact and version specified in the Web2 project. By default, maven for MyEclipse will satisfy dependencies from the workspace, if possible. So Web2 is now a dependency of Web1. MyEclipse will merge the two projects, in the same way as maven does, when deploying using MyEclipse. This should happen even without a specific overlay configuration.
So are you saying that the deployment of Web1 (with the Web2 dependency) works fine when you don’t have the overlay configuration that you listed above but fails when you add that configuration? A clear description of the issue is always useful. I’ve tried to replicate from what I understand but the deployment works as expected.
Again, specific steps to replicate would help, as would trying to replicate it yourself using two simple Web projects with maven support. It is useful to replicate with as simple a set up as possible.
Tom McCobbParticipantLet’s stay away form War1 and War2. It is set up like this:
Project which contains all code and config files for deployment as WAR: CORE.WAR
Project that includes CORE.WAR as a dependency and then applies Overlay to exclude certain config files from CORE.WAR like ldap.properties, jboss-web.xml, applicationContext.xml: CLIENT.WAR The excluded files are provided in CLIENT.WAR, which are the only new files in CLIENT.WAR.
The WAR’s get packaged with an EJB module, call it COMMON.EJB, into an EAR. When I package COMMON.EJB and CORE.WAR into MAIN.EAR and deploy it exploded, no problems.
I have the problem with the missing classes when I package COMMON.EJB and CLIENT.WAR into CLIENT.EAR. An exploded deployment will deploy everything except the classes in CLIENT.WAR.
support-tonyKeymastertmccobb,
Thanks for the details. From those, I created a Core web project, with one class, a Client web project, with one class, a Common EJB project with just the generated code, and a ClientApp enterprise application project. I added Core as a dependency to Client and added both Common and Client as dependencies to ClientApp. When I deploy, exploded, ClientApp to a server, I see the classes for both Core and Client projects in the Client jar file that is deployed. I then added your maven overlay configuration, just to check if it made a difference. It didn’t. If I do a maven install, then I also see all classes in the built EAR.
As I’ve been unable to reproduce the issue, could you please provide a simple set of projects that exhibit the problem, for us to try?
I’ve been assuming that you’re using the latest release of MyEclipse, 2014. If that’s not so, could you please include the output from MyEclipse->Installation Summary->Installation Details?
Tom McCobbParticipantUnfortunately 2014 has not behaved well on Fedora 19 or 20 (a redhat problem, not ME) so I am still on ME 10.7. (Fedora 20 update from F18 creamed ME10, also). ME performs so much better on linux that it is usually worth the added aggravation.
Anyway, here is the info
*** Date: Friday, January 17, 2014 12:22:08 PM EST *** System properties: OS=Linux OS version=3.12.7.fc19 OS arch=amd64 Profile arch=x86_64 Window system=gtk Java version=1.6.0_13 Workspace=file:/home/tom.mccobb/Workspaces/ VM Args=-Xmx2048m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=64m -Dosgi.nls.warnings=ignore -jar /home/tom.mccobb/MyEclipse/MyEclipse 10//../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar *** Eclipse details: MyEclipse Enterprise Workbench Version: 10.7.1 Build id: 10.7.1-20130201 Blueprint: MyEclipse 10 com.genuitec.myeclipse.database - 10.7.0.me201302031636 com.genuitec.myeclipse.desktop - 10.7.0.me201302031636 com.genuitec.myeclipse.editor - 10.7.0.me201302031636 com.genuitec.myeclipse.enterprise.workbench - 10.7.0.me201302031636 com.genuitec.myeclipse.geronimo - 10.7.0.me201302031636 com.genuitec.myeclipse.glassfish - 10.7.0.me201302031636 com.genuitec.myeclipse.icefaces.feature - 10.7.0.me201302031636 com.genuitec.myeclipse.imageeditor - 10.7.0.me201302031636 com.genuitec.myeclipse.jboss - 10.7.0.me201302031636 com.genuitec.myeclipse.jetty - 10.7.0.me201302031636 com.genuitec.myeclipse.jonas - 10.7.0.me201302031636 com.genuitec.myeclipse.jrun - 10.7.0.me201302031636 com.genuitec.myeclipse.jsf - 10.7.0.me201302031636 com.genuitec.myeclipse.matisse - 10.7.0.me201302031636 com.genuitec.myeclipse.maven - 10.7.0.me201302031636 com.genuitec.myeclipse.oracle - 10.7.0.me201302031636 com.genuitec.myeclipse.orion - 10.7.0.me201302031636 com.genuitec.myeclipse.persistence - 10.7.0.me201302031636 com.genuitec.myeclipse.pulse - 10.7.0.me201302031636 com.genuitec.myeclipse.reports - 10.7.0.me201302031636 com.genuitec.myeclipse.resin - 10.7.0.me201302031636 com.genuitec.myeclipse.struts - 10.7.0.me201302031636 com.genuitec.myeclipse.sun - 10.7.0.me201302031636 com.genuitec.myeclipse.tomcat - 10.7.0.me201302031636 com.genuitec.myeclipse.uml2 - 10.7.0.me201302031636 com.genuitec.myeclipse.visualvm - 10.7.0.me201302031636 com.genuitec.myeclipse.visualvm.server - 10.7.0.me201302031636 com.genuitec.myeclipse.weblogic - 10.7.0.me201302031636 com.genuitec.myeclipse.websphere - 10.7.0.me201302031636 com.genuitec.myeclipse.ws - 10.7.0.me201302031636 org.eclipse.birt - 2.6.1.me201302031636 org.eclipse.datatools.connectivity.feature - 1.9.0.me201302031636 org.eclipse.datatools.enablement.feature - 1.9.0.me201302031636 org.eclipse.datatools.modelbase.feature - 1.9.0.v201106031100-77078CcNBHCBYKYEbNV org.eclipse.datatools.sqldevtools.feature - 1.9.0.me201302031636 org.eclipse.emf - 2.7.0.v20110606-0949 org.eclipse.gef - 3.7.0.v20110425-2050-777D-81B2Bz0685C3A6E34272 org.eclipse.graphiti.feature - 0.8.0.v20110607-1252 org.eclipse.jpt.jpa.feature - 3.0.0.me201302031636 org.eclipse.jpt.jpadiagrameditor.feature - 1.0.0.me201302031636 org.eclipse.jst.common.fproj.enablement.jdt - 3.3.0.me201302031636 org.eclipse.jst.enterprise_ui.feature - 3.3.0.me201302031636 org.eclipse.jst.server_adapters.ext.feature - 3.3.0.me201302031636 org.eclipse.jst.server_adapters.feature - 3.2.100.me201302031636 org.eclipse.jst.server_ui.feature - 3.3.0.me201302031636 org.eclipse.jst.ws.axis2tools.feature - 1.1.200.me201302031636 org.eclipse.m2e.feature - 1.0.0.me201302031636 org.eclipse.sapphire.platform - 0.3.0.201106221325 org.eclipse.wst.common.fproj - 3.3.0.me201302031636 org.eclipse.wst.server_adapters.feature - 3.2.100.me201302031636 org.eclipse.xsd - 2.7.0.v20110606-0949 org.springframework.ide.eclipse.feature - 2.9.1.me201302031636 org.zeroturnaround.myeclipse.feature - 5.4.2.RELEASE-201311281027 fr.obeo.acceleo.bridge.feature - 2.6.0.200906261742 org.codehaus.groovy.eclipse.feature - 1.5.7.20081120_2330 org.eclipse.cvs - 1.3.100.v20110520-0800-7B78FHl9VF7BD7KBM4GP9C org.eclipse.draw2d - 3.7.0.v20110425-2050-46-7w3122153603161 org.eclipse.egit - 1.3.0.201202151440-r org.eclipse.egit.psf - 1.3.0.201202151440-r org.eclipse.equinox.p2.core.feature - 1.0.1.v20110906-1605-8290FZ9FVKHVRKtmx3fpNuo02129 org.eclipse.equinox.p2.extras.feature - 1.0.1.v20110906-1605-7A4FD4DiVOMap8cHSc6vPuny4gqO org.eclipse.equinox.p2.rcp.feature - 1.0.1.v20110906-1605-782EqBqNKGVkiV-PUsgz-uny4gqO org.eclipse.equinox.p2.user.ui - 2.1.2.R37x_v20110815-1155-6-Bk8pYWZz0qUTX5I15GZWwbXkrl org.eclipse.help - 1.3.0.v20110530-0844-7i7uFFmFFl8nvqbDpEqTvx org.eclipse.jdt - 3.7.2.v20120120-1414-7z8gFcuFMP7BW5XTz0jLTnz0l9B1 org.eclipse.jgit - 1.3.0.201202151440-r org.eclipse.jsf.feature - 3.3.0.me201302031636 org.eclipse.ocl - 3.1.0.v20110606-1427 org.eclipse.pde - 3.7.2.v20120120-1420-7b7rFUOFEx2Xnqafnpz0E--0 org.eclipse.platform - 3.7.2.v20120207-1839-9gF7UHPDFxGjd-PqDr2jX_4yKaumkoHTz04_q-q org.eclipse.rcp - 3.7.2.v20120120-1424-9DB5FmnFq5JCf1UA38R-kz0S0272 org.zeroturnaround.eclipse.feature - 5.4.2.RELEASE-201311281027 org.zeroturnaround.eclipse.wtp.feature - 5.4.2.RELEASE-201311281027 Eclipse startup command=-os linux -ws gtk -arch x86_64 -showsplash -launcher /home/tom.mccobb/MyEclipse/MyEclipse 10/myeclipse -name Myeclipse --launcher.library /home/tom.mccobb/MyEclipse/MyEclipse 10//../Common/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505/eclipse_1407.so -startup /home/tom.mccobb/MyEclipse/MyEclipse 10//../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.overrideVmargs -exitdata 28001 -install /home/tom.mccobb/MyEclipse/MyEclipse 10 -configuration /home/tom.mccobb/MyEclipse/MyEclipse 10/configuration -vm /home/tom.mccobb/MyEclipse/Common/binary/com.sun.java.jdk.linux.x86_64_1.6.0.013/bin/java
support-tonyKeymasterTom,
Now I’ve used release 10.7 instead of 2014, I can replicate the problem.
Unfortunately, there are a number of problems connected to Maven and deployment, in that release. If 2014 is causing problems on Fedora 19 or 20, can you try release 2013? The problems were fixed in that release.
MyEclipse 2013 is still available on our download page.
Tom McCobbParticipantIt seems that the F20 kernel has been updated to a point that ME2014/Kepler will run, so I will try it on that machine again.
At least I will know not to expect it to work in ME10.7.
I will let you know.
support-tonyKeymasterTom,
Thanks for the information. I hope the 2014 experience is better than your 10.7 experience!
Please keep us updated, if you have a chance.
Tom McCobbParticipantThis is actually working worse in 2014. When I try to deploy, either exploded or packaged, the deployment fails almost immediately and the only thing making it into the archive/folder is the META-INF folder and MANIFEST.MF inside the folder.
There is a yellow triangle showing in the deployment window, and the message is that the project has changed and needs to be refreshed.
This is what I see in the log file, an error that MANIFEST.MF cannot be found for the various WARS in the EAR:
!ENTRY com.genuitec.eclipse.ast.deploy.core 4 0 2014-01-23 14:14:43.462
!MESSAGE Cannot find the file /home/tom.mccobb/Workspaces/FAC_MVN_FACULTY/target/m2e-jee/web-resources/META-INF/MANIFEST.MF in the file system. Make sure the file exists and try deployment again
!STACK 0
java.lang.Exception: Cannot find the file /home/tom.mccobb/Workspaces/FAC_MVN_FACULTY/target/m2e-jee/web-resources/META-INF/MANIFEST.MF in the file system. Make sure the file exists and try deployment again
at com.genuitec.eclipse.core.GenuitecCoreException.<init>(GenuitecCoreException.java:71)
at com.genuitec.eclipse.core.GenuitecCoreException.<init>(GenuitecCoreException.java:46)
at com.genuitec.eclipse.ast.deploy.core.assembly.FlatComponentDeployer.copyFile(FlatComponentDeployer.java:224)
at com.genuitec.eclipse.ast.deploy.core.assembly.FlatComponentDeployer.saveManifest(FlatComponentDeployer.java:306)
at com.genuitec.eclipse.ast.deploy.core.assembly.FlatComponentDeployer.createDeployment(FlatComponentDeployer.java:62)
at com.genuitec.eclipse.ast.deploy.core.assembly.FlatComponentDeployer.saveExploded(FlatComponentDeployer.java:145)
at com.genuitec.eclipse.ast.deploy.core.assembly.FlatComponentDeployer.saveChildModules(FlatComponentDeployer.java:126)
at com.genuitec.eclipse.ast.deploy.core.assembly.FlatComponentDeployer.createDeployment(FlatComponentDeployer.java:63)
at com.genuitec.eclipse.ast.deploy.core.assembly.DeploymentAssemblyHelper.resyncAll(DeploymentAssemblyHelper.java:242)
at com.genuitec.eclipse.ast.deploy.core.Deployment.resyncAll(Deployment.java:681)
at com.genuitec.eclipse.ast.deploy.core.Deployment.deploy(Deployment.java:805)
at com.genuitec.eclipse.ast.deploy.core.jobs.AddDeploymentJob.deploy(AddDeploymentJob.java:51)
at com.genuitec.eclipse.ast.deploy.core.jobs.AddDeploymentJob.run(AddDeploymentJob.java:67)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)In the package explorer I can see the MANIFEST.MF in the target folder right where it belongs. When I go to look on the disk however the file is not there. But if I refresh the project (F5) in the explorer, the file shows up on the disk. After I have done that for all three WAR’s, then i can deploy and it appears to succeed.
It is still not working though. In ME10.7 the entire class folder hierarchy was missing from WEB-INF/classes. Now the folder hierarchy is there, but the folders are all empty.
This is still only a problem in the derivative projects. The main project with the core code files works fine.
support-tonyKeymasterTom,
Thanks for the update, even though the news is bad! That is a very strange behavior of refresh as it is meant to work the other way round (changes made outside of MyEclipse made visible inside MyEclipse via a refresh).
As I mentioned previously, I was unable to replicate your problem in MyEclipse 2014. If you can create a simple project with dependency that exhibits this issue, and attach them, we may be able to replicate it here. In the meantime, I’ll try to set up a Fedora system that matches yours, in case that is causing the problem, somehow.
-
AuthorPosts