- This topic has 13 replies, 2 voices, and was last updated 16 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
stevemccannMemberI read in another post:
MyEclipse will not copy jars to project folder. But the jars will be deployed to a server if the dependency scope is appropriate.What is the appropriate dependency scope?
I am using 7.0 M2 with Tomcat 6.x. The dependent jar files have a Scope of compile and my target is exploded war.
When I use “Add Deployment” the dependent jars are not copied into the web project WEB-INF/lib directory. Any help would be appreciated.
Thanks
Riyad KallaMemberSteve,
Sorry for the confusion. MyEclipse deployment works as it always has, it won’t actually parse libraries or scopes out of your pom.xml. So if you have a library that needs to get deployed with your project, you’ll want it on your build path and then open up your project properties and go under MyEclipse > Web and then the Deployment tab to make sure those settings are turned on to deploy those libraries (by default they will be).
stevemccannMemberRiyad,
Thank you for the response. The jar files are on my build path. They are included via the Maven Dependencies library. Also, the Deployment tab does have the four items checked under Library Deployment Policies. Am I missing something else?Thanks,
steve
Riyad KallaMemberThat’s exactly right. Are you using the toolbar button to create the deployment or the Server View to create the deployment? Are you creating a packaged or exploded deployment?
Could you pop open Window > Show View > Other > General > Errors, and hit the red X to clear them, then redo the deployment and see if an exception gets logged? Maybe it’s hitting a library it doesn’t like and dying mid-deployment.
stevemccannMemberRiyad,
I am using the Server View and it is an exploded deployment. All other files, other than the dependent jars, deploy to the right location.There are no errors in the Error view when the application is deployed. One oddity I have noticed is that my deployments have a tendency to disappear from the Server View when I start MyEclipse and I have to redeploy them. I am using Tomcat 6.0 with a 1.5 JDK.
Thanks,
steve
stevemccannMemberCouple of other notes:
1. I tried deploying from the toolbar button to both my installed tomcat and the MyEclipse tomcat. Still nothing in the lib directory.
2. I am using Vista.
Riyad KallaMemberSteve,
This has to be a config thing… how are those libraries added to your build path? Are they inside the Workspace somewhere and you used Add JAR to add them, or are they external to the workspace and you used Add External JAR to add them?
Could you post a screenshot of your Libraries preference page for me from your project so I could take a look and could you enumerate the JARs that are missing from the final deployment?
stevemccannMemberWell…other than not being able to figure out how to attach a screenshot…
The Libraries preference page has two entries. JRE System Library and Maven Dependencies. The Maven Dependencies expands and shows all the dependent jars which are stored in a local repository, external to the workspace. None of these jars end up in the WEB-INF/lib directory. Is that enough information?
Thanks,
steve
Riyad KallaMemberSteve,
I’ve created an example Maven/Web Project with Struts and Hibernate capabilities on it to simulate what you might have setup, I’ve also included the project and 2 screenshots outlining the settings for the project for you to double-check against (just to see if we are missing some minor differences).
Could you try and download this project and let the indexes update (e.g. maven download the libraries and resolve them) then try and deploy it and see if it works? When I deploy it I get a 13mb packaged deployment or exploded.
Attachments:
You must be logged in to view attached files.
stevemccannMemberRiyad,
The test project you put together works. The dependent libraries show up in the web-inf/lib directory. I compared the screenshots and they are the same as my project.Are there other files I can check for differences?
Thanks,
steve
Riyad KallaMemberHmmm… I’m really at a loss what it could be here. You positive you don’t have *any* libraries marked with little warning exclamation points on them in the Libraries tab right?
What does your .project file look like?
stevemccannMemberRiyad,
No warning exclamation points.Here is my .project file:
<?xml version=”1.0″ encoding=”UTF-8″?>
<projectDescription>
<name>com.elasticpath.search</name>
<comment>Elastic Path Search Web Application</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sourceforge.pmd.runtime.pmdBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
<nature>net.sourceforge.pmd.runtime.pmdNature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
</natures>
</projectDescription>Thanks,
steve
stevemccannMemberRiyad,
I think it might be a problem with one or more of the buildCommands prior to the org.maven.ide.eclipse.maven2Builder. Just to make sure I don’t spin my wheels
hours on end; if a builder in the chain fails, does the build process stop?Thanks,
steve
Riyad KallaMemberYes, I do believe if a builder fails all processing is stopped.
-
AuthorPosts