小编bru*_*550的帖子

由于目标版本 17 无效,Maven 编译、CircleCI 构建失败

Maven 本地构建一切正常,但 CircleCI 管道不断失败。这是我的 pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>at.jku</groupId>
    <artifactId>SmartRoom</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
        <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.3.3</version>
        </dependency>
    </dependencies>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
    </properties>

</project>
Run Code Online (Sandbox Code Playgroud)

还有我的 config.yml:

version: 2.1

orbs:
  maven: circleci/maven@0.0.12

workflows:
  maven_test:
    jobs:
      - maven/test:
          command: '-X compile'
Run Code Online (Sandbox Code Playgroud)

我在 CircleCI 中收到的错误消息:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project SmartRoom: Fatal error compiling: invalid target release: 17 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the …
Run Code Online (Sandbox Code Playgroud)

java maven circleci

1
推荐指数
1
解决办法
1866
查看次数

标签 统计

circleci ×1

java ×1

maven ×1