From b033b5ceb12ad12a8ac2fb030dfeec94bd526981 Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Fri, 23 Jan 2015 14:37:41 -0800 Subject: [PATCH 1/3] tell the pom to sign the artifacts for the antler maven plug-in. --- antlr4-maven-plugin/pom.xml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/antlr4-maven-plugin/pom.xml b/antlr4-maven-plugin/pom.xml index 68606b389..27afb667e 100644 --- a/antlr4-maven-plugin/pom.xml +++ b/antlr4-maven-plugin/pom.xml @@ -26,14 +26,7 @@ 4.0.0 - org.antlr - antlr4-maven-plugin 4.5 maven-plugin @@ -300,8 +293,20 @@ org.apache.maven.plugins maven-gpg-plugin - - 1.4 + 1.6 + + + sign-artifacts + verify + + sign + + + ${gpg.keyname} + ${gpg.keyname} + + + org.apache.maven.plugins From 3a4d53adeac10322ff352078a0bf31a71b4f9683 Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Fri, 23 Jan 2015 14:39:36 -0800 Subject: [PATCH 2/3] had license to the pom files and make sure that they use the jar packaging. --- runtime/Java/pom.xml | 17 +++++++++++++---- tool/pom.xml | 19 ++++++++++++++----- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/runtime/Java/pom.xml b/runtime/Java/pom.xml index f08cb96bf..e76473d2c 100644 --- a/runtime/Java/pom.xml +++ b/runtime/Java/pom.xml @@ -5,15 +5,24 @@ org.antlr antlr4-runtime 4.5 + jar ANTLR 4 Runtime The ANTLR 4 Runtime + + + BSD 3-Clause License + http://opensource.org/licenses/BSD-3-Clause + repo + + + diff --git a/tool/pom.xml b/tool/pom.xml index 14f2dcd63..ee701e343 100644 --- a/tool/pom.xml +++ b/tool/pom.xml @@ -4,18 +4,27 @@ org.antlr antlr4 4.5 + jar ANTLR 4 Tool The ANTLR 4 grammar compiler. + + + BSD 3-Clause License + http://opensource.org/licenses/BSD-3-Clause + repo + + + - + Terence Parr From 87711b47044150d2ad3131a56633c4b5d2aabc3b Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Fri, 23 Jan 2015 14:48:58 -0800 Subject: [PATCH 3/3] it looks like I got the maven deploy thing going after initial failure for not signing the antlr maven plug-in. --- bild.py | 4 ++-- deploy.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/bild.py b/bild.py index 036841067..5b8a3a315 100755 --- a/bild.py +++ b/bild.py @@ -327,7 +327,7 @@ def install(): # mvn installed locally in ~/.m2, java jar to /usr/local/lib if p require(mksrc) require(mkdoc) jarfile = "dist/antlr4-" + VERSION + "-complete.jar" - print_and_log("Installing "+jarfile+" and *-sources.jar, *-javadoc.jar") + print_and_log("Maven installing "+jarfile+" and *-sources.jar, *-javadoc.jar") mvn_install(jarfile, "dist/antlr4-" + VERSION + "-complete-sources.jar", "dist/antlr4-" + VERSION + "-complete-javadoc.jar", @@ -335,7 +335,7 @@ def install(): # mvn installed locally in ~/.m2, java jar to /usr/local/lib if p "antlr4", VERSION) runtimejarfile = "dist/antlr4-" + VERSION + ".jar" - print_and_log("Installing "+runtimejarfile+" and *-sources.jar, *-javadoc.jar") + print_and_log("Maven installing "+runtimejarfile+" and *-sources.jar, *-javadoc.jar") mvn_install(runtimejarfile, "dist/antlr4-" + VERSION + "-sources.jar", "dist/antlr4-" + VERSION + "-javadoc.jar", diff --git a/deploy.py b/deploy.py index 3836b57cc..60f56368a 100755 --- a/deploy.py +++ b/deploy.py @@ -50,16 +50,58 @@ def mvn_snapshot(): # assumes that you have ~/.m2/settings.xml set up binjar = uniformpath("dist/antlr4-%s-complete.jar" % VERSION) docjar = uniformpath("dist/antlr4-%s-complete-javadoc.jar" % VERSION) srcjar = uniformpath("dist/antlr4-%s-complete-sources.jar" % VERSION) - mvn_deploy(binjar, docjar, srcjar, repositoryid="ossrh", groupid="org.antlr", - artifactid="antlr4", pomfile="tool/pom.xml", version=VERSION) + mvn_deploy("deploy:deploy-file", + binjar, docjar, srcjar, repositoryid="ossrh", groupid="org.antlr", + artifactid="antlr4", pomfile="tool/pom.xml", version=VERSION, + url="https://oss.sonatype.org/content/repositories/snapshots") binjar = uniformpath("dist/antlr4-%s.jar" % VERSION) docjar = uniformpath("dist/antlr4-%s-javadoc.jar" % VERSION) srcjar = uniformpath("dist/antlr4-%s-sources.jar" % VERSION) - mvn_deploy(binjar, docjar, srcjar, repositoryid="ossrh", groupid="org.antlr", - artifactid="antlr4-runtime", pomfile="runtime/Java/pom.xml", version=VERSION) + mvn_deploy("deploy:deploy-file", + binjar, docjar, srcjar, repositoryid="ossrh", groupid="org.antlr", + artifactid="antlr4-runtime", pomfile="runtime/Java/pom.xml", version=VERSION, + url="https://oss.sonatype.org/content/repositories/snapshots") +# deploy to maven central +def mvn_staging(): # assumes that you have ~/.m2/settings.xml set up + """ + mvn gpg:sign-and-deploy-file \ + -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ + -DrepositoryId=ossrh \ + -Dpackaging=jar \ + -DpomFile=/Users/parrt/antlr/code/antlr4/tool/pom.xml \ + -Dfile=/Users/parrt/antlr/code/antlr4/dist/antlr4-4.5-complete.jar \ + -Dsources=/Users/parrt/antlr/code/antlr4/dist/antlr4-4.5-complete-sources.jar \ + -Djavadoc=/Users/parrt/antlr/code/antlr4/dist/antlr4-4.5-complete-javadoc.jar + + mvn gpg:sign-and-deploy-file \ + -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ + -DrepositoryId=ossrh \ + -Dpackaging=jar \ + -DpomFile=/Users/parrt/antlr/code/antlr4/runtime/Java/pom.xml \ + -Dfile=/Users/parrt/antlr/code/antlr4/dist/antlr4-4.5.jar \ + -Dsources=/Users/parrt/antlr/code/antlr4/dist/antlr4-4.5-sources.jar \ + -Djavadoc=/Users/parrt/antlr/code/antlr4/dist/antlr4-4.5-javadoc.jar + """ + # deploy the tool and Java runtime, it becomes antlr4 artifact at maven + binjar = uniformpath("dist/antlr4-%s-complete.jar" % VERSION) + docjar = uniformpath("dist/antlr4-%s-complete-javadoc.jar" % VERSION) + srcjar = uniformpath("dist/antlr4-%s-complete-sources.jar" % VERSION) + mvn_deploy("gpg:sign-and-deploy-file", + binjar, docjar, srcjar, repositoryid="ossrh", + pomfile="tool/pom.xml", url="https://oss.sonatype.org/service/local/staging/deploy/maven2/") + + # deploy the runtime, it becomes antlr4-runtime artifact at maven + binjar = uniformpath("dist/antlr4-%s.jar" % VERSION) + docjar = uniformpath("dist/antlr4-%s-javadoc.jar" % VERSION) + srcjar = uniformpath("dist/antlr4-%s-sources.jar" % VERSION) + mvn_deploy("gpg:sign-and-deploy-file", + binjar, docjar, srcjar, repositoryid="ossrh", + pomfile="runtime/Java/pom.xml", + url="https://oss.sonatype.org/service/local/staging/deploy/maven2/") + def mvn(): # TODO pass