|
Re: Dynamic Web Project referencing some other projects [message #548925 is a reply to message #548840] |
Fri, 23 July 2010 13:07 |
|
On 7/23/2010 3:21 AM, Leon wrote:
> I have a Dynamic Web Project which uses some other projects in the
> workspace as library.
> What I want is when I deploy the project to the server, as a war file,
> the referenced project should be included as a jar file in the
> /WEB-INF/lib directory.
>
> So I configured the packaging structure using "Web Deployment Assembly"
> configurator, I added the referenced project, defined the source, and
> deploy path.
>
> But somehow, when it is built and packaged, the war file does include a
> "SampleReferencedProject.jar" in the WEB-INF/lib directory (which can be
> seen when I extract it), but its size is 0.
>
> I couldn't figure out what should I do.
>
> [snip]
>
> Any help is appreciated.
Do Web App Libraries show up in the Properties -> Java EE Module
Dependencies list? If so, make certain this one
(SampleReferencedProject.jar) is checked?
Just a wild guess.
Russ Bateman
|
|
|
Re: Dynamic Web Project referencing some other projects [message #548927 is a reply to message #548840] |
Fri, 23 July 2010 13:11 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
On 7/23/2010 5:21 AM, Leon wrote:
> I have a Dynamic Web Project which uses some other projects in the
> workspace as library.
> What I want is when I deploy the project to the server, as a war file,
> the referenced project should be included as a jar file in the
> /WEB-INF/lib directory.
>
> So I configured the packaging structure using "Web Deployment Assembly"
> configurator, I added the referenced project, defined the source, and
> deploy path.
>
> But somehow, when it is built and packaged, the war file does include a
> "SampleReferencedProject.jar" in the WEB-INF/lib directory (which can be
> seen when I extract it), but its size is 0.
>
> I couldn't figure out what should I do.
>
> The org.eclipse.wst.common.component file of the web project is as the
> following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="cg-ibs-admin">
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
> <wb-resource deploy-path="/WEB-INF/classes"
> source-path="/src/main/resources"/>
> <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
> <dependent-module deploy-path="/WEB-INF/lib"
> handle="module:/resource/cg-ibs-apps-lib/cg-ibs-apps-lib">
> <dependency-type>uses</dependency-type>
> </dependent-module>
> <property name="context-root" value="/admin"/>
> <property name="java-output-path" value="/cg-ibs-admin/target/classes"/>
> </wb-module>
> </project-modules>
>
> and the .classpath is the following:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> <classpathentry kind="src" output="target/classes" path="src/main/java"/>
> <classpathentry excluding="**" kind="src" output="target/classes"
> path="src/main/resources"/>
> <classpathentry kind="src" output="target/test-classes"
> path="src/test/java"/>
> <classpathentry kind="con"
> path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
> <attributes>
> <attribute name="org.eclipse.jst.component.dependency"
> value="/WEB-INF/lib"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="con"
> path=" org.eclipse.jst.server.core.container/org.eclipse.jst.server .generic.runtimeTarget/JBoss
> v4.2">
> <attributes>
> <attribute name="owner.project.facets" value="jst.utility"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="con"
> path=" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.inte rnal.debug.ui.launcher.StandardVMType/JavaSE-1.6 ">
>
> <attributes>
> <attribute name="owner.project.facets" value="java"/>
> </attributes>
> </classpathentry>
> <classpathentry kind="con"
> path="org.eclipse.jst.j2ee.internal.web.container"/>
> <classpathentry kind="con"
> path="org.eclipse.jst.j2ee.internal.module.container"/>
> <classpathentry kind="output" path="target/classes"/>
> </classpath>
>
> Any help is appreciated.
>
Since your web project isn't directly referencing a
SampleReferencedProject project, like it would when just using WTP, it
implies that maven is trying, but not quite handling this correctly. I
don't know enough about how maven is supposed to work to say more. You
may wish to pursue this on a maven forum or newsgroup.
Cheers,
Larry
|
|
|
Re: Dynamic Web Project referencing some other projects [message #641934 is a reply to message #548927] |
Mon, 29 November 2010 10:08 |
|
Hi, All!
Btw, I have rather similar problem when dynamic project references another pojo java project (at both project deps and at deployment assembly), and there are not problems at compilation time, but when running web project on server (tomcat 6.0, eclipse built-in view servers) - then I have exception NoClassDefFoundError.
I checked Deployment Assembly (eclipse 3.6 helios). And I found that definition of dependency I add (jar of pojo project to put under WEB-INF/lib) disappeared every time I enter this dialog.
But what is interesting - .settings\org.eclipse.wst.common.component of web project contains this definition..
Please help in this.
Your Zmicer
www.zmicer.com
|
|
|
Powered by
FUDForum. Page generated in 0.03687 seconds