Maven이 작성한 프로젝트 구조를 이클립스에서 인식할 수 있도록 하는 방법
1. Maven에서 생성한 프로젝트 구조를 이클립스에 인식할 수 있도록 필요한 파일을 작성합니다.
-> C:\Users\kdyoung\web\mywebapp>mvn eclipse:eclipse
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Not writing settings - defaults suffice
[INFO] Wrote Eclipse project for "mywebapp" to C:\Users\kdyoung\web\mywebapp.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
-> C:\Users\kdyoung\web\mywebapp>dir
2013-08-17 오후 12:41 466 .classpath
2013-08-17 오후 12:41 457 .project
2013-08-17 오후 12:17 1,197 pom.xml
2013-08-17 오전 10:19 <DIR> src
2013-08-17 오후 12:03 <DIR> target
C:\Users\kdyoung\web\mywebapp\.classpath
------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>
------------------------------------------------------------------------------------------------------------
C:\Users\kdyoung\web\mywebapp\.project
------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>mywebapp</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>
------------------------------------------------------------------------------------------------------------
<projectDescription>
<name>mywebapp</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>
------------------------------------------------------------------------------------------------------------
이클립스(예, http://ftp.daum.net/eclipse//technology/epp/downloads/release/kepler/R/eclipse-jee-kepler-R-win32.zip)를 실행합니다.
2. 이클립스에서 C:\Users\kdyoung\web\mywebapp 프로젝트를 Import합니다.
3. 이클립스에서 Maven 빌드를 수행합니다.
Trouble Shooting
M2_REPO 변수
설치된 JRE
디폴트 JRE
JDK Compliance
...
댓글 없음:
댓글 쓰기