EsupPortail / esup-mdw

Esup MonDossierWeb
https://www.esup-portail.org/wiki/x/C4BNHg
Other
1 stars 5 forks source link

Erreur sur apo-ws-utils-1.0.0.jar à la copilation #44

Closed XavRsl closed 2 years ago

XavRsl commented 2 years ago

Bonjour,

J'ai un problème lors de la compilation de mdw, j'ai le message suivant après avoir lancé la commande scl enable rh-maven35 'mvn clean compile package' :

[WARNING] No processors specified. Using default discovery mechanism.
[ERROR] diagnostic: /home/xroussel/mdw/mondossierweb-1.6.4-distribution/src/main/java/fr/univlorraine/mondossierweb/controllers/EtudiantController.java:40: error: cannot access fr.univlorraine.apowsutils.ServiceProvider
import fr.univlorraine.apowsutils.ServiceProvider;
                                 ^
  bad class file: /root/.m2/repository/fr/univlorraine/apo-ws-utils/1.0.0/apo-ws-utils-1.0.0.jar(fr/univlorraine/apowsutils/ServiceProvider.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR] error on execute: error during compilation
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:28 min
[INFO] Finished at: 2022-01-20T18:53:03+01:00
[INFO] Final Memory: 47M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.bsc.maven:maven-processor-plugin:2.2.4:process (process) on project mdw-vaadin: Error executing: error during compilation -> [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/MojoExecutionException

Y'a un truc que j'ai dû zapper mais je sais pas quoi. SI vous avez des idées ?

Merci !

Xavier

cardon-matthieu commented 2 years ago

Il faut utiliser Java11 à la compilation. JAVA_HOME=<chemin vers java11> ; mvn clean compile package ...

XavRsl commented 2 years ago

Merci pour la réponse. Désolé de revenir vers vous si tard mais je n'arrivais toujours pas à compiler. En réalité, j'avais beau ajouter la variable d'environnement correcte, ça ne fonctionnait pas. J'ai enfin compris que le problème venait du fait que Maven utilisait une version différente de java. Bref, problème réglé, merci pour votre aide !

Xavier