Skip to content

Add Java 17 support : The last plugin version 2.7 crashes with API incompatibility with java 17  #68

@ludade

Description

@ludade

Hi,

I am making heavy use of your plugin to manage my configuration across several runtimes : JBoss EAP & OpenLiberty. The plugin works perfectly with Java 8 and Java 11

Currently, I have switched from Java 11 to Java 17 on my development environment, however I'm facing the following issue with java 17 during maven build process :

[ERROR] Failed to execute goal [32mcom.google.code.maven-config-processor-plugin:config-processor-maven-plugin:2.7:process (default) on project [36mbackbone-factorysetting: Execution default of goal com.google.code.maven-config-processor-plugin:config-processor-maven-plugin:2.7:**process failed: An API incompatibility was encountered while executing com.google.code.maven-config-processor-plugin:config-processor-maven-plugin:2.7:process**: java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.google.code.maven-config-processor-plugin:config-processor-maven-plugin:2.7
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/m2repo/com/google/code/maven-config-processor-plugin/config-processor-maven-plugin/2.7/config-processor-maven-plugin-2.7.jar
[ERROR] urls[1] = file:/C:/m2repo/org/apache/ant/ant/1.7.1/ant-1.7.1.jar
[ERROR] urls[2] = file:/C:/m2repo/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar
[ERROR] urls[3] = file:/C:/m2repo/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.jar
[ERROR] urls[4] = file:/C:/m2repo/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-10/doxia-sink-api-1.0-alpha-10.jar
[ERROR] urls[5] = file:/C:/m2repo/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[6] = file:/C:/m2repo/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[7] = file:/C:/m2repo/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[8] = file:/C:/m2repo/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[9] = file:/C:/m2repo/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar
[ERROR] urls[10] = file:/C:/m2repo/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
[ERROR] urls[11] = file:/C:/m2repo/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar
[ERROR] urls[12] = file:/C:/m2repo/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
[ERROR] urls[13] = file:/C:/m2repo/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar
[ERROR] urls[14] = file:/C:/m2repo/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealmaven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] 

Step to reproduce :

  1. Declare the plugin on a pom.xml file such as:
<build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <!-- Exclude resources-processor from build -->
            <resource>
                <directory>src/main/resources-processor</directory>
                <excludes>
                    <exclude>**</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>com.google.code.maven-config-processor-plugin</groupId>
                <artifactId>config-processor-maven-plugin</artifactId>
                <configuration>
                    <transformations>
                        <transformation>
                            <input>${resources-source}${myfile-file}</input>
                            <output>${resources-output}${myfile-file}</output>
                            <config>${resources-processor}${myfile-file}${processor-suffix}</config>
                        </transformation>
                    </transformations>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
  1. Run mvn clean install fro example.

Is there any plan or workaround to support java 17 ?

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions