1.修改mirror
<!--由于中心倉庫速度太慢竿秆,需要更換為阿里云的倉庫-->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
<!-- 一些最新版本的資源有可能在阿里云倉庫找不到丈攒,所以還得換會中心倉庫 -->
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
2.修改Jdk
<!-- 修改默認(rèn)jdk版本-->
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
3.Classpath entryorg.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result.
右鍵項目properties>Deployment Assembly>Add>Java Build Path Entries>Next>
Maven Dependencies>Finish
4.web.xml is missing and <failOnMissingWebXml> is set to true
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<!-- 也可以右鍵項目>Java EE tools>Generate Deployment Descriptor stub即可生成web.xml文件 -->
5.新建Maven Web項目導(dǎo)致EL表達(dá)式不能被解析
這是因為Web.xml版本在2.3以前是忽略EL表達(dá)式的婆瓜,可以在Jsp頁面Page指令中加入isELIgnored="false",也可以修改Web.xml版本如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
</web>