docdoku / docdoku-plm

The project purpose is to develop a comprehensive, robust open source PLM (Product LifeCycle Management) solution.
http://www.docdokuplm.com
GNU Affero General Public License v3.0
237 stars 97 forks source link

build and running tests => sonarqube #1209

Open mhow2 opened 5 years ago

mhow2 commented 5 years ago

I'm trying to run the tests in a CI env in order to feed to sonarqube instance. in the latest step, instead of mvn install, I'm doing mvn clean test and it fails with the following error:

https://gitlab.ow2.org/ow2/oscar/docdoku/-/jobs/15326

I am following the build instructions provided at

https://github.com/docdoku/docdoku-plm/wiki/Software-Configuration ( but with mvn clean test in docdoku)

Here is the build definition:

https://gitlab.ow2.org/ow2/oscar/docdoku/blob/master/.gitlab-ci.yml

What do I miss ?

mhow2 commented 5 years ago

It seems there is http://sonar.docdoku.net/overview?id=com.docdoku%3Adocdoku-plm available so this is not top priority ;)

mhow2 commented 4 years ago

@florentgarin hello. Your sonarqube install is a bit old and the API incompatible with our metric collector. To circumvent, Ideally I would need working instructions how to build the software because the instructions provided at https://github.com/docdoku/docdoku-plm/wiki/Software-Configuration doesn't work for me.

I tried on my local machine, exactly like described and it fails with:

...
[WARNING] The POM for org.polarsys.eplmp:eplmp-core:jar:2.5.5 is missing, no dependency information available
[WARNING] The POM for org.polarsys.eplmp:eplmp-server-rest:jar:sources:2.5.5 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for docdoku-plm DocDokuPLM 2.5.5:
[INFO] 
[INFO] docdoku-plm DocDokuPLM ............................. SUCCESS [  0.439 s]
[INFO] docdoku-api ........................................ FAILURE [  1.554 s]
[INFO] docdoku-api-java ................................... SKIPPED
[INFO] docdoku-api-js ..................................... SKIPPED
[INFO] docdoku-cli Command Line Interface ................. SKIPPED
[INFO] Converter for COLLADA files ........................ SKIPPED
[INFO] converter-dae-ejb .................................. SKIPPED
[INFO] converter-dae-ear .................................. SKIPPED
[INFO] All Converter ...................................... SKIPPED
[INFO] converter-all-ejb .................................. SKIPPED
[INFO] converter-all-ear .................................. SKIPPED
[INFO] IFC Converter ...................................... SKIPPED
[INFO] converter-ifc-ejb .................................. SKIPPED
[INFO] converter-ifc-ear .................................. SKIPPED
[INFO] Wavefront OBJ Converter ............................ SKIPPED
[INFO] converter-obj-ejb .................................. SKIPPED
[INFO] converter-obj-ear .................................. SKIPPED
[INFO] STEP Converter ..................................... SKIPPED
[INFO] converter-step-ejb ................................. SKIPPED
[INFO] converter-step-ear ................................. SKIPPED
[INFO] Attributes importer ................................ SKIPPED
[INFO] importer-attributes-ejb ............................ SKIPPED
[INFO] importer-attributes-ear ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.665 s
[INFO] Finished at: 2019-10-01T17:00:56+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project docdoku-api: Could not resolve dependencies for project com.docdoku:docdoku-api:jar:2.5.5: The following artifacts could not be resolved: org.polarsys.eplmp:eplmp-core:jar:2.5.5, org.polarsys.eplmp:eplmp-server-rest:jar:sources:2.5.5: Failure to find org.polarsys.eplmp:eplmp-core:jar:2.5.5 in https://artifacts.elastic.co/maven was cached in the local repository, resolution will not be reattempted until the update interval of elasticsearch-releases has elapsed or updates are forced -> [Help 1]
florentgarin commented 4 years ago

Hi,

Thank you for your input. The failure is probably due to the fact that you did not build eplmp before as explain there : https://github.com/docdoku/docdoku-plm/wiki/Software-Configuration

Florent

Le mar. 1 oct. 2019 à 17:05, mhow2 notifications@github.com a écrit :

@florentgarin https://github.com/florentgarin hello. Your sonarqube install is a bit old and the API incompatible with our metric collector. To circumvent, Ideally I would need working instructions how to build the software because the instructions provided at https://github.com/docdoku/docdoku-plm/wiki/Software-Configuration doesn't work for me.

