From c1045fcd26201a8e66e76529972184ab1361ac78 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 24 Jul 2024 19:26:50 +0200 Subject: [PATCH 1/8] Replace old commons-collections:commons-collections by org.apache.commons:commons-collections4 commons-collections4 was already pulled in by other dependencies, and having two packages can cause conflicts and increases the size of the war file. Signed-off-by: Stefan Weil --- Kitodo-DataManagement/pom.xml | 4 ++-- pom.xml | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Kitodo-DataManagement/pom.xml b/Kitodo-DataManagement/pom.xml index 3e23d11c5b0..22fffd5563e 100644 --- a/Kitodo-DataManagement/pom.xml +++ b/Kitodo-DataManagement/pom.xml @@ -44,8 +44,8 @@ commons-codec - commons-collections - commons-collections + org.apache.commons + commons-collections4 commons-io diff --git a/pom.xml b/pom.xml index 1af50162450..f811ca873a0 100644 --- a/pom.xml +++ b/pom.xml @@ -153,9 +153,9 @@ ${commons-codec.version} - commons-collections - commons-collections - 3.2.2 + org.apache.commons + commons-collections4 + 4.4 org.apache.commons @@ -324,10 +324,6 @@ from system library in Java 11+ --> commons-beanutils commons-beanutils - - commons-collections - commons-collections - From ae702b493bcf4d5ba3306fad803bf0c20fb2f8d9 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 25 Jul 2024 07:22:18 +0200 Subject: [PATCH 2/8] Moved dependency org.apache.commons:commons-collections4 from Kitodo-DataManagement to Kitodo Signed-off-by: Stefan Weil --- Kitodo-DataManagement/pom.xml | 4 ---- Kitodo/pom.xml | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Kitodo-DataManagement/pom.xml b/Kitodo-DataManagement/pom.xml index 22fffd5563e..3551fe47f63 100644 --- a/Kitodo-DataManagement/pom.xml +++ b/Kitodo-DataManagement/pom.xml @@ -43,10 +43,6 @@ commons-codec commons-codec - - org.apache.commons - commons-collections4 - commons-io commons-io diff --git a/Kitodo/pom.xml b/Kitodo/pom.xml index 466cd7b1ee9..04893281531 100644 --- a/Kitodo/pom.xml +++ b/Kitodo/pom.xml @@ -34,6 +34,10 @@ + + org.apache.commons + commons-collections4 + org.apache.tomcat tomcat-servlet-api From ab4bc04a80474559a01c6a1077e70e7d022ca052 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 25 Jul 2024 14:48:59 +0200 Subject: [PATCH 3/8] Analyze dependencies and show dependency tree in GitHub CI action Signed-off-by: Stefan Weil --- .github/workflows/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d3f54021dee..1e4b0cb4d6c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,8 +66,12 @@ jobs: - name: check maven version run: mvn --version + - name: Run dependency:analyze + run: + mvn -B dependency:analyze + - name: Run dependency:tree + run: + mvn -B dependency:tree - name: run build run: mvn clean install -B '-Pall-tests,flyway,checkstyle,!development' && xvfb-run --server-args="-screen 0 1600x1280x24" mvn clean install -B '-Pselenium,!development' - - From 80c3697146e5b81e7cb7f146c23c46d88c83fdd6 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 25 Jul 2024 15:00:32 +0200 Subject: [PATCH 4/8] CI: Add config-local/kitodo_projects.xml which is required for dependency:analyze Signed-off-by: Stefan Weil --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e4b0cb4d6c..3b35b9a53e5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,6 +34,8 @@ jobs: run: | cp $GITHUB_WORKSPACE/config/database.yml.actions $GITHUB_WORKSPACE/config/database.yml cp $GITHUB_WORKSPACE/Kitodo-DataManagement/src/main/resources/db/config/flyway.properties.actions $GITHUB_WORKSPACE/Kitodo-DataManagement/src/main/resources/db/config/flyway.properties + mkdir -p $GITHUB_WORKSPACE/config-local + cp $GITHUB_WORKSPACE/Kitodo/src/main/resources/kitodo_projects.xml $GITHUB_WORKSPACE/config-local # Runs a set of commands using the runners shell - name: start mysql From b09475ea62b7fb14fc7a4f9d8267f14c33fe6062 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 25 Jul 2024 15:07:55 +0200 Subject: [PATCH 5/8] CI: Add config-local/kitodo_config.properties which is required for dependency:analyze Signed-off-by: Stefan Weil --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b35b9a53e5..944222a2f6a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,6 +35,7 @@ jobs: cp $GITHUB_WORKSPACE/config/database.yml.actions $GITHUB_WORKSPACE/config/database.yml cp $GITHUB_WORKSPACE/Kitodo-DataManagement/src/main/resources/db/config/flyway.properties.actions $GITHUB_WORKSPACE/Kitodo-DataManagement/src/main/resources/db/config/flyway.properties mkdir -p $GITHUB_WORKSPACE/config-local + cp $GITHUB_WORKSPACE/Kitodo/src/main/resources/kitodo_config.properties $GITHUB_WORKSPACE/config-local cp $GITHUB_WORKSPACE/Kitodo/src/main/resources/kitodo_projects.xml $GITHUB_WORKSPACE/config-local # Runs a set of commands using the runners shell From 1f010e9100994dd07fd5107fc95426e5ece8b8fe Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 25 Jul 2024 15:22:14 +0200 Subject: [PATCH 6/8] CI: Run production build which is required for dependency:tree Signed-off-by: Stefan Weil --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 944222a2f6a..1d3c526fe89 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,6 +72,9 @@ jobs: - name: Run dependency:analyze run: mvn -B dependency:analyze + - name: Run production build (required for dependency tree) + run: + mvn -B clean install - name: Run dependency:tree run: mvn -B dependency:tree From e48caf66d7e0019d830172ee0bdce30259493ee8 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 25 Jul 2024 15:32:57 +0200 Subject: [PATCH 7/8] CI: Create directory which is required for development build Signed-off-by: Stefan Weil --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d3c526fe89..4cf25d0fd43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,7 +73,9 @@ jobs: run: mvn -B dependency:analyze - name: Run production build (required for dependency tree) - run: + run: | + sudo mkdir -p /usr/local/kitodo/modules + ls -l /usr/local/kitodo $GITHUB_WORKSPACE mvn -B clean install - name: Run dependency:tree run: From f344e6674ca7620cc0c0ceb065cd491e1fd98d82 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 25 Jul 2024 15:46:26 +0200 Subject: [PATCH 8/8] CI: Run production build which is required for dependency:tree Signed-off-by: Stefan Weil --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4cf25d0fd43..33bc64d07f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,8 +35,8 @@ jobs: cp $GITHUB_WORKSPACE/config/database.yml.actions $GITHUB_WORKSPACE/config/database.yml cp $GITHUB_WORKSPACE/Kitodo-DataManagement/src/main/resources/db/config/flyway.properties.actions $GITHUB_WORKSPACE/Kitodo-DataManagement/src/main/resources/db/config/flyway.properties mkdir -p $GITHUB_WORKSPACE/config-local - cp $GITHUB_WORKSPACE/Kitodo/src/main/resources/kitodo_config.properties $GITHUB_WORKSPACE/config-local - cp $GITHUB_WORKSPACE/Kitodo/src/main/resources/kitodo_projects.xml $GITHUB_WORKSPACE/config-local + # cp $GITHUB_WORKSPACE/Kitodo/src/main/resources/kitodo_config.properties $GITHUB_WORKSPACE/config-local + # cp $GITHUB_WORKSPACE/Kitodo/src/main/resources/kitodo_projects.xml $GITHUB_WORKSPACE/config-local # Runs a set of commands using the runners shell - name: start mysql @@ -71,15 +71,15 @@ jobs: mvn --version - name: Run dependency:analyze run: - mvn -B dependency:analyze + mvn -B '-P!development' dependency:analyze - name: Run production build (required for dependency tree) run: | - sudo mkdir -p /usr/local/kitodo/modules - ls -l /usr/local/kitodo $GITHUB_WORKSPACE - mvn -B clean install + # sudo mkdir -p /usr/local/kitodo/modules + # ls -l /usr/local/kitodo $GITHUB_WORKSPACE + mvn -B '-P!development' clean install - name: Run dependency:tree run: - mvn -B dependency:tree + mvn -B '-P!development' dependency:tree - name: run build run: mvn clean install -B '-Pall-tests,flyway,checkstyle,!development' && xvfb-run --server-args="-screen 0 1600x1280x24" mvn clean install -B '-Pselenium,!development'