From d76544d91a96ace3dd1aa7678ac3030672e05b71 Mon Sep 17 00:00:00 2001 From: Stephen Colebourne Date: Fri, 8 Sep 2023 18:02:08 +0100 Subject: [PATCH] Use multi-release jar * Drop classic jar file with no module-info * Move module-info to a multi-release jar setup * Simplify pom.xml * Update versions and checkstyle * Update gitignore --- .github/workflows/build.yml | 2 +- .gitignore | 1 + pom.xml | 659 +++++++++++++++++++--- src/changes/changes.xml | 8 + src/main/checkstyle/checkstyle.xml | 17 +- src/main/{java => java9}/module-info.java | 0 6 files changed, 599 insertions(+), 88 deletions(-) rename src/main/{java => java9}/module-info.java (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5eb595c8..c3cf5b94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [11, 17] steps: - name: Checkout diff --git a/.gitignore b/.gitignore index b6711c18..030860e5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /.settings/ .idea *.iml +*.class diff --git a/pom.xml b/pom.xml index 46652e0c..91e222bf 100644 --- a/pom.xml +++ b/pom.xml @@ -2,28 +2,38 @@ - - + - - org.joda - joda-parent - 1.4.1 - 4.0.0 + org.joda joda-beans jar Joda-Beans - 2.9.3-SNAPSHOT + 2.10.0-SNAPSHOT Beans and Properties - https://www.joda.org/${joda.artifactId}/ + https://www.joda.org/joda-beans/ 2007 + + + Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + Joda.org + https://www.joda.org + + + GitHub + https://github.com/JodaOrg/joda-beans/issues + - scm:git:https://github.com/JodaOrg/${joda.artifactId}.git - scm:git:https://github.com/JodaOrg/${joda.artifactId}.git - https://github.com/JodaOrg/${joda.artifactId} + scm:git:https://github.com/JodaOrg/joda-beans.git + scm:git:https://github.com/JodaOrg/joda-beans.git + https://github.com/JodaOrg/joda-beans HEAD @@ -84,41 +94,22 @@ - - - - - org.apache.maven.plugins - maven-release-plugin - ${maven-release-plugin.version} - - -Doss.repo - true - v@{project.version} - true - - - - org.kohsuke - github-api - ${github-api.version} - - - - - + + + src/main/resources + + + META-INF + ${project.basedir} + + LICENSE.txt + NOTICE.txt + + + + - - - org.apache.maven.plugins - maven-checkstyle-plugin - - - - org.jacoco - jacoco-maven-plugin - - + org.apache.maven.plugins maven-enforcer-plugin @@ -133,12 +124,326 @@ 3.6.0 + + [11,) + + + + org.apache.felix + maven-bundle-plugin + ${maven-bundle-plugin.version} + + + biz.aQute.bnd + biz.aQute.bndlib + ${bndlib.version} + + + + + bundle-manifest + process-classes + + manifest + + + + + + ${joda.osgi.packages} + ${joda.osgi.require.capability} + <_fixupmessages>"Classes found in the wrong directory"; restrict:=error; is:=ignore + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + default-compile + + compile + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + true + true + + + true + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + package + + jar + + + + + + 11 + src/main/java;src/main/java9 + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + package + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + run-checkstyle + process-sources + + checkstyle + + + + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + + + + org.jacoco + jacoco-maven-plugin + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + package + + report + + + + + + + org.apache.maven.plugins + maven-release-plugin + + -Doss.repo + true + v@{project.version} + true + + + + org.kohsuke + github-api + ${github-api.version} + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + ${maven-assembly-plugin.version} + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + org.apache.maven.plugins + maven-changes-plugin + ${maven-changes-plugin.version} + + + org.apache.maven.plugins + maven-clean-plugin + ${maven-clean-plugin.version} + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + org.apache.maven.plugins + maven-dependency-plugin + ${maven-dependency-plugin.version} + + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + org.apache.maven.plugins + maven-install-plugin + ${maven-install-plugin.version} + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + org.apache.maven.plugins + maven-jxr-plugin + ${maven-jxr-plugin.version} + + + org.apache.maven.plugins + maven-plugin-plugin + ${maven-plugin-plugin.version} + + + org.apache.maven.plugins + maven-pmd-plugin + ${maven-pmd-plugin.version} + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${maven-project-info-reports-plugin.version} + + + org.apache.maven.plugins + maven-release-plugin + ${maven-release-plugin.version} + + + org.apache.maven.plugins + maven-repository-plugin + ${maven-repository-plugin.version} + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.apache.maven.plugins + maven-surefire-report-plugin + ${maven-surefire-report-plugin.version} + + + org.apache.maven.plugins + maven-toolchains-plugin + ${maven-toolchains-plugin.version} + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + com.github.spotbugs + spotbugs-maven-plugin + ${spotbugs-maven-plugin.version} + + + + org.apache.maven.plugins + maven-site-plugin + ${maven-site-plugin.version} + + true + + + + attach-descriptor + + attach-descriptor + + + + en,de + + + + + + org.joda.external + reflow-velocity-tools + 1.2 + + + + + @@ -174,6 +479,132 @@ + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${maven-project-info-reports-plugin.version} + + + + ci-management + dependencies + dependency-info + issue-management + licenses + team + scm + summary + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + false + false + false + module-info.java + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + + javadoc + + + + + 11 + + + + + org.apache.maven.plugins + maven-surefire-report-plugin + ${maven-surefire-report-plugin.version} + + true + + + + + org.apache.maven.plugins + maven-changes-plugin + ${maven-changes-plugin.version} + + + + changes-report + + + + + + + org.apache.maven.plugins + maven-pmd-plugin + ${maven-pmd-plugin.version} + + 100 + ${maven.compiler.target} + + module-info.java + + + + + + com.github.spotbugs + spotbugs-maven-plugin + ${spotbugs-maven-plugin.version} + + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + + report + + + + + + + + + + + sonatype-joda-staging + Sonatype OSS staging repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + default + + + false + sonatype-joda-snapshot + Sonatype OSS snapshot repository + https://oss.sonatype.org/content/repositories/joda-snapshots + default + + https://oss.sonatype.org/content/repositories/joda-releases + + @@ -186,27 +617,28 @@ - + + + org.apache.maven.plugins - maven-jar-plugin + maven-compiler-plugin + - classic - package + jdk9-compile - jar + compile - classic - - - ${joda.module.name} - - - - module-info* - + 9 + 9 + 9 + + ${project.basedir}/src/main/java9 + + true + true @@ -232,6 +664,34 @@ + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus-staging-maven-plugin.version} + true + + https://oss.sonatype.org/ + sonatype-joda-staging + ${joda.nexus.auto.release} + true + 20 + + @@ -241,15 +701,15 @@ ${github-release-plugin.version} Release v${project.version} - See the [change notes](https://www.joda.org/${joda.artifactId}/changes-report.html#a${project.version}) for more information. + See the [change notes](https://www.joda.org/joda-beans/changes-report.html#a${project.version}) for more information. v${project.version} true ${project.build.directory} - ${joda.artifactId}*-dist.tar.gz - ${joda.artifactId}*-dist.zip + joda-beans*-dist.tar.gz + joda-beans*-dist.zip @@ -271,22 +731,71 @@ + + org.joda.beans.* + osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${maven.compiler.source}))" + false + + + + 3.4.2 + 5.1.8 + 2.12.1 + 3.1.2 + 3.2.0 + 3.10.1 + 3.3.0 + 3.0.0 + 3.1.0 + 3.0.1 + 3.0.1 + 3.2.2 + 3.4.1 + 3.2.0 + 3.6.4 + 3.17.0 + 3.4.1 + 3.0.0-M6 + 2.4 + 3.3.0 + 3.7.1 + 3.2.1 + 3.0.0-M7 + 3.0.0-M7 + 3.1.0 + 6.4.0 + 1.308 + 1.4.0 + 0.8.8 + 1.6.8 + 0.11.1 + 0.15.1 + 4.7.1.1 + + + 1.8 + 1.8 + true + + + false + true + none + 3.24.2 1.0.1 2.2.3 - 5.9.3 + 5.10.0 32.1.2-jre - - 1.314 - 1.4.0 - - org.joda.beans.* - org.joda.beans - joda-beans - --add-modules com.google.common --add-modules org.joda.collect --add-modules java.desktop --add-reads org.joda.beans=java.desktop --add-exports org.joda.beans/org.joda.beans.sample=org.joda.convert - 20 - 0.10.0 - 0.15.1 + + + 10.9.3 + src/main/checkstyle/checkstyle.xml + false + + + UTF-8 + UTF-8 diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 22dc1dab..40f8ef7d 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -8,6 +8,14 @@ + + + The jar file is now a multi-release jar file, with the module-info file moved. + + + The classic jar file (without module-info.class) is no longer produced. + + Allow generics in metaImplements. diff --git a/src/main/checkstyle/checkstyle.xml b/src/main/checkstyle/checkstyle.xml index a14dff45..3688dedd 100644 --- a/src/main/checkstyle/checkstyle.xml +++ b/src/main/checkstyle/checkstyle.xml @@ -29,13 +29,7 @@ - - - - - - - + @@ -43,11 +37,6 @@ - - - - - @@ -137,5 +126,9 @@ + + + + diff --git a/src/main/java/module-info.java b/src/main/java9/module-info.java similarity index 100% rename from src/main/java/module-info.java rename to src/main/java9/module-info.java