MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
stevemccann
Post subject: tomcat add deployment not copying dependent jars  PostPosted: Nov 12, 2008 - 02:21 PM
Registered Member
Registered Member


Joined: Sep 26, 2006
Posts: 9

I 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
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject: RE: tomcat add deployment not copying dependent jars  PostPosted: Nov 12, 2008 - 05:16 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Steve,

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).

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
stevemccann
Post subject: RE: tomcat add deployment not copying dependent jars  PostPosted: Nov 12, 2008 - 06:21 PM
Registered Member
Registered Member


Joined: Sep 26, 2006
Posts: 9

Riyad,
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
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject: RE: tomcat add deployment not copying dependent jars  PostPosted: Nov 13, 2008 - 03:26 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

That'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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
stevemccann
Post subject: RE: tomcat add deployment not copying dependent jars  PostPosted: Nov 13, 2008 - 02:12 PM
Registered Member
Registered Member


Joined: Sep 26, 2006
Posts: 9

Riyad,
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
 
 View user's profile Send private message  
Reply with quote Back to top
stevemccann
Post subject: RE: tomcat add deployment not copying dependent jars  PostPosted: Nov 13, 2008 - 02:38 PM
Registered Member
Registered Member


Joined: Sep 26, 2006
Posts: 9

Couple 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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject: RE: tomcat add deployment not copying dependent jars  PostPosted: Nov 13, 2008 - 03:40 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Steve,

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?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
stevemccann
Post subject: RE: tomcat add deployment not copying dependent jars  PostPosted: Nov 13, 2008 - 08:48 PM
Registered Member
Registered Member


Joined: Sep 26, 2006
Posts: 9

Well...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
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 14, 2008 - 08:47 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Steve,

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
stevemccann
Post subject:   PostPosted: Nov 17, 2008 - 08:23 PM
Registered Member
Registered Member


Joined: Sep 26, 2006
Posts: 9

Riyad,
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
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 18, 2008 - 11:40 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Hmmm... 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?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
stevemccann
Post subject:   PostPosted: Nov 19, 2008 - 06:25 PM
Registered Member
Registered Member


Joined: Sep 26, 2006
Posts: 9

Riyad,
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
 
 View user's profile Send private message  
Reply with quote Back to top
stevemccann
Post subject:   PostPosted: Nov 19, 2008 - 06:55 PM
Registered Member
Registered Member


Joined: Sep 26, 2006
Posts: 9

Riyad,
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
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 19, 2008 - 09:40 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Yes, I do believe if a builder fails all processing is stopped.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits