Pb de compilation suite à migration OS (Ubuntu 14.04 remplacé par 16.04)

ubuntu
jdk
compilation
java
maven
Tags: #<Tag:0x00007fe7b1713b58> #<Tag:0x00007fe7b1713928> #<Tag:0x00007fe7b1713720> #<Tag:0x00007fe7b1713590> #<Tag:0x00007fe7b1713428>

#1

Je n’arrive plus à compiler avec maven le projet Asqatasun et le plugin Jenkins
suite à la mise à jour de l’OS d’un ordinateur (de Ubuntu 14.04 à Ubuntu 16.04). :thermometer_face:

Avant cette mise à jour, les paquets maven et openjdk-7-jdk étaient installés à partir des dépôts officiels. Après la mise à jour, la compilation n’est plus possible. Pour Ubuntu 16.06, le paquet openjdk-7-jdk n’est plus disponible et c’est openjdk-8-jdk qui le remplace.


Log pour le plugin Jenkins

Warning: JAVA_HOME environment variable is not set.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Asqatasun Jenkins Plugin 1.3
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ asqatasun ---
[INFO] Deleting (...)/git.Asqatasun-Jenkins-Plugin/target
[INFO] 
[INFO] --- maven-hpi-plugin:1.90:validate (default-validate) @ asqatasun ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-maven) @ asqatasun ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0.1:display-info (display-info) @ asqatasun ---
[INFO] Maven Version: 3.3.9
[INFO] JDK Version: 1.8.0_91 normalized as: 1.8.0-91
[INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 4.4.0-31-generic
[INFO] 
[INFO] --- maven-localizer-plugin:1.14:generate (default) @ asqatasun ---
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ asqatasun ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 16 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5:compile (default-compile) @ asqatasun ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 6 source files to (...)/git.Asqatasun-Jenkins-Plugin/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project asqatasun: Fatal error compiling: tools.jar not found: /usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/tools.jar -> [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

log pour le projet Asqatasun

Warning: JAVA_HOME environment variable is not set.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] asqatasun
[INFO] engine
    (...)
[INFO] asqatasun-runner
[INFO]                                                                         
    (...)                                                                 
[INFO] ------------------------------------------------------------------------
[INFO] Building commons-entity 4.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ asqatasun-commons-entity ---
[INFO] Deleting (...)/git.asqatasun.build/engine/commons-entity/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ asqatasun-commons-entity ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory (...)/git.asqatasun.build/engine/commons-entity/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ asqatasun-commons-entity ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 14 source files to (...)/git.asqatasun.build/engine/commons-entity/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] asqatasun .......................................... SUCCESS [  0.179 s]
[INFO] engine ............................................. SUCCESS [  0.004 s]
[INFO] commons-entity ..................................... FAILURE [  0.219 s]
[INFO] commons-entity-jpa ................................. SKIPPED
    (...)
[INFO] asqatasun-runner ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
    (...)
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project asqatasun-commons-entity: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

J’ai réglé l’erreur "JAVA_HOME environment variable is not set"
en utilisant les commandes suivantes :

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
PATH="$PATH:/usr/lib/jvm/java-8-openjdk-amd64/bin"
export PATH JAVA_HOME 

mais le résultat n’est pas meilleur (je n’ai pas conservé les logs).
A ce stade je ne suis pas sûre que JDK était installé (le JRE oui)
et j’ai oublié de faire un javac -version (je faisais uniquement un java -version).


Nouvelle tentative en installant openjdk-7-jdk à partir du dépôt ppa:openjdk-r/ppa
mais la compilation bloquait pour le sous-projet asqatasun-web-app


Dernière tentative en désinstallant maven et tous les paquets openjdk-*
puis en installant dans la foulée maven et openjdk-8-jdk.

La configuration actuelle de l’environnement est :

sudo lsb_release -a  
    No LSB modules are available.
    Distributor ID:    Ubuntu
    Description:    Ubuntu 16.04.1 LTS
    Release:    16.04
    Codename:    xenial
sudo java -version                
    openjdk version "1.8.0_91"
    OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)
    OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
sudo javac -version
    javac 1.8.0_91
sudo update-java-alternatives 
    java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64
sudo update-alternatives --config javac
    Il n'existe qu'une « alternative » dans le groupe de liens javac
    (qui fournit /usr/bin/javac) : /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
                                                                            
