Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Maven jars but publish locally but are copied into exported war file
Maven jars but publish locally but are copied into exported war file [message #224978] Fri, 12 December 2008 13:14 Go to next message
Ashley Collins is currently offline Ashley CollinsFriend
Messages: 13
Registered: July 2009
Junior Member
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 #224986 is a reply to message #224978] Fri, 12 December 2008 13:15 Go to previous messageGo to next message
Ashley Collins is currently offline Ashley CollinsFriend
Messages: 13
Registered: July 2009
Junior Member
Meant to say "Maven jars _not_ published locally but are copied into
exported war file"
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 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
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
Maven jars _not_ published locally but are copied into exported war file [message #225009 is a reply to message #224986] Fri, 12 December 2008 14:18 Go to previous messageGo to next message
Ashley Collins is currently offline Ashley CollinsFriend
Messages: 13
Registered: July 2009
Junior Member
(updating subject)
Re: Maven jars not published locally but are copied into exported war file [message #225017 is a reply to message #225001] Fri, 12 December 2008 14:26 Go to previous messageGo to next message
Ashley Collins is currently offline Ashley CollinsFriend
Messages: 13
Registered: July 2009
Junior Member
Hi Larry,

Thanks for the response. I've tried a "Clean..." and a republish but the
problem is still there.

Just noticed something. The main project's two project dependencies are
deploy as jars correctly (as specified by the tick boxes on the "Java EE
Module Dependencies" tab. It's only classpath variable based one which
aren't published.

Cheers.
Ashley
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 Go to previous messageGo to next message
Ashley Collins is currently offline Ashley CollinsFriend
Messages: 13
Registered: July 2009
Junior Member
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.
Re: Maven jars but publish locally but are copied into exported war file [message #225033 is a reply to message #225001] Fri, 12 December 2008 15:35 Go to previous message
Ashley Collins is currently offline Ashley CollinsFriend
Messages: 13
Registered: July 2009
Junior Member
I've created an empty Dynamic Web Project and copied the files from
settings. I've upgraded my web.xml to spec 2.5 and everything is now
working.

Must have been my old/inconsistent config. Thanks for the help.
Previous Topic:Tomcat 5.5 startup detection
Next Topic:Jars for running dynamic web app
Goto Forum:
  


Current Time: Fri Apr 19 14:26:01 GMT 2024

Powered by FUDForum. Page generated in 0.02001 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top