<profiles>
<profile>
<id>windows</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<toolsjar>${java.home}/../lib/tools.jar</toolsjar>
</properties>
</profile>
<profile>
<id>osx</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<properties>
<toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
</properties>
</profile>
</profiles>
2012年1月30日 星期一
mac maven tools.jar dependency
2011年1月3日 星期一
upgrade maven to mac
snow leopard 預設就安裝 maven 2.2.1 version
install in /usr/share/maven
how to upgrade.
1. 備份 old version maven
>cd /usr/shall
>sudo mv maven maven221
2. download maven (ex. 3.0.1)
3. >sudo cp -R /Users/xxxx/apache-maven-3.0.1 maven
4. check version
>mvn -version
install in /usr/share/maven
how to upgrade.
1. 備份 old version maven
>cd /usr/shall
>sudo mv maven maven221
2. download maven (ex. 3.0.1)
3. >sudo cp -R /Users/xxxx/apache-maven-3.0.1 maven
4. check version
>mvn -version
2010年6月29日 星期二
maven multi module
1. create parent pom
$ mvn archetype:create -DgroupId=test.project -DartifactId=test-parent
$ cd test-parent
$ rm -r src
$ vi pom.xml
修改<packaging>jar</pachaging> 為 <packaging>pom</pachaging>
2. create module
test-parent$ mvn archetype:create -DgroupId=test.project.core -DartifactId=test-core
test-parent$ mvn archetype:create -DgroupId=test.project.web -DartifactId=test-web -DarchetypeArtifactId=maven-archetype-webapp
test-parent$ cd test-web
test-parent$ vi pom.xml
在 <build> 內加上
<plugins>
<plugin>
<groupid>org.mortbay.jetty</groupid>
<artifactid>maven-jetty-plugin</artifactid>
</plugin>
</plugins>
test-parent$ mvn jetty:run
3. open browser
http://localhost:8080/test-web/
$ mvn archetype:create -DgroupId=test.project -DartifactId=test-parent
$ cd test-parent
$ rm -r src
$ vi pom.xml
修改<packaging>jar</pachaging> 為 <packaging>pom</pachaging>
2. create module
test-parent$ mvn archetype:create -DgroupId=test.project.core -DartifactId=test-core
test-parent$ mvn archetype:create -DgroupId=test.project.web -DartifactId=test-web -DarchetypeArtifactId=maven-archetype-webapp
test-parent$ cd test-web
test-parent$ vi pom.xml
在 <build> 內加上
<plugins>
<plugin>
<groupid>org.mortbay.jetty</groupid>
<artifactid>maven-jetty-plugin</artifactid>
</plugin>
</plugins>
test-parent$ mvn jetty:run
3. open browser
http://localhost:8080/test-web/
2010年6月19日 星期六
maven(1)
Maven (http://maven.apache.org/index.html)
maven 是啥? 簡單來說可以稱為一個方便的』 build tool』 幫我們省去很多工作。包含Ant 會做的事: compile, 打包(packing), test(測試) , distribute(發佈)。另外可以跑報表, 生成 web site, 更有彈性的 team work.
透過POM (project object model)設定,就可以方便來管理專案
環境: JDK 6 , maven download(my version is 2.2.1)
下載完之後把 maven 加入path 底下 然後看一下版本
hint: 設定MAVEN_HOME 到你放maven 的位置 , MAVEN_HOME/bin 加入 path
maven 是啥? 簡單來說可以稱為一個方便的』 build tool』 幫我們省去很多工作。包含Ant 會做的事: compile, 打包(packing), test(測試) , distribute(發佈)。另外可以跑報表, 生成 web site, 更有彈性的 team work.
透過POM (project object model)設定,就可以方便來管理專案
環境: JDK 6 , maven download(my version is 2.2.1)
下載完之後把 maven 加入path 底下 然後看一下版本
hint: 設定MAVEN_HOME 到你放maven 的位置 , MAVEN_HOME/bin 加入 path
訂閱:
文章 (Atom)