For three days i have read every website related with RAD and maven. To be honest there is nothing you can find with this issue so i’ve just decided to post this entry.
1. Install GEF on RAD
Location: http://download.eclipse.org/tools/gef/updates/releases/
2. Install m2eclipse on RAD
http://m2eclipse.sonatype.org/sites/m2e
3. Create a folder on your workspace named MavenRadParent
4. Create the Folder and File Structure like the picture below
5. MavenRadProject (The Parent Directory)
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>montoya-mr</groupId>
<artifactId>montoya-mr-parent</artifactId>
<name>Montota Maven Rad Integration Demo</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>mr-jar</module>
<module>mr-web</module>
<module>mr-ear</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
6. mr-jar 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>montoya-mr</groupId>
<artifactId>mr-jar</artifactId>
<name>Maven Rad Integration Project Jar POM</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>montoya-mr</groupId>
<artifactId>montoya-mr-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<projectNameTemplate>[artifactId]</projectNameTemplate>
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
</classpathContainers>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
<manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF</manifest>
</configuration>
</plugin>
</plugins>
</build>
</project>
7. mr-web 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>montoya-mr</groupId>
<artifactId>mr-web</artifactId>
<name>Maven Rad Integration Project Web POM</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>montoya-mr</groupId>
<artifactId>montoya-mr-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<projectNameTemplate>[artifactId]</projectNameTemplate>
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
</classpathContainers>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
<manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF</manifest>
</configuration>
</plugin>
</plugins>
</build>
</project>
8. mr-ear 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>texan.texan-wsmaven</groupId>
<artifactId>mr-ear</artifactId>
<name>Maven Rad Integration Project Ear POM</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>ear</packaging>
<parent>
<groupId>montoya-mr</groupId>
<artifactId>montoya-mr-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>montoya-mr</groupId>
<artifactId>mr-web</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>2.0</wtpversion>
<additionalBuildcommands>
<buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>
<buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
</additionalProjectnatures>
<additionalProjectFacets>
<jst.ear>1.6</jst.ear>
<com.ibm.websphere.extended.web>7.0</com.ibm.websphere.extended.web>
<com.ibm.websphere.coexistence.web>7.0</com.ibm.websphere.coexistence.web>
</additionalProjectFacets>
</configuration>
</plugin>
</plugins>
</build>
</project>
9. Open the project from RAD as an existing maven project
Hiç yorum yok:
Yorum Gönder