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