首页 > 代码库 > 修改maven一更新jre就变成1.5版本

修改maven一更新jre就变成1.5版本

<build>        <plugins>            <plugin>                <groupId>org.apache.maven.plugins</groupId>                <artifactId>maven-compiler-plugin</artifactId>                <version>2.1</version>                <configuration>                    <source>1.7</source>                    <target>1.7</target>                </configuration>            </plugin>        </plugins>    </build>

除此之外还消除了failOnMissingWebXml错误

附阿里的settings.xml

<?xml version="1.0" encoding="utf-8"?><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="         http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">    <!--本地仓库。该值表示构建系统本地仓库的路径。其默认值为~/.m2/repository。 -->    <localRepository>E:\softs\maven\repository</localRepository>   <!--Maven是否需要和用户交互以获得输入。如果Maven需要和用户交互以获得输入,则设置成true,反之则应为false。默认为true。   <interactiveMode>true</interactiveMode>   --><mirrors>    <mirror>      <id>alimaven</id>      <name>aliyun maven</name>      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>      <mirrorOf>central</mirrorOf>            </mirror>  </mirrors>          <profiles>   <profile>                <id>jdk-1.6</id>                            <activation>                    <jdk>1.6</jdk>                </activation>                            <repositories>                    <repository>                        <id>nexus</id>                        <name>local private nexus</name>                        <url>http://maven.oschina.net/content/groups/public/</url>                        <releases>                            <enabled>true</enabled>                        </releases>                        <snapshots>                            <enabled>false</enabled>                        </snapshots>                    </repository>                </repositories>                <pluginRepositories>                    <pluginRepository>                        <id>nexus</id>                        <name>local private nexus</name>                        <url>http://maven.oschina.net/content/groups/public/</url>                        <releases>                            <enabled>true</enabled>                        </releases>                        <snapshots>                            <enabled>false</enabled>                        </snapshots>                    </pluginRepository>                </pluginRepositories>            </profile>  </profiles>    <!-- -->    <activeProfiles>     <activeProfile>nexus</activeProfile>   </activeProfiles> </settings>

 

修改maven一更新jre就变成1.5版本