Hello there:
I've been using maven-eclipse-plugin v2.4 (a customized version that I
compiled for version'ed project support). It's been working well. Can you
share your EAR's and WAR/JAR pom.xml? I'm not sure why you are having this
issue.
One thing to be careful, for RAD/Eclipse and WTP 1.5, is to use
"eclipse:rad" mojo of maven-eclipse-plugin. When you generate your WTP
resources, issue "mvn eclipse:rad" command. I've noticed that using the
default "eclipse:eclipse" or "eclipse:m2eclipse" mojo won't do a good job of
generating WTP resources that are RAD/Eclipse friendly.
Later on, through RAD/Eclipse, using M2Eclipse plugin, I then enable the
"Dependancy Management" for all the projects, which gives me the Maven
Library container. You have to ensure to perform "Update Source" path
through M2Eclipse plugin after you enable "Dependancy Management" for a
project.
I must admit that I have to tweak the component files for some JAR projects
but that's because developers aren't coding the pom.xml properly. Other
than that it seems to work well.
I'm attaching maven-eclipse-plugin for my project. Hope it helps..
The root pom.xml contains the following maven-eclipse-plugin config:
<!-- maven-eclipse-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<manifest>
${basedir}/src/main/resources/META-INF/MANIFEST.MF
</manifest>
<addVersionToProjectName>true</addVersionToProjectName>
<useProjectReferences>false</useProjectReferences>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>1.5</wtpversion>
<additionalBuildcommands>
<buildcommand>com.ibm.etools.common.migration.MigrationBuilder</buildcommand>
<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
<buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand>
<buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
<projectnature>org.eclipse.jdt.core.javanature</projectnature>
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
<projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>
</additionalProjectnatures>
<!-- should be enabled only for WARs and EJB-JAR modules
<classpathContainers>
<classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer>
</classpathContainers>
-->
</configuration>
</plugin>
<!-- maven-eclipse-plugin -->
My EAR pom.xml is as follows
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<!-- <Class-Path/>-->
</manifestEntries>
<manifest>
<!-- Let Maven generate Class-Path from listed
dependencies -->
<addClasspath>false</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<!-- maven-eclipse-plugin override for EAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalBuildcommands>
<buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand>
<buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
</additionalProjectnatures>
</configuration>
</plugin>
<!-- maven-eclipse-plugin -->
WAR pom.xml:
<!-- maven-eclipse-plugin overrides for WAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<classpathContainers>
<classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer>
<classpathContainer>org.eclipse.jst.j2ee.internal.web.container</classpathContainer>
</classpathContainers>
</configuration>
</plugin>
<!-- maven-eclipse-plugin -->
Regards
--
Salman Moghal
----- Original Message -----
From: "qnob" <[EMAIL PROTECTED]>
To: <users@maven.apache.org>
Sent: Wednesday, March 12, 2008 12:43 PM
Subject: Re: maven-eclipse-plugin 2.4 & versioned projects
Hi again,
here my plugin configuration. Actually, it's the example given by the post
of Salman. I've added new version of the eclipse plugin and uncommented a
part I didn't understand if need it. Though, I tried versioned projects
too.
:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.5-SNAPSHOT</version>
<configuration>
<!-- addVersionToProjectName>true</addVersionToProjectName>
<useProjectReferences>false</useProjectReferences-->
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>1.5</wtpversion>
<additionalBuildcommands>
<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
<buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand>
<buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
</additionalProjectnatures>
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
<classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer>
</classpathContainers>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<displayName>${project.name}-${project.version}</displayName>
<description>
${project.description}
</description>
<version>1.4</version>
<modules>
<webModule>
<groupId>sample-ear</groupId>
<artifactId>mca-sample-web</artifactId>
<contextRoot>mca-sample-web</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
--
View this message in context:
http://www.nabble.com/maven-eclipse-plugin-2.4---versioned-projects-tp15699476s177p16007425.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]