ls -l /usr/lib/jvm/
    lrwxrwxrwx 1 root root   24 févr. 25 21:41 default-java -> java-1.8.0-openjdk-amd64
    lrwxrwxrwx 1 root root   20 juil. 21 07:49 java-1.8.0-openjdk-amd64 -> java-8-openjdk-amd64
    drwxr-xr-x 7 root root 4096 juil. 31 03:49 java-8-openjdk-amd64
mvn -version
    Apache Maven 3.3.9
    Maven home: /usr/share/maven
    Java version: 1.8.0_91, vendor: Oracle Corporation
    Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
    Default locale: fr_FR, platform encoding: UTF-8
    OS name: "linux", version: "4.4.0-31-generic", arch: "amd64", family: "unix"

La compilation du plugin Jenkins fonctionne maintenant.

Par contre pour le projet Asqatasun
elle échoue pour le sous-projet asqatasun-engine .

Une idée ? :ambulance:
Ci-dessous le log maven :

[INFO] ------------------------------------------------------------------------
[INFO] Building asqatasun-engine 4.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
    (...)
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
    (...)
Running org.asqatasun.service.command.UploadAuditCommandImplTest
init
LoadContent with 1 file
31-07-2016 05:19:55:841 39   INFO  org.asqatasun.service.command.UploadAuditCommandImpl  - Loading files content {My File Name=MyFileContent}
31-07-2016 05:19:55:841 39   INFO  org.asqatasun.service.command.UploadAuditCommandImpl  - {My File Name=MyFileContent} has been loaded
LoadContent with several file
31-07-2016 05:19:55:843 41   INFO  org.asqatasun.service.command.UploadAuditCommandImpl  - Loading files content {file:///My File Name2=MyFileContent2, file:///My File Name1=MyFileContent1}
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 sec <<< FAILURE! - in org.asqatasun.service.command.UploadAuditCommandImplTest
testLoadContent2(org.asqatasun.service.command.UploadAuditCommandImplTest)  Time elapsed: 0.004 sec  <<< ERROR!
java.lang.AssertionError: 
  Unexpected method call WebResourceDataService.createSite("file:///My File Name2"):
    WebResourceDataService.createSite("file:///My File Name1"): expected: 1, actual: 0
    WebResourceDataService.createPage("file:///My File Name1"): expected: 1, actual: 0
    WebResourceDataService.createPage("file:///My File Name2"): expected: 1, actual: 0
    WebResourceDataService.saveOrUpdate(EasyMock for interface org.asqatasun.entity.subject.Site): expected: 2, actual: 0
    WebResourceDataService.saveOrUpdate(EasyMock for interface org.asqatasun.entity.subject.Page): expected: 1, actual: 0
    WebResourceDataService.saveOrUpdate(EasyMock for interface org.asqatasun.entity.subject.Page): expected: 1, actual: 0
	at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:44)
	at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:85)
	at com.sun.proxy.$Proxy2.createSite(Unknown Source)
	at org.asqatasun.service.command.UploadAuditCommandImpl.createWebResources(UploadAuditCommandImpl.java:126)
	at org.asqatasun.service.command.UploadAuditCommandImpl.loadContent(UploadAuditCommandImpl.java:101)
	at org.asqatasun.service.command.UploadAuditCommandImplTest.testLoadContent2(UploadAuditCommandImplTest.java:190)
  (...)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] asqatasun .......................................... SUCCESS [  0.165 s]
[INFO] engine ............................................. SUCCESS [  0.003 s]
    (...)
[INFO] scenarioloader ..................................... SUCCESS [  0.087 s]
[INFO] asqatasun-engine ................................... FAILURE [  7.843 s]
[INFO] asqatasun-resources ................................ SKIPPED
[INFO] testing-tools ...................................... SKIPPED
    (...)
[INFO] asqatasun-runner ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

#2

C’est comme le porc salut, c’est écrit dessus :slight_smile:

–> apt-get install openjdk-8-jdk

(en espérant ne pas dire d’ânerie :slight_smile: )
Matthieu


#3

@mfaure merci pour la réponse mais à priori tu n’as lu que le début du message
`
actuellement sur ma machine :

sudo update-java-alternatives 
    java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64

`


#4

dpkg -l "openjdk*" ?


