You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Amit Khurana <ak...@askjeeves.com> on 2006/02/22 21:03:57 UTC
how to create web project for eclipse using maven eclipse plugin
Hi Guys
I am using maven eclipse plugin to create projects compatible for
eclipse. It works fine for simple java projects but not for web project.
Running mvn eclipse:eclipse for web project creates following enteries
in .project
<projectDescription>
<name>search-app</name>
<comment/>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</name
>
<arguments/>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments/>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDepend
encyResolver</name>
<arguments/>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
</natures>
</projectDescription>
whereas a web project created using eclipse have this in .project file
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>test-web</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</na
me>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.etools.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.ibm.sse.model.structuredbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
As per Maven Eclipse documenttation
page(http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.h
tml) we can pass verious parameters but I did not find how to pass those
while running mvn eclipse:eclipse command. I created project.properties
file in dir where .pom exists with following enteries.
maven.eclipse.projectnatures=com.genuitec.eclipse.j2eedt.core.webnature,
org.eclipse.jdt.core.javanature,org.eclipse.wst.common.modulecore.Module
CoreNature
maven.eclipse.buildcommands=com.genuitec.eclipse.j2eedt.core.WebClasspat
hBuilder,org.eclipse.jdt.core.javabuilder,com.genuitec.eclipse.j2eedt.co
re.J2EEProjectValidator,com.genuitec.eclipse.j2eedt.core.DeploymentDescr
iptorValidator,com.ibm.etools.validation.validationbuilder,com.ibm.sse.m
odel.structuredbuilder
But it's not working. Any idea?
Thanks In advance
Amit
Re: how to create web project for eclipse using maven eclipse plugin
Posted by Srepfler Srgjan <sr...@lnksystem.com>.
Tom Joad wrote:
> Hello,
> What is WTP switch?
> I'm not a developper , i know a little about eclipse to achieve the
> migration of our project
> from no maven management project to maven management project. I use maven m2.x
> I give you how i proceed.
> I checkout the project from cvs and disconnect it.
> I prepare the project pomfile
> I delete WEB-INF/lib.
> I close the project under eclipse.
>
>
http://maven.apache.org/plugins/maven-eclipse-plugin/
http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: how to create web project for eclipse using maven eclipse plugin
Posted by Tom Joad <tj...@gmail.com>.
Hello,
What is WTP switch?
I'm not a developper , i know a little about eclipse to achieve the
migration of our project
from no maven management project to maven management project. I use maven m2.x
I give you how i proceed.
I checkout the project from cvs and disconnect it.
I prepare the project pomfile
I delete WEB-INF/lib.
I close the project under eclipse.
On commandline
I run mvn -e -X eclipse:clean to delete all WTP files.
I run mvn -e -X eclipse:add-maven-repo to add variabe M2_REPO for the
project variable classpaths.
Maven downloads all my dependencies
And finally I run mvn -e -X eclipse:eclipse. maven creates all wtp files.
Open the project under eclipse and go to java build path to export all
M2_REPO dependencies , used by eclipse to deploy the project.
You can run maven goals with eclipse externaltools
http://maven.apache.org/guides/mini/guide-ide-eclipse.html
Wish it helps.
Tom
2006/2/24, Srepfler Srgjan <sr...@lnksystem.com>:
> Tom Joad wrote:
> > Hello
> > when you say it's not working what do you mean?
> > I suppose you use maven1.x
> > For me the problem was eclipse did not build my project. But maven
> > packaging works fine.
> > I use maven2.x but i think that you must set MAVEN_REPO as eclipse
> > variable of your local repository before running eclipse:eclipse.
> > Tom
> >
> Are you using the WTP switch?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: how to create web project for eclipse using maven eclipse plugin
Posted by Srepfler Srgjan <sr...@lnksystem.com>.
Tom Joad wrote:
> Hello
> when you say it's not working what do you mean?
> I suppose you use maven1.x
> For me the problem was eclipse did not build my project. But maven
> packaging works fine.
> I use maven2.x but i think that you must set MAVEN_REPO as eclipse
> variable of your local repository before running eclipse:eclipse.
> Tom
>
Are you using the WTP switch?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: how to create web project for eclipse using maven eclipse plugin
Posted by Tom Joad <tj...@gmail.com>.
Hello
when you say it's not working what do you mean?
I suppose you use maven1.x
For me the problem was eclipse did not build my project. But maven
packaging works fine.
I use maven2.x but i think that you must set MAVEN_REPO as eclipse
variable of your local repository before running eclipse:eclipse.
Tom
2006/2/22, Amit Khurana <ak...@askjeeves.com>:
> Hi Guys
>
> I am using maven eclipse plugin to create projects compatible for
> eclipse. It works fine for simple java projects but not for web project.
>
> Running mvn eclipse:eclipse for web project creates following enteries
> in .project
>
> <projectDescription>
> <name>search-app</name>
> <comment/>
> <projects/>
> <buildSpec>
> <buildCommand>
>
> <name>org.eclipse.wst.common.modulecore.ComponentStructuralBuilder</name
> >
> <arguments/>
> </buildCommand>
> <buildCommand>
> <name>org.eclipse.jdt.core.javabuilder</name>
> <arguments/>
> </buildCommand>
> <buildCommand>
> <name>org.eclipse.wst.validation.validationbuilder</name>
> <arguments/>
> </buildCommand>
> <buildCommand>
>
> <name>org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDepend
> encyResolver</name>
> <arguments/>
> </buildCommand>
> </buildSpec>
> <natures>
> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
> <nature>org.eclipse.jdt.core.javanature</nature>
> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
> </natures>
> </projectDescription>
>
> whereas a web project created using eclipse have this in .project file
>
> <?xml version="1.0" encoding="UTF-8"?>
> <projectDescription>
> <name>test-web</name>
> <comment></comment>
> <projects>
> </projects>
> <buildSpec>
> <buildCommand>
> <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
> <buildCommand>
> <name>org.eclipse.jdt.core.javabuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
> <buildCommand>
> <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
> <arguments>
> </arguments>
> </buildCommand>
> <buildCommand>
>
> <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</na
> me>
> <arguments>
> </arguments>
> </buildCommand>
> <buildCommand>
> <name>com.ibm.etools.validation.validationbuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
> <buildCommand>
> <name>com.ibm.sse.model.structuredbuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
> </buildSpec>
> <natures>
> <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
> <nature>org.eclipse.jdt.core.javanature</nature>
> </natures>
> </projectDescription>
>
> As per Maven Eclipse documenttation
> page(http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.h
> tml) we can pass verious parameters but I did not find how to pass those
> while running mvn eclipse:eclipse command. I created project.properties
> file in dir where .pom exists with following enteries.
>
> maven.eclipse.projectnatures=com.genuitec.eclipse.j2eedt.core.webnature,
> org.eclipse.jdt.core.javanature,org.eclipse.wst.common.modulecore.Module
> CoreNature
> maven.eclipse.buildcommands=com.genuitec.eclipse.j2eedt.core.WebClasspat
> hBuilder,org.eclipse.jdt.core.javabuilder,com.genuitec.eclipse.j2eedt.co
> re.J2EEProjectValidator,com.genuitec.eclipse.j2eedt.core.DeploymentDescr
> iptorValidator,com.ibm.etools.validation.validationbuilder,com.ibm.sse.m
> odel.structuredbuilder
>
>
> But it's not working. Any idea?
>
> Thanks In advance
> Amit
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org