Maven jars but publish locally but are copied into exported war file [message #224978] |
Fri, 12 December 2008 13:14  |
Eclipse User |
|
|
|
Hello,
I'm having a problem with the latest WTP in Ganymede and an existing
project originally set up with a previous version.
The project refers to jars in a local Maven repository via extensions of a
"MAVEN_REPO" classpath variable as follows:
<classpathentry exported="true" kind="var"
path="MAVEN_REPO/spring/jars/spring-1.2.6.jar">
<attributes>
<attribute name="org.eclipse.jst.component.dependency"
value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
MAVEN_REPO is set to C:/java/maven-repository in Preferences -> Java ->
Build Path -> Classpath Variables.
I have ticked all the checkboxes in the project's "Java EE Module
Dependencies" tab but the jars are not copied to
" workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp 0\wtpwebapps\pa-web\WEB-INF\lib ".
It seems like configuration for what get published locally has changed
between WTP versions from ${project}\.settings\.component to
${project}\.classpath (as shown above). I have removed the old entries
from the .component file. Are there any other old artifacts lurking around
that might mess this up?
I found this wiki page, but it seems like overkill to have to define a
"User Library" just to get the jars deployed locally given that they are
already on the project's build path:
http://wiki.eclipse.org/ClasspathEntriesPublishExportSupport
If I "Export..." as "web/WAR File" the jars are included in the war file
in the right place.
Has anyone had the same problem? Any ideas on how to resolve the problem?
My set up is:
Eclipse 3.4.1 (and the WTP that comes with it)
Maven 1.0.2
Tomcat 6.0.18
JDK 1.6.0_10
Thanks.
Ashley
|
|
|
|
Re: Maven jars but publish locally but are copied into exported war file [message #225001 is a reply to message #224986] |
Fri, 12 December 2008 14:18   |
Eclipse User |
|
|
|
Ashley Collins wrote:
> Meant to say "Maven jars _not_ published locally but are copied into
> exported war file"
>
I created an equivalent entry for a jar in a test dynamic web project
and the jar published fine. You can try right-clicking on the server
and selecting "Clean..." which will avoid "delta" publishing (in case
the delta is being computed incorrectly) and force a full publish. I
doubt this will fix it, but it's not clear what is different that is
causing the jar not to publish for you.
Cheers,
Larry
|
|
|
|
|
Re: Maven jars but publish locally but are copied into exported war file [message #225025 is a reply to message #225001] |
Fri, 12 December 2008 14:33   |
Eclipse User |
|
|
|
Larry Isaacs wrote:
> Ashley Collins wrote:
>> Meant to say "Maven jars _not_ published locally but are copied into
>> exported war file"
>>
> I created an equivalent entry for a jar in a test dynamic web project
> and the jar published fine. You can try right-clicking on the server
> and selecting "Clean..." which will avoid "delta" publishing (in case
> the delta is being computed incorrectly) and force a full publish. I
> doubt this will fix it, but it's not clear what is different that is
> causing the jar not to publish for you.
> Cheers,
> Larry
I've tried creating a project from scratch and adding a jar based on
MAVEN_REPO and it is indeed published (as you said).
I'll see what differences I can find between the two project's configs.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04783 seconds