You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by zuxiong lin <li...@gmail.com> on 2011/12/20 07:15:56 UTC

Anyone help me about classpathContainers in maven-eclipse-plugin?

I have a webapp project under eclipse by my colleage. So it has WEB-INF/lib
directory
and dependcy packages are put in by my colleage.

Now I have create a pom file for the project. But import the maven project
, I also need to configurate the classpath for it through
project -->properties-->Java Build Path-->Libraries --> Add Library --> Web
App Libraries-->...
Why does it still need the classpath ???How do I fix it ?
By the way , we use eclipse-jee version 3.7 SR1

like :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<projectnatures>
<projectnature>org.eclipse.jdt.core.javanature</projectnature>
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
<projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>
<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
</projectnatures>
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
<!--
<classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer>
-->
<classpathContainer>org.eclipse.jst.j2ee.internal.web.container</classpathContainer>
<!--
<classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer>
-->
</classpathContainers>
</configuration>
</plugin>
More details in the POM of attachment.
Thanks.

Re: Anyone help me about classpathContainers in maven-eclipse-plugin?

Posted by zuxiong lin <li...@gmail.com>.
<classpathContainer>org.eclipse.jst.j2ee.internal.web.container</classpathContainer>
is not right???
<wtpapplicationxml>true</wtpapplicationxml> is not right , too??
But I donot get any useful details in
http://maven.apache.org/plugins/maven-eclipse-plugin/wtp.html

2011/12/20 Barrie Treloar <ba...@gmail.com>

> On Tue, Dec 20, 2011 at 4:45 PM, zuxiong lin <li...@gmail.com>
> wrote:
> > I have a webapp project under eclipse by my colleage. So it has
> WEB-INF/lib
> > directory
> > and dependcy packages are put in by my colleage.
> >
> > Now I have create a pom file for the project. But import the maven
> project ,
> > I also need to configurate the classpath for it through
> > project -->properties-->Java Build Path-->Libraries --> Add Library -->
> Web
> > App Libraries-->...
> > Why does it still need the classpath ???How do I fix it ?
> > By the way , we use eclipse-jee version 3.7 SR1
> >
> > like :
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-eclipse-plugin</artifactId>
> > <version>2.8</version>
> > <configuration>
> > <wtpmanifest>true</wtpmanifest>
> > <wtpapplicationxml>true</wtpapplicationxml>
> > <projectnatures>
> > <projectnature>org.eclipse.jdt.core.javanature</projectnature>
> >
> <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
> > <projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>
> >
> <projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
> > </projectnatures>
> > <classpathContainers>
> >
> <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
> > <!--
> >
> <classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer>
> > -->
> >
> <classpathContainer>org.eclipse.jst.j2ee.internal.web.container</classpathContainer>
> > <!--
> >
> <classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer>
> > -->
> > </classpathContainers>
> > </configuration>
> > </plugin>
>
> I dont see a WTP specification in your plugin settings.
> http://maven.apache.org/plugins/maven-eclipse-plugin/wtp.html
>
> I dont use WTP so you will have to read the docs and do some fiddling.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Anyone help me about classpathContainers in maven-eclipse-plugin?

Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Dec 20, 2011 at 4:45 PM, zuxiong lin <li...@gmail.com> wrote:
> I have a webapp project under eclipse by my colleage. So it has WEB-INF/lib
> directory
> and dependcy packages are put in by my colleage.
>
> Now I have create a pom file for the project. But import the maven project ,
> I also need to configurate the classpath for it through
> project -->properties-->Java Build Path-->Libraries --> Add Library --> Web
> App Libraries-->...
> Why does it still need the classpath ???How do I fix it ?
> By the way , we use eclipse-jee version 3.7 SR1
>
> like :
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-eclipse-plugin</artifactId>
> <version>2.8</version>
> <configuration>
> <wtpmanifest>true</wtpmanifest>
> <wtpapplicationxml>true</wtpapplicationxml>
> <projectnatures>
> <projectnature>org.eclipse.jdt.core.javanature</projectnature>
> <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
> <projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>
> <projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
> </projectnatures>
> <classpathContainers>
> <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
> <!--
> <classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer>
> -->
> <classpathContainer>org.eclipse.jst.j2ee.internal.web.container</classpathContainer>
> <!--
> <classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer>
> -->
> </classpathContainers>
> </configuration>
> </plugin>

I dont see a WTP specification in your plugin settings.
http://maven.apache.org/plugins/maven-eclipse-plugin/wtp.html

