From 382d09217a2ca1847e96746e2a815a44d9bd46ef Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Thu, 17 Feb 2022 17:05:27 +0100 Subject: [PATCH] delete jenkins-snapshot profile. Refactoring of all profiles. Added activation option on dev, staging and release profiles. Other changes should be done on settings.xml files in order to work properly. These profiles are currently under test --- pom.xml | 847 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 757 insertions(+), 90 deletions(-) diff --git a/pom.xml b/pom.xml index 132d8f7..b52ee74 100644 --- a/pom.xml +++ b/pom.xml @@ -82,15 +82,15 @@ - - disable-java8-doclint - - [1.8,) - - - -Xdoclint:none - - + + + + + + + + + + true + + + - + + + + + + + + + -Xdoclint:none + 1.8 + ${java_version} + ${java_version} + @@ -189,80 +206,6 @@ ${skip.when.is.release.used} - - - - - - jenkins-snapshots - - false - - jenkins-snapshots - true - - - - - - - gcube-snapshots - gCube Snapshots - ${repository.snapshots.url} - - - gcube-releases - gCube Releases - ${repository.releases.url} - - - gcube-externals - gCube Externals - ${repository.externals.readonly} - - - - - - - gcube-snapshots - gCube Snapshots - ${repository.snapshots.url} - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${plugin.build.helper.version} - - - - build-helper-regex-is-snapshot-used - validate - - regex-property - - - skip.when.is.release.used - ${project.version} - ^((?!.*-SNAPSHOT).)*$ - true - false - - - - - - org.apache.maven.plugins - maven-deploy-plugin - ${plugin.deploy.version} - - ${skip.when.is.release.used} - - org.apache.maven.plugins maven-install-plugin @@ -271,15 +214,313 @@ ${skip.when.is.release.used} - + + + org.codehaus.gmaven + groovy-maven-plugin + 2.0 + + + process-classes + + execute + + + + tag + + + def fileContents = new File("${project.basedir}/CHANGELOG.md").getText('UTF-8') + matcher = (fileContents =~ /(?s).\[v$project.version\].*?/) + if (!matcher.find()) { + throw new IllegalArgumentException("Tag [v$project.version] not found in ${project.basedir}/CHANGELOG.md") + } + assert matcher[0][1]: "Tag [v$project.version] not found in ${project.basedir}/CHANGELOG.md" + + + + + + + + gcube-developer-next + + false + [9,) + + !Release + + + + -Xdoclint:none + 11 + ${java_version} + ${java_version} + + + + + + gcube-snapshots + gCube Snapshots + ${repository.snapshots.url} + + + gcube-releases + gCube Releases + ${repository.releases.url} + + + gcube-externals + gCube Externals + ${repository.externals.readonly} + + + + + + gcube-snapshots + gCube Snapshots + ${repository.snapshots.url} + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${plugin.build.helper.version} + + + + + build-helper-regex-is-snapshot-used + validate + + regex-property + + + skip.when.is.release.used + ${project.version} + ^((?!-SNAPSHOT).)*$ + true + false + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${plugin.deploy.version} + + ${skip.when.is.release.used} + + + + org.apache.maven.plugins + maven-install-plugin + 2.4 + + ${skip.when.is.release.used} + + + + + org.apache.maven.plugins + maven-enforcer-plugin + ${plugin.enforcer.version} + + + enforce + validate + + enforce + + + + + [${maven.version},) + Check for Maven version >=${maven.version} failed. Update your Maven + install. + + + + [11,) + + + + + + + + org.codehaus.gmaven + groovy-maven-plugin + 2.1.1 + + + process-classes + + execute + + + + tag + + + def fileContents = new File("${project.basedir}/CHANGELOG.md").getText('UTF-8') + matcher = (fileContents =~ /(?s).\[v$project.version\].*?/) + if (!matcher.find()) { + throw new IllegalArgumentException("Tag [v$project.version] not found in ${project.basedir}/CHANGELOG.md") + } + assert matcher[0][1]: "Tag [v$project.version] not found in ${project.basedir}/CHANGELOG.md" + + + + + + + + + + + + gcube-developer-old + + [, 1.8) + + !Release + + + + + + + gcube-snapshots + gCube Snapshots + ${repository.snapshots.url} + + + gcube-releases + gCube Releases + ${repository.releases.url} + + + gcube-externals + gCube Externals + ${repository.externals.readonly} + + + + + + + gcube-snapshots + gCube Snapshots + ${repository.snapshots.url} + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${plugin.build.helper.version} + + + + + build-helper-regex-is-snapshot-used + validate + + regex-property + + + skip.when.is.release.used + ${project.version} + ^((?!-SNAPSHOT).)*$ + true + false + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${plugin.deploy.version} + + ${skip.when.is.release.used} + + + + + org.apache.maven.plugins + maven-enforcer-plugin + ${plugin.enforcer.version} + + + enforce + validate + + enforce + + + + + [${maven.version},) + Check for Maven version >=${maven.version} failed. Update your Maven + install. + + + + [1.8,) + + + + + + + + org.codehaus.gmaven + groovy-maven-plugin + 2.0 + + + process-classes + + execute + + + + tag + + + def fileContents = new File("${project.basedir}/CHANGELOG.md").getText('UTF-8') + matcher = (fileContents =~ /(?s).\[v$project.version\].*?/) + if (!matcher.find()) { + throw new IllegalArgumentException("Tag [v$project.version] not found in ${project.basedir}/CHANGELOG.md") + } + assert matcher[0][1]: "Tag [v$project.version] not found in ${project.basedir}/CHANGELOG.md" + + + + + + + + + jenkins-releases - false + [1.8,9) jenkins-releases true @@ -407,11 +648,145 @@ - - jenkins-staging + jenkins-releases-next - false + [9,) + + jenkins-releases + true + + + + + + gcube-releases + gCube Releases + ${repository.releases.url} + + + gcube-jenkins-staging + gCube Jenkins Staging + ${repository.jenkins.staging.url} + + + gcube-jenkins-staging-next + gCube Jenkins Staging Next + ${repository.jenkins.staging.java11.url} + + + gcube-staging + gCube Staging + ${repository.staging.url} + + + gcube-externals + gCube Externals + ${repository.externals.readonly} + + + + + + + gcube-releases + gCube Releases + ${repository.releases.url} + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${plugin.build.helper.version} + + + + build-helper-regex-is-snapshot-used + validate + + regex-property + + + skip.when.is.snapshot.used + ${project.version} + .*-SNAPSHOT$ + true + false + + + + + fail-helper-regex-is-snapshot-used + validate + + regex-property + + + fail.when.is.snapshot.used + ${project.version} + ^((?!.*-SNAPSHOT).)*$ + true + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${plugin.deploy.version} + + + fail-if-snapshot-used + deploy + + ${skip.when.is.snapshot.used} + + + + + + io.github.olivierlemasle.maven + plaintext-maven-plugin + ${plugin.plaintext.version} + + ${env.MAVEN_CONFIG_FOLDER} + + + build_commits.csv + true + + + ${project.groupId},${project.artifactId},${project.version},${project.scm.url},${buildNumber},${repository.releases.url},${project.build.finalName},${project.packaging} + + + + + + + + generate-file + package + + write + + + + + + + ${project.artifactId}-${project.version} + + + + + jenkins-staging-old + + [,1.8) jenkins-staging true @@ -532,6 +907,295 @@ + + + org.apache.maven.plugins + maven-enforcer-plugin + ${plugin.enforcer.version} + + + enforce + validate + + enforce + + + + + [${maven.version},) + Check for Maven version >=${maven.version} failed. Update your Maven + install. + + + + [1.8,) + + + + + + + + ${project.artifactId}-${project.version} + + + + jenkins-staging + + [1.8,9) + + jenkins-staging + true + + + + + + + gcube-staging-jenkins + gCube Jenkins Staging + ${repository.jenkins.staging.url} + + + gcube-staging + gCube Staging + ${repository.staging.url} + + + gcube-releases + gCube Releases + ${repository.releases.url} + + + gcube-externals + gCube Externals + ${repository.externals.readonly} + + + + + + + gcube-staging-jenkins + gCube Staging + ${repository.jenkins.staging.url} + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${plugin.build.helper.version} + + + + build-helper-regex-is-snapshot-used + validate + + regex-property + + + skip.when.is.snapshot.used + ${project.version} + .*-SNAPSHOT$ + true + false + + + + + fail-helper-regex-is-snapshot-used + validate + + regex-property + + + fail.when.is.snapshot.used + ${project.version} + ^((?!.*-SNAPSHOT).)*$ + true + + + + + + io.github.olivierlemasle.maven + plaintext-maven-plugin + ${plugin.plaintext.version} + + ${env.MAVEN_CONFIG_FOLDER} + + + build_commits.csv + true + + + ${project.groupId},${project.artifactId},${project.version},${project.scm.url},${buildNumber},${repository.jenkins.staging.url},${project.build.finalName},${project.packaging} + + + + + + + + generate-file + package + + write + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${plugin.deploy.version} + + + fail-if-snapshot-used + deploy + + ${skip.when.is.snapshot.used} + + + + + + ${project.artifactId}-${project.version} + + + + jenkins-staging-next + + [9,) + + jenkins-staging + true + + + + + + + gcube-staging-jenkins + gCube Jenkins Staging + ${repository.jenkins.staging.url} + + + gcube-staging-jenkins-java11 + gCube Jenkins Staging Java11 + ${repository.jenkins.staging.java11.url} + + + gcube-staging + gCube Staging + ${repository.staging.url} + + + gcube-releases + gCube Releases + ${repository.releases.url} + + + gcube-externals + gCube Externals + ${repository.externals.readonly} + + + + + + + gcube-staging-jenkins-java11 + gCube Staging + ${repository.jenkins.staging.java11.url} + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + ${plugin.build.helper.version} + + + + build-helper-regex-is-snapshot-used + validate + + regex-property + + + skip.when.is.snapshot.used + ${project.version} + .*-SNAPSHOT$ + true + false + + + + + fail-helper-regex-is-snapshot-used + validate + + regex-property + + + fail.when.is.snapshot.used + ${project.version} + ^((?!.*-SNAPSHOT).)*$ + true + + + + + + io.github.olivierlemasle.maven + plaintext-maven-plugin + ${plugin.plaintext.version} + + ${env.MAVEN_CONFIG_FOLDER} + + + build_commits.csv + true + + + ${project.groupId},${project.artifactId},${project.version},${project.scm.url},${buildNumber},${repository.jenkins.staging.java11.url},${project.build.finalName},${project.packaging} + + + + + + + + generate-file + package + + write + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${plugin.deploy.version} + + + fail-if-snapshot-used + deploy + + ${skip.when.is.snapshot.used} + + + + ${project.artifactId}-${project.version} @@ -1131,6 +1795,9 @@ https://nexus.d4science.org/nexus/content/repositories/gcube-staging-jenkins + + https://nexus.d4science.org/nexus/content/repositories/gcube-staging-jenkins-java11 + https://nexus.d4science.org/nexus/content/repositories/gcube-staging/