Commit fb9e7610 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '810-make-code-compatible-with-java-11' into 'master'

Resolve "make code compatible with java 11"

Closes #810

See merge request !862
parents fca3d11b d5199100
Pipeline #12123 passed with stage
in 14 minutes and 20 seconds
......@@ -10,7 +10,7 @@ variables:
POSTGRES_USER: map_viewer
POSTGRES_PASSWORD: "123qweasdzxc"
test_frontend:
test:frontend:
stage: test
coverage: '/Statements[:\ ]+(\d+.\d+)\%/'
script:
......@@ -18,11 +18,22 @@ test_frontend:
- npm install
- npm test
test_backend commons:
.jdk_8_template: &jdk_8_definition
image: maven:3.6.0-jdk-8
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.jdk_11_template: &jdk_11_definition
image: maven:3.6.0-jdk-11
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
.test_backend_commons_template:
script: &test_backend_commons_definition
#xvfb is for X11 connection used by some parts of the java code: https://stackoverflow.com/a/47575851/1127920
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y xvfb
......@@ -33,13 +44,8 @@ test_backend commons:
- mvn test -pl commons
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' commons/target/site/jacoco/jacoco.csv
test_backend annotation:
image: maven:3.6.0-jdk-8
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_annotation_template:
script: &test_backend_annotation_definition
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
......@@ -47,11 +53,9 @@ test_backend annotation:
- mvn test -pl annotation
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' annotation/target/site/jacoco/jacoco.csv
test_backend CellDesigner-plugin:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_CellDesigner-plugin_template:
script: &test_backend_CellDesigner_plugin_definition
#xvfb is for X11 connection used by some parts of the java code: https://stackoverflow.com/a/47575851/1127920
- apt-get update
- apt-get install -y xvfb
......@@ -62,115 +66,74 @@ test_backend CellDesigner-plugin:
- mvn test -pl CellDesigner-plugin
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' CellDesigner-plugin/target/site/jacoco/jacoco.csv
test_backend converter:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_converter_template:
script: &test_backend_converter_definition
- mvn -DskipTests=true clean install -pl converter -am
- mvn test -pl converter
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter/target/site/jacoco/jacoco.csv
test_backend converter-graphics:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_converter_graphics_template:
script: &test_backend_converter_graphics_definition
- mvn -DskipTests=true clean install -pl converter-graphics -am
- mvn test -pl converter-graphics
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-graphics/target/site/jacoco/jacoco.csv
test_backend converter-CellDesigner:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_converter_CellDesigner_template:
script: &test_backend_converter_CellDesigner_definition
- mvn -DskipTests=true clean install -pl converter-CellDesigner -am
- mvn test -pl converter-CellDesigner
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-CellDesigner/target/site/jacoco/jacoco.csv
test_backend converter-SBGN-ML:
image: maven:3.6.0-jdk-8
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_converter_SBGNML_template:
script: &test_backend_converter_SBGNML_definition
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl converter-SBGNML -am
- mvn test -pl converter-SBGNML
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-SBGNML/target/site/jacoco/jacoco.csv
test_backend converter-SBML:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_converter_SBML_template:
script: &test_backend_converter_SBML_definition
- mvn -DskipTests=true clean install -pl converter-sbml -am
- mvn test -pl converter-sbml
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-sbml/target/site/jacoco/jacoco.csv
test_backend model:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_model_template:
script: &test_backend_model_definition
- mvn -DskipTests=true clean install -pl model -am
- mvn test -pl model
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' model/target/site/jacoco/jacoco.csv
test_backend model-command:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_model_command_template:
script: &test_backend_model_command_definition
- mvn -DskipTests=true clean install -pl model-command -am
- mvn test -pl model-command
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' model-command/target/site/jacoco/jacoco.csv
test_backend pathvisio:
image: maven:3.6.0-jdk-8
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_pathvisio_template:
script: &test_backend_pathvisio_definition
- mvn -DskipTests=true clean install -pl pathvisio -am
- mvn test -pl pathvisio
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' pathvisio/target/site/jacoco/jacoco.csv
test_backend persist:
image: maven:3.6.0-jdk-8
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_persist_template:
script: &test_backend_persist_definition
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' persist/target/site/jacoco/jacoco.csv
test_backend rest-api:
image: maven:3.6.0-jdk-8
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_rest_template:
script: &test_backend_rest_definition
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl rest-api -am
- mvn test -pl rest-api
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' rest-api/target/site/jacoco/jacoco.csv
test_backend web:
image: maven:3.6.0-jdk-8
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_web_template:
script: &test_backend_web_definition
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y curl gnupg git ant
- curl -sL https://deb.nodesource.com/setup_9.x | bash -
......@@ -181,19 +144,128 @@ test_backend web:
- mvn test -pl web
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' web/target/site/jacoco/jacoco.csv
test_backend service:
image: maven:3.6.0-jdk-8
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
.test_backend_service_template:
script: &test_backend_service_definition
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl service -am
- mvn test -pl service
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' service/target/site/jacoco/jacoco.csv
test:backend:commons:jdk-8:
<<: *jdk_8_definition
script: *test_backend_commons_definition
test:backend:commons:jdk-11:
<<: *jdk_11_definition
script: *test_backend_commons_definition
test:backend:annotation:jdk-8:
<<: *jdk_8_definition
script: *test_backend_annotation_definition
test:backend:annotation:jdk-11:
<<: *jdk_11_definition
script: *test_backend_annotation_definition
test:backend:CellDesigner_plugin:jdk-8:
<<: *jdk_8_definition
script: *test_backend_CellDesigner_plugin_definition
#CellDesigner is working on java 8 and is incompatible with java 11
#test:backend:CellDesigner_plugin:jdk-11:
# <<: *jdk_11_definition
# script: *test_backend_CellDesigner_plugin_definition
test:backend:converter:jdk-8:
<<: *jdk_8_definition
script: *test_backend_converter_definition
test:backend:converter:jdk-11:
<<: *jdk_11_definition
script: *test_backend_converter_definition
test:backend:converter_graphics:jdk-8:
<<: *jdk_8_definition
script: *test_backend_converter_graphics_definition
test:backend:converter_graphics:jdk-11:
<<: *jdk_11_definition
script: *test_backend_converter_graphics_definition
test:backend:converter_SBGNML:jdk-8:
<<: *jdk_8_definition
script: *test_backend_converter_SBGNML_definition
test:backend:converter_SBGNML:jdk-11:
<<: *jdk_11_definition
script: *test_backend_converter_SBGNML_definition
test:backend:converter_SBML:jdk-8:
<<: *jdk_8_definition
script: *test_backend_converter_SBML_definition
test:backend:converter_SBML:jdk-11:
<<: *jdk_11_definition
script: *test_backend_converter_SBML_definition
test:backend:model:jdk-8:
<<: *jdk_8_definition
script: *test_backend_model_definition
test:backend:model:jdk-11:
<<: *jdk_11_definition
script: *test_backend_model_definition
test:backend:model_command:jdk-8:
<<: *jdk_8_definition
script: *test_backend_model_command_definition
test:backend:model_command:jdk-11:
<<: *jdk_11_definition
script: *test_backend_model_command_definition
test:backend:pathvisio:jdk-8:
<<: *jdk_8_definition
script: *test_backend_pathvisio_definition
test:backend:pathvisio:jdk-11:
<<: *jdk_11_definition
script: *test_backend_pathvisio_definition
test:backend:persist:jdk-8:
<<: *jdk_8_definition
script: *test_backend_persist_definition
test:backend:persist:jdk-11:
<<: *jdk_11_definition
script: *test_backend_persist_definition
test:backend:rest:jdk-8:
<<: *jdk_8_definition
script: *test_backend_rest_definition
test:backend:rest:jdk-11:
<<: *jdk_11_definition
script: *test_backend_rest_definition
test:backend:service:jdk-8:
<<: *jdk_8_definition
script: *test_backend_service_definition
test:backend:service:jdk-11:
<<: *jdk_11_definition
script: *test_backend_service_definition
test:backend:web:jdk-8:
<<: *jdk_8_definition
script: *test_backend_web_definition
test:backend:web:jdk-11:
<<: *jdk_11_definition
script: *test_backend_web_definition
build_war:
image: maven:3.6.0-jdk-8
stage: build
......@@ -213,18 +285,7 @@ build_war:
- ant maven-build
- cp web/target/web-1.0.war minerva.war
java_11_compatibility:
image: maven:3.6-jdk-11
stage: test
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y curl gnupg git ant
- curl -sL https://deb.nodesource.com/setup_9.x | bash -
- DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
- mvn clean install -DskipTests=true
dependency_conflict_check:
test:dependency_conflict:
image: maven:3.6.0-jdk-8
stage: test
script:
......@@ -413,10 +474,9 @@ test_deploy_with_db_without_superadmin_rights:
- test 200 = $(curl --write-out %{http_code} --silent --output /dev/null -c cookie.txt http://localhost:8080/minerva/api/doLogin)
- test 200 = $(curl --write-out %{http_code} --silent --output /dev/null --cookie cookie.txt http://localhost:8080/minerva/api/projects/)
test_postgres_9_3_compatibility:
.test_database_template: &test_database_definition
image: maven:3.6.0-jdk-8
services:
- postgres:9.3
stage: test
script:
- mkdir /etc/minerva/
......@@ -424,25 +484,17 @@ test_postgres_9_3_compatibility:
- mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist
test_postgres_9_3_compatibility:
<<: *test_database_definition
services:
- postgres:9.3
test_postgres_10_compatibility:
image: maven:3.6.0-jdk-8
<<: *test_database_definition
services:
- postgres:10
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist
test_postgres_11_compatibility:
image: maven:3.6.0-jdk-8
<<: *test_database_definition
services:
- postgres:11
stage: test
script:
- mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist
......@@ -60,6 +60,24 @@
<version>${xercesImp.version}</version>
</dependency>
<!-- Java xml serialization -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${activation-version}</version>
</dependency>
<dependency>
<groupId>org.sbgn</groupId>
<artifactId>libsbgn</artifactId>
......
......@@ -25,13 +25,14 @@
<jaxws-api.version>2.3.0</jaxws-api.version>
<jaxb.version>2.3.0</jaxb.version>
<txw2.version>2.3.0</txw2.version>
<activation-version>1.1</activation-version>
<apache.httpcomponents.version>4.5.8</apache.httpcomponents.version>
<apache.httpcomponents-core.version>4.4.11</apache.httpcomponents-core.version>
<!-- version 4.x has conflict on dependencies with jsbml 1.4 -->
<apache.poi.version>3.16</apache.poi.version>
<commons-codec.version>1.11</commons-codec.version>
<mockito.version>2.27.0</mockito.version>
<springframework.version>5.0.9.RELEASE</springframework.version>
......@@ -179,7 +180,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<version>0.8.4</version>
<executions>
<execution>
<goals>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment