Subject: What have been done?
Author: Alex_Raj
In response to: Maven -- Import Java project into Eclipse IDE
Posted on: 03/27/2012 07:43:08 PM
Two files have been created for your project:
.project
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MyProject</name>
<comment>NO_M2ECLIPSE_SUPPORT: Project files created
with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
.classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
</classpath>
It should be noted a classpath variable M2_REPO has been referenced which must be declared in your Eclipse project build path.
>
> On 03/27/2012 07:21:46 PM
Alex_Raj wrote:
Once you have a Maven generated project, how can you convert it into Eclipse IDE?
Type in the following command where your poject with the pom.xml resides:
Output:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MyProject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-eclipse-plugin:2.9:eclipse (default-cli) @ MyProject >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.9:eclipse (default-cli) @ MyProject <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ MyProject ---
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAIN
ER
[INFO] Not writing settings - defaults suffice
[INFO] Wrote Eclipse project for "MyProject" to C:\HelloWorld\Maven\MyFirstProje
ct\MyProject.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.402s
[INFO] Finished at: Tue Mar 27 17:16:21 PDT 2012
[INFO] Final Memory: 7M/124M
[INFO] ------------------------------------------------------------------------
References: