You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matthijs Wensveen <m....@func.nl> on 2006/05/10 15:41:38 UTC
maven, dependencies and eclipse wtp
Hi,
I have a maven project as an eclipse WTP project. I created the project
with maven-archetype-webapp and then ran the maven eclipse plugin to
convert it to a wtp 1.0 project. This works. I also use the mergere
m2eclipse plugin for eclipse. This also works (hurray!).
When I try to run the project on a server from within eclipse, the
dependencies that would normally be in WEB-INF/lib are not deployed on
the server. I can understand why this is the case since the library is
not in src/main/webapp/WEB-INF/lib. Is there a way to work around this
problem? Packaging the application with mvn package does put the library
in the generated .war file.
Regards,
||
--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 30 2109750
F +31 30 2109751
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven, dependencies and eclipse wtp
Posted by Matthijs Wensveen <m....@func.nl>.
Okay... I got it to work. Great! I didn't realize that you should run
eclipse:eclipse every time a dependency is added to let it update the
.component file.
The only problem I have now, is when I use the m2eclipse plugin for
eclipse. After enabling the Maven2 nature for the project it complains
about duplicate entries.
I think I saw some mails on the list about this, so I'll check those first.
Thanks for your help,
Matthijs
Stephen Duncan wrote:
> Using
> mvn -Dwtpversion=1.0 eclipse:eclipse works for me to get them added
> when deploying within Eclipse using WTP 1.0.2 & Eclipse 3.1.2.
>
> The applicable file that eclipse:eclipse generates is
> .settings/.component
>
> Make sure the dependencies that should be bundled are described in
> that file correctly.
>
> -Stephen
>
> On 5/15/06, Matthijs Wensveen <m....@func.nl> wrote:
>> Fabrizio Giustina wrote:
>> > On 5/10/06, Matthijs Wensveen <m....@func.nl> wrote:
>> >> When I try to run the project on a server from within eclipse, the
>> >> dependencies that would normally be in WEB-INF/lib are not
>> deployed on
>> >> the server.
>> >
>> > They should be deployed, probably you are using a buggy version of
>> > WTP. WTP r7 shipped with this bug, which has also recently been
>> > reintroduced in WTP 1.5 beta builds and fixed again in the latest rc.
>> >
>> > fabrizio
>> >
>>
>> I haven't got it working yet.
>> When I don't use the mergere m2eclipe plugin for eclipse, but only the
>>
>> mvn -Dwtpversion=1.0 eclipse:eclipse
>>
>> goal, the dependencies are added as
>> M2_REPO/commons-collections/commons-collections/2.0/commons-collections-2.0.jar
>>
>> (for example). These are available in the war, but not when I run it on
>> a server from inside eclipse.
>>
>> When I do use the m2eclipse plugin, the dependencies are added to the
>> "Maven2 Dependencies" classpath container, but are not available to the
>> webapp when I run it from inside eclipse. Again, they are added to the
>> war when I package the app with "mvn package"
>>
>> Is there a way to add it to the configuration files manually? Somewhere
>> in the .settings directory maybe?
>>
>> Matthijs
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 30 2109750
F +31 30 2109751
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven, dependencies and eclipse wtp
Posted by Stephen Duncan <st...@gmail.com>.
Using
mvn -Dwtpversion=1.0 eclipse:eclipse works for me to get them added
when deploying within Eclipse using WTP 1.0.2 & Eclipse 3.1.2.
The applicable file that eclipse:eclipse generates is .settings/.component
Make sure the dependencies that should be bundled are described in
that file correctly.
-Stephen
On 5/15/06, Matthijs Wensveen <m....@func.nl> wrote:
> Fabrizio Giustina wrote:
> > On 5/10/06, Matthijs Wensveen <m....@func.nl> wrote:
> >> When I try to run the project on a server from within eclipse, the
> >> dependencies that would normally be in WEB-INF/lib are not deployed on
> >> the server.
> >
> > They should be deployed, probably you are using a buggy version of
> > WTP. WTP r7 shipped with this bug, which has also recently been
> > reintroduced in WTP 1.5 beta builds and fixed again in the latest rc.
> >
> > fabrizio
> >
>
> I haven't got it working yet.
> When I don't use the mergere m2eclipe plugin for eclipse, but only the
>
> mvn -Dwtpversion=1.0 eclipse:eclipse
>
> goal, the dependencies are added as
> M2_REPO/commons-collections/commons-collections/2.0/commons-collections-2.0.jar
> (for example). These are available in the war, but not when I run it on
> a server from inside eclipse.
>
> When I do use the m2eclipse plugin, the dependencies are added to the
> "Maven2 Dependencies" classpath container, but are not available to the
> webapp when I run it from inside eclipse. Again, they are added to the
> war when I package the app with "mvn package"
>
> Is there a way to add it to the configuration files manually? Somewhere
> in the .settings directory maybe?
>
> Matthijs
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Stephen Duncan Jr
www.stephenduncanjr.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Ant tasks executing twice
Posted by Stephen Duncan <st...@gmail.com>.
Possibly this bug: http://jira.codehaus.org/browse/MNG-2221
Which, by the way (to the larger group) is a pretty major bug related
to the regressions fixed in 2.0.4? Can we get this looked at as a
similarly critical bug for a 2.0.5 release?
-Stephen
On 5/15/06, Nick Bolton <nb...@unicon.net> wrote:
> I'm running into an issue with maven-antrun-plugin where it's executing the
> containing tasks twice. Has anyone come across this?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Stephen Duncan Jr
www.stephenduncanjr.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Ant tasks executing twice
Posted by Nick Bolton <nb...@unicon.net>.
I'm running into an issue with maven-antrun-plugin where it's executing the
containing tasks twice. Has anyone come across this?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven, dependencies and eclipse wtp
Posted by Matthijs Wensveen <m....@func.nl>.
Fabrizio Giustina wrote:
> On 5/10/06, Matthijs Wensveen <m....@func.nl> wrote:
>> When I try to run the project on a server from within eclipse, the
>> dependencies that would normally be in WEB-INF/lib are not deployed on
>> the server.
>
> They should be deployed, probably you are using a buggy version of
> WTP. WTP r7 shipped with this bug, which has also recently been
> reintroduced in WTP 1.5 beta builds and fixed again in the latest rc.
>
> fabrizio
>
I haven't got it working yet.
When I don't use the mergere m2eclipe plugin for eclipse, but only the
mvn -Dwtpversion=1.0 eclipse:eclipse
goal, the dependencies are added as
M2_REPO/commons-collections/commons-collections/2.0/commons-collections-2.0.jar
(for example). These are available in the war, but not when I run it on
a server from inside eclipse.
When I do use the m2eclipse plugin, the dependencies are added to the
"Maven2 Dependencies" classpath container, but are not available to the
webapp when I run it from inside eclipse. Again, they are added to the
war when I package the app with "mvn package"
Is there a way to add it to the configuration files manually? Somewhere
in the .settings directory maybe?
Matthijs
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven, dependencies and eclipse wtp
Posted by Matthijs Wensveen <m....@func.nl>.
Fabrizio Giustina wrote:
> On 5/10/06, Matthijs Wensveen <m....@func.nl> wrote:
>> When I try to run the project on a server from within eclipse, the
>> dependencies that would normally be in WEB-INF/lib are not deployed on
>> the server.
>
> They should be deployed, probably you are using a buggy version of
> WTP. WTP r7 shipped with this bug, which has also recently been
> reintroduced in WTP 1.5 beta builds and fixed again in the latest rc.
>
> fabrizio
>
I don't think there is a version of WTP that is not buggy :) but
currently I am using WTP 1.0.2(.v200604280000) on Eclipse 3.1.2.
I know WTP 0.7 had a .deployables directory that the m2eclipse plugin
could utilise for such dependency deployment. WTP 1.0.x does not have
this directory so I don't know how it should work either. I don't know
about WTP 1.5 beta as it works with an unstable eclipse version.
Maybe it's just a question of time then....
Thanks,
Matthijs
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven, dependencies and eclipse wtp
Posted by Fabrizio Giustina <fg...@apache.org>.
On 5/10/06, Matthijs Wensveen <m....@func.nl> wrote:
> When I try to run the project on a server from within eclipse, the
> dependencies that would normally be in WEB-INF/lib are not deployed on
> the server.
They should be deployed, probably you are using a buggy version of
WTP. WTP r7 shipped with this bug, which has also recently been
reintroduced in WTP 1.5 beta builds and fixed again in the latest rc.
fabrizio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org