Missing artifact com.alibaba.boot:dubbo-srping-boot-starter:jar:0.2.0 错误: 不再支持源选项 6。请使用 7 或更高版本。
错误: 不再支持源选项 6。请使用 7 或更高版本。)
问题描述:mvn编译dubbox的出错
问题描述
首先出现
Missing artifact com.alibaba.boot:dubbo-srping-boot-starter:jar:0.2.0
```xml
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-srping-boot-starter</artifactId>
<version>0.2.0</version>
</dependency>
原因是由于maven中心仓库中没有这个dubbo,需要自己编译
[GitHub链接地址](https://github.com/dangdangdotcom/dubbox)
下载之后cd进入
```xml
```powershell
mvn install -Dmaven.test.skip=true
出现错误
[INFO] Compiling 77 source files to D:\git\gitTemp\dubbox\hessian-lite\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
错误: 不再支持源选项 6。请使用 7 或更高版本。
错误: 不再支持目标选项 6。请使用 7 或更高版本。
此时需要修改mvn的settings中jdk版本,让它和pom.xml中的一致
已改为 jdk13为例
```xml
mvn的settings中改为
<profiles>
<profile>
<id>jdk-13</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>13</jdk>
</activation>
<properties>
<maven.compiler.source>13</maven.compiler.source>
<maven.compiler.target>13</maven.compiler.target>
<maven.compiler.compilerVersion>13</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
pom.xml改为
<maven_compiler_plugin_version>2.3.2</maven_compiler_plugin_version>
<java_source_version>13</java_source_version>
<java_target_version>13</java_target_version>
<file_encoding>UTF-8</file_encoding>
再次编译
mvn install -Dmaven.test.skip=true
再次出错
在pom.xml手动指定版本
再次编译