ste7en / ing-sw-2019-chiappalupi-formicola-iannucci

🕹 Software Engineering 1 Project - BSc Thesis
2 stars 1 forks source link

Build failure #2

Closed keni7385 closed 5 years ago

keni7385 commented 5 years ago

There is a compile error:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /var/jenkins_home/workspace/AM19/src/main/java/it/polimi/ingsw/utility/Loggable.java:[27,32] private interface methods are not supported in -source 8
  (use -source 9 or higher to enable private interface methods)
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.028 s
[INFO] Finished at: 2019-05-07T21:40:22Z
[INFO] ------------------------------------------------------------------------

Also configure the code coverage with jacoco 0.8.3 (read previous emails).

[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.1:prepare-agent (default-cli) @ AM019 ---
[INFO] argLine set to -javaagent:/var/jenkins_home/.m2/repository/org/jacoco/org.jacoco.agent/0.8.1/org.jacoco.agent-0.8.1-runtime.jar=destfile=/var/jenkins_home/workspace/AM19/target/jacoco.exec
[INFO] 

Please fix asap

ste7en commented 5 years ago

Hi @keni7385 thank you for the opened issue! An higher source version number has been set in the pom.xml and Jacopo 0.8.3 has been specified in a specific maven goal as suggested in a previous email.

Please, can you confirm us the issue has been solved?

--Stefano

keni7385 commented 5 years ago

Have u tried to build and test locally with maven?

ste7en commented 5 years ago

Yes, everything works locally with maven.

keni7385 commented 5 years ago
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ AM019 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 42 source files to /var/jenkins_home/workspace/AM19/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.930 s
[INFO] Finished at: 2019-05-08T21:52:05Z
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project AM019: Fatal error compiling: error: invalid target release: 1.11 -> [Help 1]
[ERROR] 

1.11 does not exist normally. Should be 11. Try with 11 for now. BTW switch to 12

ste7en commented 5 years ago

Yes, I changed to 1.9 when I found the error on 1.11. Now I changed to 11 and it works, while it gives me errors when changing to version 12. Anyway I pushed the version 11 which works locally.

keni7385 commented 5 years ago

[..] while it gives me errors when changing to version 12.

May be that you don't have JDK 12 installed?

Anyway I pushed the version 11 which works locally.

Okay build succeeds now, but tests haven't been discovered yet:

[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 

That is due to:

d Jacopo 0.8.3 has been specified in a specific maven goal as suggeste...

Setting the goal is only useful when you run maven from your command line locally. Please also fix it in the pom. Once you are able to see your code coverage from your SonarQube (not Lint), the issue is probably solved from our server side as well.

ingconti commented 5 years ago

As we said in more places, we do need targeting for JDK 12. we also sent details about POM. Pls fix asap.

PS only to understand:

this is your MAIN ?

package it.polimi.ingsw;

/* Hello world!

*/ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }

ste7en commented 5 years ago

@keni7385 @ingconti finally, I just committed and pushed a working configuration of the pom.xml It now works with Sonar and it shows code coverage details. Please, @keni7385 can you check if this solved the Jenkins problem of the issue?

@ingconti nope, that main class you mentioned is the default file made by IntelliJ, we didn't remove it and we use it for simple debugging on our local develop branches.

Thank you and have a good day

--Stefano

keni7385 commented 5 years ago

[INFO] [INFO] Results: [INFO] [INFO] Tests run: 120, Failures: 0, Errors: 0, Skipped: 0 [INFO] [JENKINS] Recording test results ... [INFO] [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ AM019 --- [INFO] Building jar: /var/jenkins_home/workspace/AM19/target/AM019-1.0-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.911 s [INFO] Finished at: 2019-05-09T10:13:14Z [INFO] ------------------------------------------------------------------------

You too!