目录
打包微服务项目
出现编译打包异常问题:
Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(default-compile) on project cloudorde8001: Fatal error compiling
在此说明:每个人的项目环境不一样,所碰到的问题也是只适应部分场景,需要结合实际灵活参考本知识点:
解决思路:
1、IDEA编译方式第一次回到本地用户的settings.xml文件中寻找编译配置
<profile>
<id>jdk-1.8</id>
<activation>
<property>
<name>target-env</name>
<value>dev</value>
</property>
</activation>
<properties>
<tomcatPath>/path/to/tomcat/instance</tomcatPath>
</properties>
</profile>
2、第二次回去idea中寻找settings.xml中寻找编译级别
3、maven中pom文件中定义编译JDK版本
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
4、模块里设置每个模块的编译级别