1、java:[400,90] 錯誤: -source 1.5 中不支援 lambda 表示式
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project
原因是未指定版本,預設用jdk 1.5在編譯
<plugins>
<!-- 指定maven編譯的jdk版本,如果不指定,maven3預設用jdk 1.5 maven2預設用jdk1.3 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>```
2. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project seashell-xres-irds-sdk: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
pom檔案沒有配置distributionManagement:
釋出倉庫一般分為Releases版和snapshot版,所以要配置2個倉庫地址
<distributionManagement>
<repository>
<id>nexus-releases</id>
<name>corp nexus-releases</name>
<url>http://你的nexusIP:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus-snapshot</id>
<name>corp nexus-snapshot</name>
<url>http://你的nexusIP:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>