Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » WTP 0.71 and Maven2
WTP 0.71 and Maven2 [message #145105] Tue, 25 October 2005 11:16 Go to next message
Eclipse UserFriend
Originally posted by: brian.bonner.nospam.paraware.com

Is there anyway to ensure that the M2_REPO variables that are included
as part of the build path are also included in the WEBAPP Library
variables that are used at runtime?

When I try to run a project (Run As -> Run on Server), the WEB-INF/lib
directory in the .deployables directory is empty and I get
NoClassDefFound messages.

Under the package explorer, Web App Libraries build path is empty.


I'm modifying the classpath and project natures using eclipse:eclipse
with the following build configuration in Maven2:

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<classpathContainers>
<java.lang.String>Using RAD6</java.lang.String>

<java.lang.String> org.eclipse.jst.server.core.container/org.eclipse.jst.server .tomcat.runtimeTarget/Apache
Tomcat v5.0</java.lang.String>

<java.lang.String>org.eclipse.jst.j2ee.internal.web.container/test1 </java.lang.String>
</classpathContainers>
<buildcommands>

<java.lang.String> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder </java.lang.String>

<java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String >

<java.lang.String>org.eclipse.wst.validation.validationbuilder </java.lang.String>

<java.lang.String> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder DependencyResolver </java.lang.String>

<java.lang.String>org.eclipse.wst.common.modulecore.DependencyGraphBuilder </java.lang.String>
</buildcommands>
<projectnatures>

<java.lang.String>org.eclipse.jem.workbench.JavaEMFNature</java.lang.String >
<java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String >

<java.lang.String>org.eclipse.wst.common.modulecore.ModuleCoreNature </java.lang.String>
</projectnatures>
</configuration>
</plugin>
</plugins>

Any suggestions would be helpful.

Thanks.

Brian
Re: WTP 0.71 and Maven2 [message #145118 is a reply to message #145105] Tue, 25 October 2005 11:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thisisnot.mymail.com

Can it be that the WebApp Library are not variables but have to be
actual files in the WEB-INF/lib directory?

Brian Bonner wrote:
> Is there anyway to ensure that the M2_REPO variables that are included
> as part of the build path are also included in the WEBAPP Library
> variables that are used at runtime?
>
> When I try to run a project (Run As -> Run on Server), the WEB-INF/lib
> directory in the .deployables directory is empty and I get
> NoClassDefFound messages.
>
> Under the package explorer, Web App Libraries build path is empty.
>
>
> I'm modifying the classpath and project natures using eclipse:eclipse
> with the following build configuration in Maven2:
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-eclipse-plugin</artifactId>
> <configuration>
> <classpathContainers>
> <java.lang.String>Using
> RAD6</java.lang.String>
>
> <java.lang.String> org.eclipse.jst.server.core.container/org.eclipse.jst.server .tomcat.runtimeTarget/Apache
> Tomcat v5.0</java.lang.String>
>
> <java.lang.String>org.eclipse.jst.j2ee.internal.web.container/test1 </java.lang.String>
>
> </classpathContainers>
> <buildcommands>
>
> <java.lang.String> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder </java.lang.String>
>
>
> <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String >
>
> <java.lang.String>org.eclipse.wst.validation.validationbuilder </java.lang.String>
>
>
> <java.lang.String> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder DependencyResolver </java.lang.String>
>
>
> <java.lang.String>org.eclipse.wst.common.modulecore.DependencyGraphBuilder </java.lang.String>
>
> </buildcommands>
> <projectnatures>
>
> <java.lang.String>org.eclipse.jem.workbench.JavaEMFNature</java.lang.String >
>
>
> <java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String >
>
> <java.lang.String>org.eclipse.wst.common.modulecore.ModuleCoreNature </java.lang.String>
>
> </projectnatures>
> </configuration>
> </plugin>
> </plugins>
>
> Any suggestions would be helpful.
>
> Thanks.
>
> Brian
Re: WTP 0.71 and Maven2 [message #145122 is a reply to message #145118] Tue, 25 October 2005 11:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brian.bonner.nospam.paraware.com

I just checked the Maven-Eclipse-Plugin for M2 and it looks like the
plugin *should* handle dependencies that are specified with a variable
in the addDependency() method.

If anyone has any tips, they'd be appreciated :)

Brian

Srgjan Srepfler wrote:
> Can it be that the WebApp Library are not variables but have to be
> actual files in the WEB-INF/lib directory?
>
> Brian Bonner wrote:
>> Is there anyway to ensure that the M2_REPO variables that are included
>> as part of the build path are also included in the WEBAPP Library
>> variables that are used at runtime?
>>
>> When I try to run a project (Run As -> Run on Server), the WEB-INF/lib
>> directory in the .deployables directory is empty and I get
>> NoClassDefFound messages.
>>
>> Under the package explorer, Web App Libraries build path is empty.
>>
>>
>> I'm modifying the classpath and project natures using eclipse:eclipse
>> with the following build configuration in Maven2:
>>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-eclipse-plugin</artifactId>
>> <configuration>
>> <classpathContainers>
>> <java.lang.String>Using
>> RAD6</java.lang.String>
>>
>> <java.lang.String> org.eclipse.jst.server.core.container/org.eclipse.jst.server .tomcat.runtimeTarget/Apache
>> Tomcat v5.0</java.lang.String>
>>
>> <java.lang.String>org.eclipse.jst.j2ee.internal.web.container/test1 </java.lang.String>
>>
>> </classpathContainers>
>> <buildcommands>
>>
>> <java.lang.String> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder </java.lang.String>
>>
>>
>> <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String >
>>
>> <java.lang.String>org.eclipse.wst.validation.validationbuilder </java.lang.String>
>>
>>
>> <java.lang.String> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder DependencyResolver </java.lang.String>
>>
>>
>> <java.lang.String>org.eclipse.wst.common.modulecore.DependencyGraphBuilder </java.lang.String>
>>
>> </buildcommands>
>> <projectnatures>
>>
>> <java.lang.String>org.eclipse.jem.workbench.JavaEMFNature</java.lang.String >
>>
>>
>> <java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String >
>>
>> <java.lang.String>org.eclipse.wst.common.modulecore.ModuleCoreNature </java.lang.String>
>>
>> </projectnatures>
>> </configuration>
>> </plugin>
>> </plugins>
>>
>> Any suggestions would be helpful.
>>
>> Thanks.
>>
>> Brian
Re: WTP 0.71 and Maven2 [message #145126 is a reply to message #145122] Tue, 25 October 2005 14:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thisisnot.mymail.com

I thought the maven-eclipse-plugin just exports a maven project to a
eclipse project, however I don't think it still has a notion of the
project structure of projects that are created with the WTP.
There sure is a lot of opportunity for development in that direction and
if the eclipse foundation can dedicate a person to develop a WTP -
maven2, maven2 - WTP plugin, that would be just great. I myself had to
manually take a WTP project (ejb module, web module and ear) and try to
use a template from the maven guys (it got recently converted to a maven
archetype and is in svn) to make a maven project but in the end its
organization is completely different from WTP project. The main pom.xml
is outside the project themselves (and with subclipse you version the
entire project), lib's don't get in the project themselves but are
recuperated from m2's cache (I don't think WTP let's you do that),
resources are put in different places, etc. etc.
This is not a rant about WTP, but we are seeing more and more often
issues on packaging, and I bet you want to hear from guys that develop
extension plugins and integration tools like ant, maven 1/2 etc.
If WTP is not 1.0 there is a reason and I don't think it should be
called 1.0 until this kind of issues get cleared once and for all.



Brian Bonner wrote:
> I just checked the Maven-Eclipse-Plugin for M2 and it looks like the
> plugin *should* handle dependencies that are specified with a variable
> in the addDependency() method.
>
> If anyone has any tips, they'd be appreciated :)
>
> Brian
>
Re: WTP 0.71 and Maven2 [message #145136 is a reply to message #145105] Tue, 25 October 2005 17:50 Go to previous messageGo to next message
Eclipse UserFriend
Brian Bonner wrote:
> Is there anyway to ensure that the M2_REPO variables that are included
> as part of the build path are also included in the WEBAPP Library
> variables that are used at runtime?
>
> When I try to run a project (Run As -> Run on Server), the WEB-INF/lib
> directory in the .deployables directory is empty and I get
> NoClassDefFound messages.
>
> Under the package explorer, Web App Libraries build path is empty.
>
>
> I'm modifying the classpath and project natures using eclipse:eclipse
> with the following build configuration in Maven2:
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-eclipse-plugin</artifactId>
> <configuration>
> <classpathContainers>
> <java.lang.String>Using
> RAD6</java.lang.String>
>
> <java.lang.String> org.eclipse.jst.server.core.container/org.eclipse.jst.server .tomcat.runtimeTarget/Apache
> Tomcat v5.0</java.lang.String>
>
> <java.lang.String>org.eclipse.jst.j2ee.internal.web.container/test1 </java.lang.String>
>
> </classpathContainers>
> <buildcommands>
>
> <java.lang.String> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder </java.lang.String>
>
>
> <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String >
>
> <java.lang.String>org.eclipse.wst.validation.validationbuilder </java.lang.String>
>
>
> <java.lang.String> org.eclipse.wst.common.modulecore.ComponentStructuralBuilder DependencyResolver </java.lang.String>
>
>
> <java.lang.String>org.eclipse.wst.common.modulecore.DependencyGraphBuilder </java.lang.String>
>
> </buildcommands>
> <projectnatures>
>
> <java.lang.String>org.eclipse.jem.workbench.JavaEMFNature</java.lang.String >
>
>
> <java.lang.String>org.eclipse.jdt.core.javanature</java.lang.String >
>
> <java.lang.String>org.eclipse.wst.common.modulecore.ModuleCoreNature </java.lang.String>
>
> </projectnatures>
> </configuration>
> </plugin>
> </plugins>
>
> Any suggestions would be helpful.
>
> Thanks.
>
> Brian
We've hit this problem as well. What we'd like to have is classpath
variables for WTP web apps, like you can for normal java projects. This
has been an issue for us as we'd like to not store libs in CVS, but have
them liked in via the M2_REPO classpath variable.

Anyone know whether this will be added to a future WTP or eclipse?
Re: WTP 0.71 and Maven2 [message #145140 is a reply to message #145136] Tue, 25 October 2005 20:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: patrick.roumanoff.gmail.com

Darren Bell wrote:

> Brian Bonner wrote:
>> Is there anyway to ensure that the M2_REPO variables that are included
>> as part of the build path are also included in the WEBAPP Library
>> variables that are used at runtime?
>>
>> Under the package explorer, Web App Libraries build path is empty.

> We've hit this problem as well. What we'd like to have is classpath
> variables for WTP web apps, like you can for normal java projects. This
> has been an issue for us as we'd like to not store libs in CVS, but have
> them liked in via the M2_REPO classpath variable.

> Anyone know whether this will be added to a future WTP or eclipse?

From what I understand, it is already there:
Manually edit the .wtpmodule file and add

<dependent-module deploy-path="/WEB-INF/lib"
handle=" module:/classpath/var/M2_REPO/[groupId]/jars/[artifactId]-[v ersion].jar "/>

for all maven dependencies.

I am pretty sure the m2 eclipse plugin can be patched to generate those
lines for you.

cheers,

Patrick
Re: WTP 0.71 and Maven2 [message #145213 is a reply to message #145140] Wed, 26 October 2005 16:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brian.bonner.nospam.paraware.com

I posted a patch to Maven-Eclipse-Plugin to "fix" this problem. It does
create the necessary dependencies once you apply the patch.

Brian
Patrick Roumanoff wrote:
> Darren Bell wrote:
>
>> Brian Bonner wrote:
>>> Is there anyway to ensure that the M2_REPO variables that are
>>> included as part of the build path are also included in the WEBAPP
>>> Library variables that are used at runtime?
>>>
>>> Under the package explorer, Web App Libraries build path is empty.
>
>> We've hit this problem as well. What we'd like to have is classpath
>> variables for WTP web apps, like you can for normal java projects.
>> This has been an issue for us as we'd like to not store libs in CVS,
>> but have them liked in via the M2_REPO classpath variable.
>
>> Anyone know whether this will be added to a future WTP or eclipse?
>
> From what I understand, it is already there:
> Manually edit the .wtpmodule file and add
>
> <dependent-module deploy-path="/WEB-INF/lib"
> handle=" module:/classpath/var/M2_REPO/[groupId]/jars/[artifactId]-[v ersion].jar "/>
>
>
> for all maven dependencies.
>
> I am pretty sure the m2 eclipse plugin can be patched to generate those
> lines for you.
>
> cheers,
>
> Patrick
>
Re: WTP 0.71 and Maven2 [message #145601 is a reply to message #145213] Sat, 29 October 2005 19:10 Go to previous message
Eclipse UserFriend
Brian Bonner wrote:
> I posted a patch to Maven-Eclipse-Plugin to "fix" this problem. It does
> create the necessary dependencies once you apply the patch.
>
> Brian
> Patrick Roumanoff wrote:
>
>> Darren Bell wrote:
>>
>>> Brian Bonner wrote:
>>>
>>>> Is there anyway to ensure that the M2_REPO variables that are
>>>> included as part of the build path are also included in the WEBAPP
>>>> Library variables that are used at runtime?
>>>>
>>>> Under the package explorer, Web App Libraries build path is empty.
>>
>>
>>> We've hit this problem as well. What we'd like to have is classpath
>>> variables for WTP web apps, like you can for normal java projects.
>>> This has been an issue for us as we'd like to not store libs in CVS,
>>> but have them liked in via the M2_REPO classpath variable.
>>
>>
>>> Anyone know whether this will be added to a future WTP or eclipse?
>>
>>
>> From what I understand, it is already there:
>> Manually edit the .wtpmodule file and add
>>
>> <dependent-module deploy-path="/WEB-INF/lib"
>> handle=" module:/classpath/var/M2_REPO/[groupId]/jars/[artifactId]-[v ersion].jar "/>
>>
>>
>> for all maven dependencies.
>>
>> I am pretty sure the m2 eclipse plugin can be patched to generate
>> those lines for you.
>>
>> cheers,
>>
>> Patrick
>>
Great!! I'll give this a go at work :)
Thanks all.
Previous Topic:Deploy Web Service Project
Next Topic:WTP 0.7, Eclipse 3.2 current beta, and activation.jar error
Goto Forum:
  


Current Time: Fri Apr 18 06:31:57 EDT 2025

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

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

Back to the top