I tried on my local machine, exactly like described and it fails with:

... [WARNING] The POM for org.polarsys.eplmp:eplmp-core:jar:2.5.5 is missing, no dependency information available [WARNING] The POM for org.polarsys.eplmp:eplmp-server-rest:jar:sources:2.5.5 is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for docdoku-plm DocDokuPLM 2.5.5: [INFO] [INFO] docdoku-plm DocDokuPLM ............................. SUCCESS [ 0.439 s] [INFO] docdoku-api ........................................ FAILURE [ 1.554 s] [INFO] docdoku-api-java ................................... SKIPPED [INFO] docdoku-api-js ..................................... SKIPPED [INFO] docdoku-cli Command Line Interface ................. SKIPPED [INFO] Converter for COLLADA files ........................ SKIPPED [INFO] converter-dae-ejb .................................. SKIPPED [INFO] converter-dae-ear .................................. SKIPPED [INFO] All Converter ...................................... SKIPPED [INFO] converter-all-ejb .................................. SKIPPED [INFO] converter-all-ear .................................. SKIPPED [INFO] IFC Converter ...................................... SKIPPED [INFO] converter-ifc-ejb .................................. SKIPPED [INFO] converter-ifc-ear .................................. SKIPPED [INFO] Wavefront OBJ Converter ............................ SKIPPED [INFO] converter-obj-ejb .................................. SKIPPED [INFO] converter-obj-ear .................................. SKIPPED [INFO] STEP Converter ..................................... SKIPPED [INFO] converter-step-ejb ................................. SKIPPED [INFO] converter-step-ear ................................. SKIPPED [INFO] Attributes importer ................................ SKIPPED [INFO] importer-attributes-ejb ............................ SKIPPED [INFO] importer-attributes-ear ............................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.665 s [INFO] Finished at: 2019-10-01T17:00:56+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project docdoku-api: Could not resolve dependencies for project com.docdoku:docdoku-api:jar:2.5.5: The following artifacts could not be resolved: org.polarsys.eplmp:eplmp-core:jar:2.5.5, org.polarsys.eplmp:eplmp-server-rest:jar:sources:2.5.5: Failure to find org.polarsys.eplmp:eplmp-core:jar:2.5.5 in https://artifacts.elastic.co/maven was cached in the local repository, resolution will not be reattempted until the update interval of elasticsearch-releases has elapsed or updates are forced -> [Help 1]

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/docdoku/docdoku-plm/issues/1209?email_source=notifications&email_token=AAGUB6XVIAHI4ZVEMEMT2ILQMNRL5A5CNFSM4HXHK642YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEABTDUA#issuecomment-537080272, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGUB6VB3ZDDNEHPENYEBQDQMNRL5ANCNFSM4HXHK64Q .

-- Florent Garin Managing partner / CTO Mobile : + 336 81 91 01 71 DocDoku - http://www.docdoku.com Award Winning platform for digital enterprise applications Paris : 41 rue de la Chaussée d’Antin - 75009 Paris - Tel : + 331 85 09 69 44 Toulouse : 76 allée Jean Jaurès - 31000 Toulouse - Tel : + 335 61 72 24 09

mhow2 commented 4 years ago

Hi Florent and thanks. For some reason, I restarted from scratch and it worked... However, I've been trying to guess how to run jacoco & surefire, so I tried the env-ci profile and look for a file jacoco.exec, and found only one in the whole build structure:

./converter-dae/converter-dae-ejb/target/jacoco.exec

Is it expected ?

Anyway, I then ran maven with sonar:sonar and got this : https://sonarqube.ow2.org/dashboard?id=com.docdoku%3Adocdoku-plm and more specifically https://sonarqube.ow2.org/code?id=com.docdoku%3Adocdoku-plm . As you see it is very different than what's reported on your sonarqube instance ; it looks to me that older sonarqube version like yours is not computing the total coverage the same way as the newer one do : in your you get a total % coverage as high as any of the component gets. On the new one, it seems you only get an % average of the component covered which makes a huge difference...

mhow2 commented 3 years ago

@florentgarin : by the way, the SonarQube instance mentioned in https://www.docdokuplm.com/development-zone/ seems offline ?