Closed valerio-castelli closed 6 years ago
Thanks for pointing out the problem. We changed slightly the pom.xml and the compiler.xml after looking at the JUnit 5 guide for Maven integration. We launched a Maven Goal with "test" as parameter and this was the output:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building LM42 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ LM42 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/alberto/Documents/ingsw/the_42nd_sagrada/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ LM42 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 91 source files to /home/alberto/Documents/ingsw/the_42nd_sagrada/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ LM42 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/alberto/Documents/ingsw/the_42nd_sagrada/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ LM42 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 13 source files to /home/alberto/Documents/ingsw/the_42nd_sagrada/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ LM42 ---
[INFO] Surefire report directory: /home/alberto/Documents/ingsw/the_42nd_sagrada/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.732 s
[INFO] Finished at: 2018-05-11T19:29:02+02:00
[INFO] Final Memory: 17M/265M
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution finished
Of course all the tests that we launched alongside with the Maven Goal compiled and executed successfully. Please contact us if Jenkins is still not compiling. Alberto
sure! we build every day.
We have finished to solve the issue with Maven. Now in our laptops Maven finds correctly the tests. Please, could you try if everything run now correctly in your validator and eventually tell us if there are any problems? Thanks for the help, Filippo
far better... it compiles and tests are performed.
but still some warnings:
[JENKINS] Recording test results [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.SurefireArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.BuildInfoRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ LM42 --- [INFO] Building jar: /var/jenkins_home/workspace/LM42/target/LM42-1.0-SNAPSHOT.jar [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS
Thanks for pointing out this security issue. I have already fixed it this morning, but I have forgot to push it on the GitHub repo. Now I have pushed the patch and the internal objects are not longer serialised over RMI connection. Please could tell me if the issue still persists or if it is fixed? Thanks for the help, Filippo
same output, yet. same warnings.
I have read the jenkis documentation and they suggest to rename the class perviously serialised, so Jenkis not use cached values of them. So I have renamed the inner classes. If the problem still persists I will try to not use inner class in RMI. Please could you tell me if the issue still persists or if it is fixed? Thanks for the help, Filippo
I am closing the issue as we've confirmed that these warnings depend on a regression in the current version of Jenkins.
Good afternoon, There is an issue with your pom.xml configuration that prevents Jenkins from successfully identifying and building your tests. Please follow the "junit 5 maven" guide that you can find on Google to fix the pom and make sure that you are able to run your tests within IntelliJ using a maven build configuration with "test" as goal.