<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>
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<lifecycleMappings>
<lifecycleMapping>
<packagingType>war</packagingType>
<lifecycleMappingId>org.eclipse.m2e.jdt.JarLifecycleMapping</lifecycleMappingId>
</lifecycleMapping>
</lifecycleMappings> <pluginExecutions>
<!-- standard maven plugins -->
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<goals>
<goal>testCompile</goal>
<goal>compile</goal>
</goals>
<versionRange>[3.1,)</versionRange>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution> </pluginExecutions> <profiles>
<profile>
<id>downloadSources</id>
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
</profile>
</profiles> <activeProfiles>
<activeProfile>downloadSources</activeProfile>
</activeProfiles>
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</lifecycleMappingMetadata>

修改maven一更新jre就变成1.5版本的更多相关文章

  1. maven命令更新子父项目的pom版本

    Q:一个maven项目,有多个子module,在顶级父pom.xml里设置<version>1.0.0-SHAPSHOT</version>,在子pom.xml里都用了 < ...

  2. maven更新JRE更改JSE1.5

    1. [代码]在maven的配置文件settings.xml中的<profiles>标签里添加如下代码,设置默认JRE编译版本为1.7 <profile> <id> ...

  3. eclipse 修改maven项目的jdk版本

      eclipse 修改maven项目的jdk版本 CreationTime--2018年6月8日10点29分 Author:Marydon 1.情景展示 jdk版本太低,如何修改 2.错误方式 第一 ...

  4. Maven学习——安装与修改Maven的本地仓库路径

    一.Maven的下载安装配置 1.1.下载 官网 http://maven.apache.org/download.cgi 1.2.安装配置 apache-maven-3.3.3-bin.zip 解压 ...

  5. 修改maven的默认jdk版本

    问题: 创建maven项目的时候,jdk版本默认使用的是1.5版本. 解决: 1.修改maven的settings.xml文件,添加如下: <profile> <id>jdk- ...

  6. 解决Maven管理项目update Maven时,jre自动变为1.5

    本文为博主原创,未经允许不得转载: 在搭建一个maven web项目时,项目已经按步骤搭建完好,之后项目上就报了一个错误. 在控制台看到错误提示如下:Dynamic Web Module 3.0 re ...

  7. Maven学习——1、安装与修改Maven的本地仓库路径

    1.1.下载 官网 http://maven.apache.org/download.cgi 1.2.安装配置 apache-maven-3.3.3-bin.zip 解压下载的压缩包 1.3.配置环境 ...

  8. 启动Eclipse之后,关闭Maven自动更新

    问题描述: 因为架包的修改,所以Maven需要更新,一启动Eclipse之后,自动更新,由于Maven的架包很多download不下来,就一直卡着的样子,很长时间,什么都做不了. 解决办法: Ecli ...

  9. linux下配置maven并修改maven源

    参考文章 <Linux下Maven的安装与使用> <aliyun阿里云Maven仓库镜像地址> <maven国内镜像配置(Ubuntu)> 下载maven,具体目录 ...

随机推荐

  1. asp.net 文件批量移动重命名

    最近闲时写了个批量移动重命名文件的工具 点击下载工具

  2. Linux内核分析之跟踪分析Linux内核的启动过程

    一.实验过程 使用实验楼虚拟机打开shell cd LinuxKernel/ qemu -kernel linux-/arch/x86/boot/bzImage -initrd rootfs.img ...

  3. 解决Win7下打不开chm文件的方法

    win7 无法打开chm操作如下:1,在命令行运行regsvr32 itss.dll2,在命令行运行regsvr32 hhctrl.ocx

  4. 【Python之路Day12】网络篇之Python操作MySQL

    pymysql是Python中操作MySQL的模块,使用方法和MySQLDB几乎一样. 1. 执行SQL语句 #!/usr/bin/env python3 # -*- coding: utf-8 -* ...

  5. redis linux安装与简单集群配置

    由于项目原因最近在使用redis,把redis的安装以及配置记录下来方便查看. 1.下载 地址http://download.redis.io/releases/  需要哪个版本就使用那个版本 2.解 ...

  6. 理解 Soap

    http://www.cnblogs.com/yhuang/archive/2012/04/04/share_storm.html 自己也写了下: using System; using System ...

  7. 改进ConcurrentDictionary并行使用的性能

    上一篇文章“ConcurrentDictionary 对决 Dictionary+Locking”中,我们知道了 .NET 4.0 中提供了线程安全的 ConcurrentDictionary< ...

  8. JavaScript toFixed function Not Rouding

    JavaScript库函数toFixed用来将给定的数字四舍五入为指定的小数位数,W3school上有详细的介绍.众所周知,在处理小数位四舍五入的时候存在两种方式:一种是逢五进一,如5.885保留两位 ...

  9. 1120练习,CSS制作网页

    <title>智博星主页</title> <style type="text/css"> *{ margin:0px auto; padding ...

  10. Leetcode 130 Surrounded Regions DFS

    将内部的O点变成X input X X X XX O O X X X O XX O X X output X X X XX X X XX X X XX O X X DFS的基本框架是 void dfs ...