I dont use WTP so you will have to read the docs and do some fiddling.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fwd: Anyone help me about classpathContainers in maven-eclipse-plugin?

Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Dec 21, 2011 at 7:37 PM, zuxiong lin <li...@gmail.com> wrote:
> So, your advice is that change the packages layout to use pom dependency
> manager ,
> delete all the packages from WEB-INF/lib directory and add the dependency
> element?

Read the freely available books at http://maven.apache.org/articles.html

There you will learn for yourself what the best practice is, far
better than can be simply said in a reply in an email.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Fwd: Anyone help me about classpathContainers in maven-eclipse-plugin?

Posted by zuxiong lin <li...@gmail.com>.
So, your advice is that change the packages layout to use pom dependency
manager ,
delete all the packages from WEB-INF/lib directory and add the dependency
element?


2011/12/21 Jörg Schaible <Jo...@scalaris.com>

> zuxiong lin wrote:
>
> > ---------- Forwarded message ----------
> > From: zuxiong lin <li...@gmail.com>
> > Date: 2011/12/20
> > Subject: Anyone help me about classpathContainers in
> maven-eclipse-plugin?
> > To: users@maven.apache.org
> >
> >
> > I have a webapp project under eclipse by my colleage. So it has
> > WEB-INF/lib directory
> > and dependcy packages are put in by my colleage.
> >
> > Now I have create a pom file for the project. But import the maven
> project
> > , I also need to configurate the classpath for it through
> > project -->properties-->Java Build Path-->Libraries --> Add Library -->
> > Web App Libraries-->...
> > Why does it still need the classpath ???How do I fix it ?
>
> [snip]
>
> Maybe simply by *not* using Maven? Maven is not just another build tool, it
> represents also project standards (e.g. for directory layout) and a special
> work flow.
>
> You simply try to change most of this decreasing the value of Maven
> significantly. What you try to would be even for Maven experts annoying and
> error-prone and will give the users a very bad experience.
>
> Either you change the way you work and adjust your project to Maven
> standards or Maven is simply not your tool.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Fwd: Anyone help me about classpathContainers in maven-eclipse-plugin?

Posted by Jörg Schaible <Jo...@scalaris.com>.
zuxiong lin wrote:

> ---------- Forwarded message ----------
> From: zuxiong lin <li...@gmail.com>
> Date: 2011/12/20
> Subject: Anyone help me about classpathContainers in maven-eclipse-plugin?
> To: users@maven.apache.org
> 
> 
> I have a webapp project under eclipse by my colleage. So it has
> WEB-INF/lib directory
> and dependcy packages are put in by my colleage.
> 
> Now I have create a pom file for the project. But import the maven project
> , I also need to configurate the classpath for it through
> project -->properties-->Java Build Path-->Libraries --> Add Library -->
> Web App Libraries-->...
> Why does it still need the classpath ???How do I fix it ?

[snip]

Maybe simply by *not* using Maven? Maven is not just another build tool, it 
represents also project standards (e.g. for directory layout) and a special 
work flow.

You simply try to change most of this decreasing the value of Maven 
significantly. What you try to would be even for Maven experts annoying and 
error-prone and will give the users a very bad experience.

Either you change the way you work and adjust your project to Maven 
standards or Maven is simply not your tool.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Fwd: Anyone help me about classpathContainers in maven-eclipse-plugin?

Posted by zuxiong lin <li...@gmail.com>.
---------- Forwarded message ----------
From: zuxiong lin <li...@gmail.com>
Date: 2011/12/20
Subject: Anyone help me about classpathContainers in maven-eclipse-plugin?
To: users@maven.apache.org


I have a webapp project under eclipse by my colleage. So it has WEB-INF/lib
directory
and dependcy packages are put in by my colleage.

Now I have create a pom file for the project. But import the maven project
, I also need to configurate the classpath for it through
project -->properties-->Java Build Path-->Libraries --> Add Library --> Web
App Libraries-->...
Why does it still need the classpath ???How do I fix it ?
By the way , we use eclipse-jee version 3.7 SR1

like :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
 <configuration>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
 <projectnatures>
<projectnature>org.eclipse.jdt.core.javanature</projectnature>

<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
<projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>

<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
</projectnatures>
 <classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
 <!--
<classpathContainer>org.eclipse.jst.j2ee.internal.web.container/artifact</classpathContainer>
-->
<classpathContainer>org.eclipse.jst.j2ee.internal.web.container</classpathContainer>
 <!--
<classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer>
-->
</classpathContainers>
 </configuration>
</plugin>
More details in the POM of attachment.
Thanks.