maven最基本的建项目和运行

建一个空的普通app项目
mvn archetype:create -B -DgroupId=net.jwsz.snap -DartifactId=snap

/*
//Create Maven Applaction Project
mvn archetype:create -B -DgroupId=net.jwsz.snap -artifactId=snap
//Run Maven Application
mvn clean compile exec:java -Dexec.mainClass="net.jwsz.snap.App"
//
mvn exec:java -Dexec.mainClass="net.jwsz.snap.App" -Dexec.args="arg0 arg1 arg2"
*/

建一个空的webapp项目struts+spring
mvn archetype:create -DgroupId=me.cjx.$(CurSel).action -DartifactId=$(CurSel) -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-starter -DarchetypeVersion=2.0.11.2-SNAPSHOT -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository


/*
//Create Maven WebApp Project
mvn archetype:create -DgroupId=net.jwsz.webapp -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
//pom.xml补
  <plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.6</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
//Run Maven WebApp
mvn clean compile jetty:run
*/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值