目录
1、JRE默认为J2SE-1.5
1)修改setting文件,这种方法属于为通用设置
<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>
2)或者使用maven自带的插件,这种方法属于特定设置
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source> <!-- 源代码使用的JDK版本 -->
<target>1.8</target> <!-- 需要生成的目标class文件的编译版本 -->
<encoding>UTF-8</encoding><!-- 字符集编码 -->
<skipTests>true</skipTests><!-- 跳过测试 -->
</configuration>
</plugin>
2、The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
3、修改archetypeCatalog.xml提升maven打开速度
总结:
1)骨架的列表来源的配置文件。
2)通过指定范围在内置或者本地提升项目搭建速度。
Maven-Archetype Catalog
使用Intellij IDEA通过Maven搭建struts2的HelloWord