#5
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom                               Version               Architecture          Description
+++-=================================-=====================-=====================-=======================================================================
un  openjdk-6-jdk                     <aucune>              <aucune>              (aucune description n'est disponible)
un  openjdk-6-jre                     <aucune>              <aucune>              (aucune description n'est disponible)
un  openjdk-6-jre-headless            <aucune>              <aucune>              (aucune description n'est disponible)
un  openjdk-7-jre                     <aucune>              <aucune>              (aucune description n'est disponible)
rc  openjdk-7-jre-headless:amd64      7u95-2.6.4-3          amd64                 OpenJDK Java runtime, using Hotspot JIT (headless)
un  openjdk-7-jre-lib                 <aucune>              <aucune>              (aucune description n'est disponible)
un  openjdk-8-demo                    <aucune>              <aucune>              (aucune description n'est disponible)
ii  openjdk-8-doc                     8u91-b14-3ubuntu1~16. all                   OpenJDK Development Kit (JDK) documentation
ii  openjdk-8-jdk:amd64               8u91-b14-3ubuntu1~16. amd64                 OpenJDK Development Kit (JDK)
ii  openjdk-8-jdk-headless:amd64      8u91-b14-3ubuntu1~16. amd64                 OpenJDK Development Kit (JDK) (headless)
ii  openjdk-8-jre:amd64               8u91-b14-3ubuntu1~16. amd64                 OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-8-jre-headless:amd64      8u91-b14-3ubuntu1~16. amd64                 OpenJDK Java runtime, using Hotspot JIT (headless)
un  openjdk-8-jre-jamvm               <aucune>              <aucune>              (aucune description n'est disponible)
un  openjdk-8-source                  <aucune>              <aucune>              (aucune description n'est disponible)

#6

OK, je reproduis le problème (cc @koj)

[INFO] ------------------------------------------------------------------------
[INFO] Building asqatasun-engine 4.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ asqatasun-engine ---
[INFO] Deleting /home/mfaure/Documents/Asqatasun/Dossier-0Permanent/0Sources/Asqatasun/engine/asqatasun-engine/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ asqatasun-engine ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/mfaure/Documents/Asqatasun/Dossier-0Permanent/0Sources/Asqatasun/engine/asqatasun-engine/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ asqatasun-engine ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 15 source files to /home/mfaure/Documents/Asqatasun/Dossier-0Permanent/0Sources/Asqatasun/engine/asqatasun-engine/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ asqatasun-engine ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ asqatasun-engine ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 13 source files to /home/mfaure/Documents/Asqatasun/Dossier-0Permanent/0Sources/Asqatasun/engine/asqatasun-engine/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ asqatasun-engine ---
[INFO] Surefire report directory: /home/mfaure/Documents/Asqatasun/Dossier-0Permanent/0Sources/Asqatasun/engine/asqatasun-engine/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.asqatasun.service.AuditServiceThreadImplTest
getAudit
run
init
loadContent
adaptContent
process
consolidate
analyse
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.104 sec - in org.asqatasun.service.AuditServiceThreadImplTest
Running org.asqatasun.service.AuditServiceThreadFactoryImplTest
create from Audit
create from AuditCommand
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in org.asqatasun.service.AuditServiceThreadFactoryImplTest
Running org.asqatasun.service.command.CrawlAuditCommandImplTest
getCrawlerService
init
loadContent
The abstract callCrawlerService is called
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.281 sec - in org.asqatasun.service.command.CrawlAuditCommandImplTest
Running org.asqatasun.service.command.SiteAuditCommandImplTest
callCrawlerService
01-08-2016 09:56:17:328 0    INFO  org.asqatasun.service.command.SiteAuditCommandImpl  - Launching crawler for page My Site URL
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in org.asqatasun.service.command.SiteAuditCommandImplTest
Running org.asqatasun.service.command.AbstractScenarioAuditCommandImplTest
init
loadContent with page as main resource
01-08-2016 09:56:17:349 21   INFO  org.asqatasun.service.command.AbstractScenarioAuditCommandImpl  - Loading content for My Scenario
01-08-2016 09:56:17:350 22   INFO  org.asqatasun.service.command.AbstractScenarioAuditCommandImpl  - My Scenario has been loaded
loadContent with site as main resource
01-08-2016 09:56:17:357 29   INFO  org.asqatasun.service.command.AbstractScenarioAuditCommandImpl  - Loading content for My Scenario
01-08-2016 09:56:17:359 31   INFO  org.asqatasun.service.command.AbstractScenarioAuditCommandImpl  - My Scenario has been loaded
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 sec - in org.asqatasun.service.command.AbstractScenarioAuditCommandImplTest
Running org.asqatasun.service.command.AuditCommandImplTest
adaptContent
01-08-2016 09:56:17:393 65   INFO  org.asqatasun.service.command.AuditCommandImpl  - Adapting 
01-08-2016 09:56:17:461 133  INFO  org.asqatasun.service.command.AuditCommandImpl  -  has been adapted
process
consolidate
analyse
getAudit
getAuditDataService
getTestDataService
getParameterDataService
getWebResourceDataService
getContentDataService
getProcessResultDataService
getContentAdapterService
getProcessorService
getConsolidatorService
getAnalyserService
getAdaptationListener
setStatusToAudit
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.123 sec - in org.asqatasun.service.command.AuditCommandImplTest
Running org.asqatasun.service.command.PageAuditCrawlerCommandImplTest
callCrawlerService
01-08-2016 09:56:17:488 160  INFO  org.asqatasun.service.command.PageAuditCrawlerCommandImpl  - Launching crawler for page http://My page
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in org.asqatasun.service.command.PageAuditCrawlerCommandImplTest
Running org.asqatasun.service.command.UploadAuditCommandImplTest
init
LoadContent with 1 file
01-08-2016 09:56:17:499 171  INFO  org.asqatasun.service.command.UploadAuditCommandImpl  - Loading files content {My File Name=MyFileContent}
01-08-2016 09:56:17:499 171  INFO  org.asqatasun.service.command.UploadAuditCommandImpl  - {My File Name=MyFileContent} has been loaded
LoadContent with several file
01-08-2016 09:56:17:501 173  INFO  org.asqatasun.service.command.UploadAuditCommandImpl  - Loading files content {file:///My File Name2=MyFileContent2, file:///My File Name1=MyFileContent1}
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<< FAILURE! - in org.asqatasun.service.command.UploadAuditCommandImplTest
testLoadContent2(org.asqatasun.service.command.UploadAuditCommandImplTest)  Time elapsed: 0.01 sec  <<< ERROR!
java.lang.AssertionError: 
  Unexpected method call WebResourceDataService.createSite("file:///My File Name2"):
    WebResourceDataService.createSite("file:///My File Name1"): expected: 1, actual: 0
    WebResourceDataService.createPage("file:///My File Name1"): expected: 1, actual: 0
    WebResourceDataService.createPage("file:///My File Name2"): expected: 1, actual: 0
    WebResourceDataService.saveOrUpdate(EasyMock for interface org.asqatasun.entity.subject.Site): expected: 2, actual: 0
    WebResourceDataService.saveOrUpdate(EasyMock for interface org.asqatasun.entity.subject.Page): expected: 1, actual: 0
    WebResourceDataService.saveOrUpdate(EasyMock for interface org.asqatasun.entity.subject.Page): expected: 1, actual: 0
    at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:44)
    at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:85)
    at com.sun.proxy.$Proxy7.createSite(Unknown Source)
    at org.asqatasun.service.command.UploadAuditCommandImpl.createWebResources(UploadAuditCommandImpl.java:126)
    at org.asqatasun.service.command.UploadAuditCommandImpl.loadContent(UploadAuditCommandImpl.java:101)
    at org.asqatasun.service.command.UploadAuditCommandImplTest.testLoadContent2(UploadAuditCommandImplTest.java:190)

Running org.asqatasun.service.command.GroupOfPagesCrawlerAuditCommandImplTest
callCrawlerService
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.asqatasun.service.command.GroupOfPagesCrawlerAuditCommandImplTest
Running org.asqatasun.service.command.factory.AuditCommandFactoryImplTest
create PageAuditCommand with crawler
create PageAuditCommand without crawler
create SiteAuditCommand
create UploadAuditCommand
create GroupOfPagesAuditCommand with crawler
create GroupOfPagesAuditCommand without crawler
create ScenarioAuditCommand
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in org.asqatasun.service.command.factory.AuditCommandFactoryImplTest
Running org.asqatasun.service.AuditServiceThreadQueueImplTest
add
setPageAuditExecutionListMax
setSiteAuditExecutionListMax
setUploadAuditExecutionListMax
setScenarioAuditExecutionListMax
remove
addPageAudit
addPageAuditWithConcurrentAccessAndMaxSizeReached
addScenarioAudit
addPageUploadAudit
addSiteAudit
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.549 sec - in org.asqatasun.service.AuditServiceThreadQueueImplTest
Running org.asqatasun.service.AuditServiceImplTest
auditPage
auditSite
auditGroupOfPages
auditPageUploadWithOneFile
auditScenario
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.156 sec - in org.asqatasun.service.AuditServiceImplTest

Results :

Tests in error: 
  org.asqatasun.service.command.UploadAuditCommandImplTest#testLoadContent2  
  ...

#7

Est ce que le probleme existe aussi sur la branche upgrade_spring_and_hibernate ?
Parce que je pense l’avoir corrigé (mais je plus comment :/)


#8

Nope. Du moins, tout compile sauf la fin sur une erreur du plugin Assembly (donc rien à voir).


#9

@koj, j’ai récupéré le commit qui semble faire le travail
visible dans la branche “fix_openjdk-8” basée sur la branche develop

Comme le dit @mfaure, “tout compile sauf la fin sur une erreur du plugin Assembly”

[INFO] asqatasun .......................................... SUCCESS [  0.151 s]
[INFO] engine ............................................. SUCCESS [  0.004 s]
   (...)
[INFO] scenarioloader ..................................... SUCCESS [  0.128 s]
[INFO] asqatasun-engine ................................... SUCCESS [  7.952 s]
[INFO] asqatasun-resources ................................ SUCCESS [  0.054 s]
    (...)
[INFO] tgol-report ........................................ SUCCESS [  0.082 s]
[INFO] tgol-security ...................................... SUCCESS [  0.033 s]
[INFO] asqatasun-web-app .................................. FAILURE [  7.575 s]
[INFO] runner ............................................. SKIPPED
[INFO] asqatasun-runner ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4.1:assembly (make-assembly) on project asqatasun-web-app: Assembly is incorrectly configured: null: Assembly is incorrectly configured: null:
[ERROR] Assembly: null is not configured correctly: Assembly ID must be present and non-empty.

à noter que Travis compile complètement le projet avec openJDK-7
https://travis-ci.org/Asqatasun/Asqatasun/builds/149044366


#10

pour une compilation déconnecté de l’OS via Docker (open-jdk7 + maven)

git clone (...)
cd Asqatasun
docker pull maven:3-jdk-7
docker run -it --rm --name mvn-jdk7 -v "$PWD":/usr/src/asqa -w /usr/src/asqa maven:3-jdk-7 mvn clean install

résultat : [INFO] BUILD SUCCESS


de la même manière, il aussi possible d’utiliser open-jdk8

git clone (...)
cd Asqatasun
docker pull maven:3-jdk-8
docker run -it --rm --name mvn-jdk8 -v "$PWD":/usr/src/asqa -w /usr/src/asqa maven:3-jdk-8 mvn clean install

échec identique à la compilation
faite sur un ordinateur sous Ubuntu 16.04 (migré récemment à partir de Ubuntu 14.04) :
[INFO] scenarioloader … SUCCESS
[INFO] asqatasun-engine … FAILURE
(…)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------


Par contre, si l’on bascule sur la branche fix_openjdk-8 qui contient le correctif de @koj,
la compilation (tjs via Docker) va jusqu’au bout contrairement à la compilation faite directement sur l’ordinateur sous Ubuntu 16.04 qui bloquait à la fin sur une erreur du plugin Assembly.

git clone (...)
cd Asqatasun
docker pull maven:3-jdk-8
git checkout fix_openjdk-8
docker run -it --rm --name mvn-jdk8 -v "$PWD":/usr/src/asqa -w /usr/src/asqa maven:3-jdk-8 mvn clean install
[INFO] asqatasun-web-app .................................. SUCCESS 
[INFO] runner ............................................. SUCCESS 
[INFO] asqatasun-runner ................................... SUCCESS 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

#11

suite au test précédent fait avec l’image docker de maven Jdk8
j’ai forcé le téléchargement des dépendances sur l’ordinateur (Ubuntu 16.04)
via :

rm -rvf ~/.m2/
git clone (...)
cd Asqatasun
git checkout fix_openjdk-8
mv clean install

mais le build échoue toujours sur une erreur du plugin Assembly
pour le projet asqatasun-web-app .

Plus trop d’idée pour régler le problème… :frowning:
même si l’image docker de maven/jdk7 nous permet de compiler le projet. :slight_smile:


#12

la pull request #116 semble faire le job… :basketball:
avec :

  1. le correctif de @koj pour le projet asqatasun-engine compilé avec OpenJDK-8
  2. un correctif pour l’erreur du plugin Assembly pour les projets webApp et runner compilé avec OpenJDK-8 sur Ubuntu 16.04 Desktop

à noter que je ne comprend toujours pas pourquoi la compilation via l’image docker de maven:3-jdk-8 n’a pas le problème du plugin Assembly.


#13

fixé dans la release 4.0.3