【问题标题】:Openjpa maven plugin error: Failed to execute goal : enhanceOpenjpa maven插件错误:无法执行目标:增强
【发布时间】:2021-12-30 01:56:33
【问题描述】:

我正在进行迁移活动(JDK 1.8 到 JDK 11)

  • 我的 pom.xml 拥有
<plugin>
                <groupId>org.apache.openjpa</groupId>
                <artifactId>openjpa-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <includes>**/entities/*.class</includes>
                    <excludes>**/entities/XML*.class</excludes>
                    <addDefaultConstructor>true</addDefaultConstructor>
                    <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
                </configuration>
                <executions>
                    <execution>
                        <id>enhancer</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>enhance</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa</artifactId>
                        <version>2.4.0</version>
                    </dependency>
                </dependencies>
            </plugin>

它在 JDK 1.8 上运行良好,当我将 JDK 版本更改为 11 时,我在运行 mvn install 时遇到了这个问题。

以下是我遇到的错误。

.

谁能帮帮我。

【问题讨论】:

  • 不是改成 java-11,而是改成 Java-17。它是最新版本的 java 并且具有 LTS。

标签: java migration java-11 openjpa openjpa-maven-plugin


【解决方案1】:

我得到了解决方案,只是将版本 org.apache.openjpa 从 2.4.0 更改为 3.2.0。 (在日志中出现错误,指示 3.2.0 版本)。

可能是与JDK11的兼容性问题,但它解决了问题。

【讨论】:

    猜你喜欢
    • 2021-04-22
    • 2011-04-10
    • 2012-08-12
    • 2019-07-09
    • 1970-01-01
    • 1970-01-01
    • 2016-05-10
    • 1970-01-01
    • 2022-09-28
    相关资源
    最近更新 更多