java - 无法执行目标 org.apache.maven.plugins :maven-compiler-plugin:3. 8.1:compile (default-compile) on project fhirql: Fatal error compiler

标签 java spring-boot maven pom.xml

我运行命令 mvn clean package 我得到了上面的错误我的 pom 是:

enter image description here

http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0

<parent>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>hapi-fhir</artifactId>
    <version>3.2.0</version>
</parent>

<groupId>com.canehealth</groupId>
<artifactId>fhirql</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<properties>
    <maven.compiler.target>1.11</maven.compiler.target>
    <maven.compiler.source>1.11</maven.compiler.source>
    <maven.build.timestamp.format>EEE, MMM dd yyyy, HH:mm Z</maven.build.timestamp.format>
</properties>

<dependencies>
    <!-- Compile -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jersey</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-spring-boot-starter</artifactId>
        <version>${project.parent.version}</version>
    </dependency>
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-jpaserver-base</artifactId>
        <version>${project.parent.version}</version>
    </dependency>
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-jaxrsserver-base</artifactId>
        <version>${project.parent.version}</version>
    </dependency>

    <!--<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>-->

    <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt</artifactId>
        <version>0.9.1</version>
    </dependency>

    <!-- Added -->
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-client</artifactId>
        <version>${project.parent.version}</version>
    </dependency>
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-structures-dstu3</artifactId>
        <version>${project.parent.version}</version>
    </dependency>
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-testpage-overlay</artifactId>
        <version>${project.parent.version}</version>
        <type>war</type>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-testpage-overlay</artifactId>
        <version>${project.parent.version}</version>
        <classifier>classes</classifier>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
    </dependency>
    <!-- Optional -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-configuration-processor</artifactId>
        <optional>true</optional>
    </dependency>
    <!-- Test -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-spring-boot-autoconfigure</artifactId>
        <version>${project.parent.version}</version>
    </dependency>
    <dependency>
        <groupId>ca.uhn.hapi.fhir</groupId>
        <artifactId>hapi-fhir-base</artifactId>
        <version>${project.parent.version}</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.2.6.RELEASE</version>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <overlays>
                    <overlay>
                        <groupId>ca.uhn.hapi.fhir</groupId>
                        <artifactId>hapi-fhir-testpage-overlay</artifactId>
                    </overlay>
                </overlays>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>1.11</source>
                <target>1.11</target>
            </configuration>
        </plugin>
    </plugins>
</build>

最佳答案

我遇到了同样的问题,将版本 11 更改为 1.8 后它对我有用,
代替

<properties>
   <java.version>11</java.version>
  </properties>

<properties>
   <java.version>1.8</java.version>
  </properties>

关于java - 无法执行目标 org.apache.maven.plugins :maven-compiler-plugin:3. 8.1:compile (default-compile) on project fhirql: Fatal error compiler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61243459/

相关文章:

javascript - 可扩展应用程序的 CORS 问题

Java:多维数组问题

java - 内存不足错误: Java heap space when trying to create ArrayList

java - 如何将 List<Class<?>> 转换为具体类型?

maven - Jenkins 中出现 "testng.xml is not a valid file"错误

java - 如何使用zookeeper作为基于spring的Web应用程序的数据源来加载属性?

java - Maven 发布插件 : create tag withhout SNAPSHOT depencencies

java - StartActivityForResult 用于多个按钮访问一个 Activity 并在选择时获取不同的数据?

java - AADAuthenticationFilter 仅调用一次

spring-boot - 如何使用 CassandraAutoConfiguration 在 spring boot 应用程序和 cassandra 之间配置 ssl?