GreenDelta / olca-modules

Source code of the openLCA modules
openlca.org
Mozilla Public License 2.0
29 stars 30 forks source link

Compilation fails for olca-proto module #26

Closed spietzn closed 2 years ago

spietzn commented 3 years ago

I followed the instructions per the README: git clone https://github.com/GreenDelta/olca-modules.git mvn install -DskipTests

The compilation fails with the following exception:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/spietzn/GIT/foreign/olca-modules/olca-proto/src/test/java/org/openlca/proto/server/DataUpdateTest.java:[123,25] cannot find symbol
  symbol:   method getDescriptorForType()
  location: variable proto of type java.lang.Object
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for org.openlca:olca-modules 2.0.0:
[INFO] 
[INFO] org.openlca:olca-modules ........................... SUCCESS [  0.523 s]
[INFO] org.openlca:olca-formula ........................... SUCCESS [  0.749 s]
[INFO] olca-core .......................................... SUCCESS [  0.496 s]
[INFO] olca-cloud ......................................... SUCCESS [  0.087 s]
[INFO] olca-ecospold-1 .................................... SUCCESS [  0.128 s]
[INFO] olca-ecospold-2 .................................... SUCCESS [  0.094 s]
[INFO] olca-ilcd .......................................... SUCCESS [  0.212 s]
[INFO] olca-simapro-csv ................................... SUCCESS [  0.077 s]
[INFO] olca-io ............................................ SUCCESS [  3.473 s]
[INFO] olca-ipc ........................................... SUCCESS [  0.080 s]
[INFO] olca-proto ......................................... FAILURE [  5.217 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11.417 s
[INFO] Finished at: 2021-08-09T15:59:15+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile (default-testCompile) on project olca-proto: Compilation failure
[ERROR] /home/spietzn/GIT/foreign/olca-modules/olca-proto/src/test/java/org/openlca/proto/server/DataUpdateTest.java:[123,25] cannot find symbol
[ERROR]   symbol:   method getDescriptorForType()
[ERROR]   location: variable proto of type java.lang.Object
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :olca-proto

I am using maven version 3.6.3 and openjdk-14.0.2 When removing the olca-proto module from the root pom.xml everything works fine.

This can be reproduced with the following Dockerfile:

FROM maven:3.6-openjdk-14
RUN microdnf install git; microdnf clean all
RUN mkdir /db
RUN git clone https://github.com/GreenDelta/olca-modules.git
WORKDIR /olca-modules/
#RUN sed -i 's/.*olca-proto.*//' pom.xml
RUN mvn clean install -DskipTests
WORKDIR /olca-modules/olca-ipc
CMD mvn -P server-app exec:java -Dexec.mainClass=org.openlca.ipc.Main -Dexec.args="-db /db"

Uncommenting line 6 leads to a working image.

msrocka commented 3 years ago

Reopening this because Fix #26 ... from this commit auto-closed it. We still need to fix this for Linux...