在<mirrors>元素里面加一个<mirror>配置
<mirror>
<id>aliyun</id>
<mirrorOf>centeral</mirrorOf>
<name>aliyun mirror</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
在<profiles>中加一个<profile>配置
<profile>
<id>aliyun</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>aliyun</id>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun</id>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>jdk-1.7</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.7</jdk>
</activation>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
</properties>
</profile>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
<plugin>
或
mvn eclipse:myeclipse
mvn help:describe -Dplugin=war或者mvn help:describe -Dplugin=org.apache.maven.plugins:maven-war-plugin或者
mvn help:describe -DgroupId=org.apache.maven.plugins -DartifactId=maven-war-plugin
//修改tomcat的context path
Tomcat自身可以通过修改配置文件server.xml,在和之间插入如下语句:
- 1
对应maven的tomcat插件弄法如下:
org.apache.tomcat.maven tomcat7-maven-plugin 2.0-SNAPSHOT ${context.path} http://localhost:8080/manager/text tomcat7 admin admin