From 9b2ccf85ce0b0b5967f6cc20b862a798e922fc30 Mon Sep 17 00:00:00 2001 From: Dominick Leppich Date: Sat, 2 Mar 2024 14:33:34 +0100 Subject: [PATCH] migrate: auto-migrate --- .gitignore | 20 ++++ Jenkinsfile | 48 ++++++-- plugin/build.xml => build.xml | 0 module-base/pom.xml | 10 ++ .../ProcessInspectionWorkflowPlugin.java | 0 .../de/intranda/goobi/plugins/StepChange.java | 0 .../goobi/process/ExtendedProcessManager.java | 0 .../process/ExtendedProcessPaginator.java | 0 .../org/goobi/process/ExtendendProcess.java | 0 .../plugins/ProcessInspectionPluginTest.java | 0 .../src/test/resources}/resources/log4j2.xml | 0 module-gui/pom.xml | 18 +++ .../src/main/webapp/META-INF/faces-config.xml | 33 ++++++ .../plugin_workflow_processInspection.xhtml | 0 plugin/.classpath | 39 ------- plugin/.gitignore | 3 - plugin/.project | 23 ---- .../org.eclipse.core.resources.prefs | 2 - plugin/.settings/org.eclipse.jdt.core.prefs | 15 --- plugin/.settings/org.eclipse.m2e.core.prefs | 4 - .../org.jboss.ide.eclipse.as.core.prefs | 2 - plugin/module-gui/.gitignore | 2 - plugin/module-gui/pom.xml | 90 --------------- plugin/module-main/.gitignore | 2 - plugin/module-main/pom.xml | 108 ------------------ plugin/pom.xml | 47 -------- plugin/src/test/resources/.gitignore | 1 - ...in_intranda_workflow_processinspection.xml | 0 pom.xml | 29 +++++ 29 files changed, 149 insertions(+), 347 deletions(-) create mode 100644 .gitignore rename plugin/build.xml => build.xml (100%) create mode 100644 module-base/pom.xml rename {plugin => module-base}/src/main/java/de/intranda/goobi/plugins/ProcessInspectionWorkflowPlugin.java (100%) rename {plugin => module-base}/src/main/java/de/intranda/goobi/plugins/StepChange.java (100%) rename {plugin => module-base}/src/main/java/org/goobi/process/ExtendedProcessManager.java (100%) rename {plugin => module-base}/src/main/java/org/goobi/process/ExtendedProcessPaginator.java (100%) rename {plugin => module-base}/src/main/java/org/goobi/process/ExtendendProcess.java (100%) rename {plugin => module-base}/src/test/java/de/intranda/goobi/plugins/ProcessInspectionPluginTest.java (100%) rename {plugin/src/test => module-base/src/test/resources}/resources/log4j2.xml (100%) create mode 100644 module-gui/pom.xml create mode 100644 module-gui/src/main/webapp/META-INF/faces-config.xml rename {plugin/src/main/resources/GUI/META-INF => module-gui/src/main/webapp}/resources/uii/plugin_workflow_processInspection.xhtml (100%) delete mode 100644 plugin/.classpath delete mode 100644 plugin/.gitignore delete mode 100644 plugin/.project delete mode 100644 plugin/.settings/org.eclipse.core.resources.prefs delete mode 100644 plugin/.settings/org.eclipse.jdt.core.prefs delete mode 100644 plugin/.settings/org.eclipse.m2e.core.prefs delete mode 100644 plugin/.settings/org.jboss.ide.eclipse.as.core.prefs delete mode 100644 plugin/module-gui/.gitignore delete mode 100644 plugin/module-gui/pom.xml delete mode 100644 plugin/module-main/.gitignore delete mode 100644 plugin/module-main/pom.xml delete mode 100644 plugin/pom.xml delete mode 100644 plugin/src/test/resources/.gitignore rename plugin/plugin_intranda_workflow_processinspection.xml => plugin_intranda_workflow_processinspection.xml (100%) create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f88813 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ + +# Junk files +*~ +.DS_Store + +# Build +target/ +bin/ +build/ +node_modules/ + +# Eclipse +.project +.classpath +.settings/ + +# IntelliJ IDEA +.idea +*.iml + diff --git a/Jenkinsfile b/Jenkinsfile index 44df4ed..1d5c15f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,9 +1,13 @@ + pipeline { agent { docker { - image 'maven:3-jdk-11' - args '-v $HOME/.m2:/var/maven/.m2:z -u 1000 -ti -e _JAVA_OPTIONS=-Duser.home=/var/maven -e MAVEN_CONFIG=/var/maven/.m2' + /* using a custom build image with a defined home directory for UID 1000 among other things */ + image 'nexus.intranda.com:4443/maven:3.9.3-eclipse-temurin-17' + registryUrl 'https://nexus.intranda.com:4443' + registryCredentialsId 'jenkins-docker' + args '-v $HOME/.m2:/var/maven/.m2:z -v $HOME/.config:/var/maven/.config -v $HOME/.sonar:/var/maven/.sonar -u 1000 -ti -e _JAVA_OPTIONS=-Duser.home=/var/maven -e MAVEN_CONFIG=/var/maven/.m2' } } @@ -11,24 +15,52 @@ pipeline { buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '15', daysToKeepStr: '90', numToKeepStr: '') } - - stages { stage('prepare') { steps { - sh 'git clean -fdx' + sh 'git reset --hard HEAD && git clean -fdx' } } stage('build') { steps { - sh 'mvn -f plugin/pom.xml package' + sh 'mvn clean verify -U' recordIssues enabledForFailure: true, aggregatingResults: true, tools: [java(), javaDoc()] } } + + stage('sonarcloud') { + when { + anyOf { + branch 'master' + branch 'sonar_*' + } + } + steps { + withCredentials([string(credentialsId: 'jenkins-sonarcloud', variable: 'TOKEN')]) { + sh 'mvn verify sonar:sonar -Dsonar.token=$TOKEN -U' + } + } + } + } - + post { + always { + junit "**/target/surefire-reports/*.xml" + step([ + $class : 'JacocoPublisher', + execPattern : '**/target/jacoco.exec', + classPattern : '**/target/classes/', + sourcePattern : '**/src/main/java', + exclusionPattern : '**/*Test.class' + ]) + recordIssues ( + enabledForFailure: true, aggregatingResults: false, + tools: [checkStyle(pattern: 'target/checkstyle-result.xml', reportEncoding: 'UTF-8')] + ) + dependencyCheckPublisher pattern: 'target/dependency-check-report.xml' + } success { archiveArtifacts artifacts: '**/target/*.jar, */plugin_*.xml, plugin_*.xml', fingerprint: true, onlyIfSuccessful: true } @@ -42,5 +74,3 @@ pipeline { } } } - -/* vim: set ts=2 sw=2 tw=120 et :*/ \ No newline at end of file diff --git a/plugin/build.xml b/build.xml similarity index 100% rename from plugin/build.xml rename to build.xml diff --git a/module-base/pom.xml b/module-base/pom.xml new file mode 100644 index 0000000..ac569ba --- /dev/null +++ b/module-base/pom.xml @@ -0,0 +1,10 @@ + + 4.0.0 + + io.goobi.workflow.plugin + plugin-workflow-processInspection + 24.03-SNAPSHOT + + plugin-workflow-processInspection-base + jar + \ No newline at end of file diff --git a/plugin/src/main/java/de/intranda/goobi/plugins/ProcessInspectionWorkflowPlugin.java b/module-base/src/main/java/de/intranda/goobi/plugins/ProcessInspectionWorkflowPlugin.java similarity index 100% rename from plugin/src/main/java/de/intranda/goobi/plugins/ProcessInspectionWorkflowPlugin.java rename to module-base/src/main/java/de/intranda/goobi/plugins/ProcessInspectionWorkflowPlugin.java diff --git a/plugin/src/main/java/de/intranda/goobi/plugins/StepChange.java b/module-base/src/main/java/de/intranda/goobi/plugins/StepChange.java similarity index 100% rename from plugin/src/main/java/de/intranda/goobi/plugins/StepChange.java rename to module-base/src/main/java/de/intranda/goobi/plugins/StepChange.java diff --git a/plugin/src/main/java/org/goobi/process/ExtendedProcessManager.java b/module-base/src/main/java/org/goobi/process/ExtendedProcessManager.java similarity index 100% rename from plugin/src/main/java/org/goobi/process/ExtendedProcessManager.java rename to module-base/src/main/java/org/goobi/process/ExtendedProcessManager.java diff --git a/plugin/src/main/java/org/goobi/process/ExtendedProcessPaginator.java b/module-base/src/main/java/org/goobi/process/ExtendedProcessPaginator.java similarity index 100% rename from plugin/src/main/java/org/goobi/process/ExtendedProcessPaginator.java rename to module-base/src/main/java/org/goobi/process/ExtendedProcessPaginator.java diff --git a/plugin/src/main/java/org/goobi/process/ExtendendProcess.java b/module-base/src/main/java/org/goobi/process/ExtendendProcess.java similarity index 100% rename from plugin/src/main/java/org/goobi/process/ExtendendProcess.java rename to module-base/src/main/java/org/goobi/process/ExtendendProcess.java diff --git a/plugin/src/test/java/de/intranda/goobi/plugins/ProcessInspectionPluginTest.java b/module-base/src/test/java/de/intranda/goobi/plugins/ProcessInspectionPluginTest.java similarity index 100% rename from plugin/src/test/java/de/intranda/goobi/plugins/ProcessInspectionPluginTest.java rename to module-base/src/test/java/de/intranda/goobi/plugins/ProcessInspectionPluginTest.java diff --git a/plugin/src/test/resources/log4j2.xml b/module-base/src/test/resources/resources/log4j2.xml similarity index 100% rename from plugin/src/test/resources/log4j2.xml rename to module-base/src/test/resources/resources/log4j2.xml diff --git a/module-gui/pom.xml b/module-gui/pom.xml new file mode 100644 index 0000000..1ab9ec5 --- /dev/null +++ b/module-gui/pom.xml @@ -0,0 +1,18 @@ + + 4.0.0 + + io.goobi.workflow.plugin + plugin-workflow-processInspection + 24.03-SNAPSHOT + + plugin-workflow-processInspection-gui + jar + + + + META-INF/resources + src/main/webapp/resources + + + + \ No newline at end of file diff --git a/module-gui/src/main/webapp/META-INF/faces-config.xml b/module-gui/src/main/webapp/META-INF/faces-config.xml new file mode 100644 index 0000000..0448938 --- /dev/null +++ b/module-gui/src/main/webapp/META-INF/faces-config.xml @@ -0,0 +1,33 @@ + + + + + + + + + org.goobi.production.messages.MyRessourceBundle + msgs + + + diff --git a/plugin/src/main/resources/GUI/META-INF/resources/uii/plugin_workflow_processInspection.xhtml b/module-gui/src/main/webapp/resources/uii/plugin_workflow_processInspection.xhtml similarity index 100% rename from plugin/src/main/resources/GUI/META-INF/resources/uii/plugin_workflow_processInspection.xhtml rename to module-gui/src/main/webapp/resources/uii/plugin_workflow_processInspection.xhtml diff --git a/plugin/.classpath b/plugin/.classpath deleted file mode 100644 index f9d3200..0000000 --- a/plugin/.classpath +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugin/.gitignore b/plugin/.gitignore deleted file mode 100644 index 07ec78b..0000000 --- a/plugin/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/bin/ -/target/ -.DS_Store \ No newline at end of file diff --git a/plugin/.project b/plugin/.project deleted file mode 100644 index 1a4251d..0000000 --- a/plugin/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - goobi-plugin-workflow-processInspection - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/plugin/.settings/org.eclipse.core.resources.prefs b/plugin/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/plugin/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/plugin/.settings/org.eclipse.jdt.core.prefs b/plugin/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 0fee6a9..0000000 --- a/plugin/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,15 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/plugin/.settings/org.eclipse.m2e.core.prefs b/plugin/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f..0000000 --- a/plugin/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/plugin/.settings/org.jboss.ide.eclipse.as.core.prefs b/plugin/.settings/org.jboss.ide.eclipse.as.core.prefs deleted file mode 100644 index cf3aa3a..0000000 --- a/plugin/.settings/org.jboss.ide.eclipse.as.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.jboss.ide.eclipse.as.core.singledeployable.deployableList= diff --git a/plugin/module-gui/.gitignore b/plugin/module-gui/.gitignore deleted file mode 100644 index 7326dd9..0000000 --- a/plugin/module-gui/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target/ -.DS_Store \ No newline at end of file diff --git a/plugin/module-gui/pom.xml b/plugin/module-gui/pom.xml deleted file mode 100644 index 3e1ffa5..0000000 --- a/plugin/module-gui/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - 4.0.0 - de.intranda.goobi.plugins.workflow - processInspection-gui - 24.02 - - plugin_intranda_workflow_processInspection-GUI - /opt/digiverso/goobi/plugins/GUI/ - 1.8 - 1.8 - - - de.intranda.goobi.plugins.workflow - processInspection - 24.02 - - - ${jar.name} - ${project.basedir}/../src/main/java - - - ../src/main/resources/GUI - - - ../src/main/java - - **/*.java - - - **org/goobi/process/*.class - - - - - - maven-compiler-plugin - 3.7.0 - - - **/de/intranda/goobi/**/*.java - - - - - org.codehaus.mojo - buildnumber-maven-plugin - 1.4 - - - validate - - create - - - - - 10 - false - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.0 - - - - ${maven.build.timestamp} - - - - Versions - - ${project.version} - ${buildNumber} - ${scmBranch} - ${goobi.version} - - - - - - - - - - scm:git:ssh://git@gitea.intranda.com:goobi-workflow/goobi-plugin-workflow-processInspection.git - scm:git:ssh://git@gitea.intranda.com:goobi-workflow/goobi-plugin-workflow-processInspection.git - - diff --git a/plugin/module-main/.gitignore b/plugin/module-main/.gitignore deleted file mode 100644 index 7326dd9..0000000 --- a/plugin/module-main/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target/ -.DS_Store \ No newline at end of file diff --git a/plugin/module-main/pom.xml b/plugin/module-main/pom.xml deleted file mode 100644 index 8b660bb..0000000 --- a/plugin/module-main/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ - - 4.0.0 - de.intranda.goobi.plugins.workflow - processInspection-main - 24.02 - - plugin_intranda_workflow_processInspection - /opt/digiverso/goobi/plugins/workflow/ - - - de.intranda.goobi.plugins.workflow - processInspection - 24.02 - - - ${jar.name} - ${project.basedir}/../src/main/java - ${project.basedir}/../src/test/java - - - src/main/java - - **/org/goobi/process/* - - - - - - maven-compiler-plugin - 3.7.0 - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.1 - - false - - - - pl.project13.maven - git-commit-id-plugin - 2.2.1 - - - - revision - - - - - flat - - true - - - - - org.codehaus.mojo - buildnumber-maven-plugin - 1.4 - - - validate - - create - - - - - 10 - false - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.0 - - - - ${maven.build.timestamp} - - - - Versions - - ${project.version} - ${buildNumber} - ${scmBranch} - ${goobi.version} - - - - - - - - - - scm:git:ssh://git@gitea.intranda.com:goobi-workflow/goobi-plugin-workflow-processInspection.git - scm:git:ssh://git@gitea.intranda.com:goobi-workflow/goobi-plugin-workflow-processInspection.git - - diff --git a/plugin/pom.xml b/plugin/pom.xml deleted file mode 100644 index 2c1b22c..0000000 --- a/plugin/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - 4.0.0 - de.intranda.goobi.plugins.workflow - processInspection - 24.02 - pom - - 24.02 - UTF-8 - - - - intranda-releases - https://nexus.intranda.com/repository/maven-releases - - - - - intranda-public - https://nexus.intranda.com/repository/maven-public - - - - module-main - module-gui - - - - de.intranda.goobi.workflow - goobi-core-jar - ${goobi.version} - - - org.projectlombok - lombok - 1.18.22 - provided - - - - junit - junit - 4.12 - test - - - diff --git a/plugin/src/test/resources/.gitignore b/plugin/src/test/resources/.gitignore deleted file mode 100644 index 496ee2c..0000000 --- a/plugin/src/test/resources/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.DS_Store \ No newline at end of file diff --git a/plugin/plugin_intranda_workflow_processinspection.xml b/plugin_intranda_workflow_processinspection.xml similarity index 100% rename from plugin/plugin_intranda_workflow_processinspection.xml rename to plugin_intranda_workflow_processinspection.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..f60e2f5 --- /dev/null +++ b/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + + io.goobi.workflow + workflow-base + 24.03-SNAPSHOT + + io.goobi.workflow.plugin + plugin-workflow-processInspection + pom + + module-base + module-gui + + + + intranda-public + https://nexus.intranda.com/repository/maven-public + + + + + io.goobi.workflow + workflow-core + ${project.version} + classes + + + \ No newline at end of file