Salman Moghal wrote: > > > Hello Salman!
Finally, I've got it working, almost! So, I want to share it...it's gonna be a bit long, though! I just explain the steps how it's working over here. I've been using Subclipse with the newly released M2 Plugin (Version 0.9.0). Actually, the old M2 version 0.0.12 works too, however, I wanted to stay on the edge. I also use the M2-Subclipse integration, that generates the basic Eclipse files (.classpath, .project with the maven builders, dependencies and staff) on checking out the sources. So, I checkout the parent project in a first step and then checkout the it's submodules in another step. Therefore, eclipse will see a flat project layout, actually, I've been using 2 hierarchies (Parent-Modules), since I want to use the release-plugin on the multiproject. To make the maven multiprojects working properly in eclipse, I add "../" to the module path in the parent pom. So the M2 Plugin sees the submodule checkout in the workspace. All right! I've got a working workspace with m2 and multiprojects. Next, I apply eclipse:eclipse on the multiproject and generate the WTP descriptors. My own compiled snapshot version of maven-eclipse-plugin 2.5 works much better, than the old stable release. Though, this version as a sort of linking issue and doesn't work with the new M2 eclipse plugin. So, I fire this goal in the command prompt. With eclipse:m2eclipse I didn't success, by the way, since it doesn't generate the "depended-module"s as required. There is still one little problem with the generated application.xml, though! There is something wrong with the xml namespace definition: <application id="Application_ID" xmlns:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"> Websphere rejects to deploy this descriptor. While following definition generated with the ear-plugin is working perfectly: <application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4"> I'll create a bug report afterwards. That's it, everything is working ;-} And you gave me the right hint. Thank you very much. By the way, I also tried versioned projects - it's working too. But I think I don't need. Thanks again. Kuno Here are my poms: [Parent POM] <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>sample-ear</groupId> <artifactId>mca-sample</artifactId> <packaging>pom</packaging> <version>0.0.1-SNAPSHOT</version> <name>mca-sample</name> <description></description> <modules> <module>mca-sample-ear</module> <module>mca-sample-web</module> <module>mca-sample-compo1</module> </modules> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <configuration> <preparationGoals>clean install</preparationGoals> </configuration> </plugin> <plugin> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-sources</id> <phase>verify</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> [/Parent POM] [EAR POM] <?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>sample-ear</groupId> <artifactId>mca-sample</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <groupId>sample-ear</groupId> <artifactId>mca-sample-ear</artifactId> <packaging>ear</packaging> <version>0.0.1-SNAPSHOT</version> <name>mca-sample-ear</name> <description/> <dependencies> <dependency> <groupId>sample-ear</groupId> <artifactId>mca-sample-web</artifactId> <version>0.0.1-SNAPSHOT</version> <type>war</type> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.7</version> </dependency> <dependency> <groupId>sample-ear</groupId> <artifactId>mca-sample-compo1</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <!-- version>2.5-SNAPSHOT</version--> <configuration> <!-- don't use project references> <addVersionToProjectName>true</addVersionToProjectName> <useProjectReferences>false</useProjectReferences--> <!-- use project references--> <addVersionToProjectName>false</addVersionToProjectName> <useProjectReferences>true</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> </build> </project> [/EAR POM] [WAR POM] <?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>sample-ear</groupId> <artifactId>mca-sample</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <groupId>sample-ear</groupId> <artifactId>mca-sample-web</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>mca-sample-web</name> <description /> <dependencies> <dependency> <groupId>javax</groupId> <artifactId>j2ee</artifactId> <version>1.4.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.7</version> <scope>provided</scope> </dependency> <dependency> <groupId>sample-ear</groupId> <artifactId>mca-sample-compo1</artifactId> <version>0.0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <!-- don't use project references <addVersionToProjectName>true</addVersionToProjectName> <useProjectReferences>false</useProjectReferences--> <!-- use project references--> <addVersionToProjectName>false</addVersionToProjectName> <useProjectReferences>true</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>com.ibm.etools.links.management.linksbuilder</buildcommand> <buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand> <buildcommand>com.ibm.etools.webtools.validation.jsp.jspcompilationbuilder</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> <classpathContainers> <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer> <classpathContainer>org.eclipse.jst.j2ee.internal.module.container</classpathContainer> <classpathContainer>org.eclipse.jst.j2ee.internal.web.container</classpathContainer> </classpathContainers> </configuration> </plugin> </plugins> </build> </project> [/WAR POM] [JAR POM] <?xml version="1.0" encoding="UTF-8"?> <project> <parent> <artifactId>mca-sample</artifactId> <groupId>sample-ear</groupId> <version>0.0.1-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>sample-ear</groupId> <artifactId>mca-sample-compo1</artifactId> <name>mca-sample-compo1</name> <version>0.0.1-SNAPSHOT</version> <description/> <dependencies> <dependency> <groupId>jdom</groupId> <artifactId>jdom</artifactId> <version>1.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <!-- version>2.5-SNAPSHOT</version--> <configuration> <!-- don't use project references> <addVersionToProjectName>true</addVersionToProjectName> <useProjectReferences>false</useProjectReferences--> <!-- use project references--> <addVersionToProjectName>false</addVersionToProjectName> <useProjectReferences>true</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> </plugins> </build> </project> [/JAR POM] -- View this message in context: http://www.nabble.com/maven-eclipse-plugin-2.4---versioned-projects-tp15699476s177p16048111.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]