usnistgov / iheos-toolkit2

XDS Toolkit
https://ihexds.nist.gov
45 stars 25 forks source link

maven build error #592

Closed oliveregger closed 5 months ago

oliveregger commented 1 year ago

i'm trying to build the toolkit from source, but get an error:

[INFO] -----------------< gov.nist.toolkit:config-datatypes >------------------
[INFO] Building config-datatypes 7.10.0                                  [3/57]
[INFO]   from config-datatypes/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- clean:3.2.0:clean (default-clean) @ config-datatypes ---
[INFO] Deleting /Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/target
[INFO] 
[INFO] --- groovy-eclipse-compiler:2.9.0-01:add-groovy-build-paths (default-add-groovy-build-paths) @ config-datatypes ---
[INFO] Adding /src/main/groovy to the list of source folders
[INFO] Adding /src/test/groovy to the list of test source folders
[INFO] 
[INFO] --- resources:3.3.0:resources (default-resources) @ config-datatypes ---
[INFO] Copying 1 resource
[INFO] 
[INFO] --- compiler:3.1:compile (default-compile) @ config-datatypes ---
[INFO] Changes detected - recompiling the module!
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 16 Groovy:unable to resolve class StringBuilder 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 16 Groovy:unable to resolve class StringBuilder 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 17 Groovy:unable to resolve class StringBuilder 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 17 Groovy:unable to resolve class StringBuilder 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 33 Groovy:unable to resolve class StringBuilder 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 46 Groovy:unable to resolve class StringBuilder 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 77 Groovy:unable to resolve class Map 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 89 Groovy:unable to resolve class Map 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 90 Groovy:unable to resolve class Map 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/MultipartParser.groovy: 90 Groovy:unable to resolve class java.util.Map 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/datatypes/Multipart.groovy: 7 Groovy:unable to resolve class List 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/datatypes/Multipart.groovy: 7 Groovy:unable to resolve class java.util.List 
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/datatypes/Multipart.groovy: 7 Groovy:A transform used a generics containing ClassNode List <Part> for the property parts directly. You are not supposed to do this. Please create a new ClassNode referring to the old ClassNode and use the new ClassNode instead of the old one. Otherwise the compiler will create wrong descriptors and a potential NullPointerException in TypeResolver in the OpenJDK. If this is not your own doing, please report this bug to the writer of the transform.
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/datatypes/Multipart.groovy: 7 Groovy:A transform used a generics containing ClassNode List <Part> for the field parts directly. You are not supposed to do this. Please create a new ClassNode referring to the old ClassNode and use the new ClassNode instead of the old one. Otherwise the compiler will create wrong descriptors and a potential NullPointerException in TypeResolver in the OpenJDK. If this is not your own doing, please report this bug to the writer of the transform.
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/datatypes/Multipart.groovy: 1 Groovy:A transform used a generics containing ClassNode List <Part> for the method public List getParts()  { ... } directly. You are not supposed to do this. Please create a new ClassNode referring to the old ClassNode and use the new ClassNode instead of the old one. Otherwise the compiler will create wrong descriptors and a potential NullPointerException in TypeResolver in the OpenJDK. If this is not your own doing, please report this bug to the writer of the transform.
/Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/datatypes/Multipart.groovy: 1 Groovy:A transform used a generics containing ClassNode List <Part> for the method public void setParts(List value)  { ... } directly. You are not supposed to do this. Please create a new ClassNode referring to the old ClassNode and use the new ClassNode instead of the old one. Otherwise the compiler will create wrong descriptors and a potential NullPointerException in TypeResolver in the OpenJDK. If this is not your own doing, please report this bug to the writer of the transform.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/FilterProxyProperties.java:[1,1] 1. ERROR in /Users/oegger/Documents/github/iheos-toolkit2/config-datatypes/src/main/java/gov/nist/toolkit/configDatatypes/server/FilterProxyProperties.java (at line 1)
        package gov.nist.toolkit.configDatatypes.server;
        ^

building with jdk 20, mvn forces it to be 1.8, could that be a problem?

however building on osx / arm chips jdk 1.8 is not available anymore. any help appreciated!

oliveregger commented 1 year ago

building with jdk 1.8 on an intel mac works, it seems to be related to the jdk

oliveregger commented 1 year ago

are the artficats published to a mvn repo somewhere?

skbhaskarla commented 1 year ago

Yes, this is a jdk related issue and I have updated the maven compiler plugin configuration to compile for newer JDK. I tested the build using OpenJDK 16.0.2. Maven profiles Integration-Tests and WebUI-Tests configuration tests will need to be updated in a following branch commit.

NIST HL7(r) FHIR(r) Toolkit will require separate updates.