블로그 이미지
Max.

calendar

        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  

Notice

2011.12.21 12:13 개발관련
Spring Roo 1.2.0.Release 를 이용한 Maven Multi Project에 대한 예시이다.

1) 실행 스크립트는 대충 아래와 같다.

E:\Projects\Test>mkdir max-roo

E:\Projects\Test>cd max-roo

E:\Projects\Test\max-roo>roo

roo> project --topLevelPackage net.max --packaging POM --projectName max-parent

roo> module create --moduleName max-core --topLevelPackage net.max.core --packaging JAR

max-core roo> module focus --moduleName ~

roo> module create --moduleName max-biz --topLevelPackage net.max.biz --packaging JAR

max-biz roo> module focus --moduleName ~

roo> module create --moduleName max-web --topLevelPackage net.max.web --packaging WAR

max-web roo> module focus --moduleName ~

roo> perform eclipse

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] max-core
[INFO] max-biz
[INFO] max-web
[INFO] max-parent
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building max-core 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-eclipse-plugin:2.7:clean (default-cli) @ max-core ---
[INFO] Deleting file: .project
[INFO] Deleting file: .classpath
[INFO] Deleting file: .wtpmodules
[INFO] Deleting file: .component
[INFO] Deleting file: org.eclipse.wst.common.component
[INFO] Deleting file: org.eclipse.wst.common.project.facet.core.xml
[INFO] Deleting file: org.eclipse.jdt.core.prefs
[INFO] Deleting file: org.eclipse.ajdt.ui.prefs
[INFO]
[INFO] >>> maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-core >>>
[INFO]
[INFO] --- aspectj-maven-plugin:1.2:compile (default) @ max-core ---
[INFO]
[INFO] <<< maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-core <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-core ---
[INFO] Adding support for WTP version 2.0.
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Wrote settings to E:\Projects\Test\max-roo\max-core\.settings\org.eclipse.jdt.c
[INFO] Wrote Eclipse project for "max-core" to E:\Projects\Test\max-roo\max-core.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building max-biz 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-eclipse-plugin:2.7:clean (default-cli) @ max-biz ---
[INFO] Deleting file: .project
[INFO] Deleting file: .classpath
[INFO] Deleting file: .wtpmodules
[INFO] Deleting file: .component
[INFO] Deleting file: org.eclipse.wst.common.component
[INFO] Deleting file: org.eclipse.wst.common.project.facet.core.xml
[INFO] Deleting file: org.eclipse.jdt.core.prefs
[INFO] Deleting file: org.eclipse.ajdt.ui.prefs
[INFO]
[INFO] >>> maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-biz >>>
[INFO]
[INFO] --- aspectj-maven-plugin:1.2:compile (default) @ max-biz ---
[INFO]
[INFO] <<< maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-biz <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-biz ---
[INFO] Adding support for WTP version 2.0.
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Wrote settings to E:\Projects\Test\max-roo\max-biz\.settings\org.eclipse.jdt.co
[INFO] Wrote Eclipse project for "max-biz" to E:\Projects\Test\max-roo\max-biz.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building max-web 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-eclipse-plugin:2.7:clean (default-cli) @ max-web ---
[INFO] Deleting file: .project
[INFO] Deleting file: .classpath
[INFO] Deleting file: .wtpmodules
[INFO] Deleting file: .component
[INFO] Deleting file: org.eclipse.wst.common.component
[INFO] Deleting file: org.eclipse.wst.common.project.facet.core.xml
[INFO] Deleting file: org.eclipse.jdt.core.prefs
[INFO] Deleting file: org.eclipse.ajdt.ui.prefs
[INFO]
[INFO] >>> maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-web >>>
[INFO]
[INFO] --- aspectj-maven-plugin:1.2:compile (default) @ max-web ---
[INFO]
[INFO] <<< maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-web <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-web ---
[INFO] Adding support for WTP version 2.0.
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] Wrote settings to E:\Projects\Test\max-roo\max-web\.settings\org.eclipse.jdt.co
[INFO] Wrote Eclipse project for "max-web" to E:\Projects\Test\max-roo\max-web.
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building max-parent 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-eclipse-plugin:2.7:clean (default-cli) @ max-parent ---
[INFO]
[INFO] >>> maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-parent >>>
[INFO]
[INFO] <<< maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-parent <<<
[INFO]
[INFO] --- maven-eclipse-plugin:2.7:eclipse (default-cli) @ max-parent ---
[INFO] Not running eclipse plugin goal for pom project
[INFO] Adding support for WTP version 2.0.
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] max-core .......................................... SUCCESS [1.701s]
[INFO] max-biz ........................................... SUCCESS [0.063s]
[INFO] max-web ........................................... SUCCESS [0.060s]
[INFO] max-parent ........................................ SUCCESS [0.273s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.569s
[INFO] Finished at: Wed Dec 21 12:04:25 KST 2011
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------
roo> roo> q

2) 생성된 소스코드를 import하면 이클립스에서 잘 인식된다. 아래 소스코드 첨부
저작자 표시
신고
posted by Max.

티스토리 툴바