Search code examples
javamavenbuildopenjpa

OpenJPA build failure


I'm currently working on a fork of openJPA and I have to configure a CI tool (e.g. github actions) and sonar cloud for remote analysis but first of all I'm trying the build in the local system. The problem is that i cannot have the build succeeds in the original code, for example for the release 3.2.2. I downloaded the source code from here and I run the command mvn -B install -DskipTest=true but also mvn clean install -DskipTest=true but both fail with the following error:

openjpa/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java:
[522,18] cannot access com.sun.beans.introspect.PropertyInfo
class file for com.sun.beans.introspect.PropertyInfo not found

I remark that the source code has not been changed yet.
What should I try to solve? Thanks in advance.


Solution

  • Your issue is described in java.beans.PropertyDescriptor "cannot access PropertyInfo" compilation error and the suggestion is:

    The correct fix for the user is to replace "-source 8 -target 8" with "-release 8", which will cause javac to compile against the right set of class signatures, and will successfully compile the example program.

    That in turn means one of following:

    <configuration>
      <source>${compile.class.source}</source>
      <target>${compile.class.target}</target>
      <release>8</release>
      <encoding>${project.build.sourceEncoding}</encoding>
    </configuration>