Merge pull request #803 from parrt/figureout-maven-deploy-to-central
Figure out maven deploy to central
This commit is contained in:
commit
2065644b4a
|
@ -26,14 +26,7 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<!-- <parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>7</version>
|
||||
</parent>
|
||||
-->
|
||||
<groupId>org.antlr</groupId>
|
||||
|
||||
<artifactId>antlr4-maven-plugin</artifactId>
|
||||
<version>4.5</version>
|
||||
<packaging>maven-plugin</packaging>
|
||||
|
@ -300,8 +293,20 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<!-- override the version inherited from the parent -->
|
||||
<version>1.4</version>
|
||||
<version>1.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<keyname>${gpg.keyname}</keyname>
|
||||
<passphraseServerId>${gpg.keyname}</passphraseServerId>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
4
bild.py
4
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",
|
||||
|
|
50
deploy.py
50
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
|
||||
|
||||
|
|
|
@ -5,15 +5,24 @@
|
|||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-runtime</artifactId>
|
||||
<version>4.5</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ANTLR 4 Runtime</name>
|
||||
<description>The ANTLR 4 Runtime</description>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>BSD 3-Clause License</name>
|
||||
<url>http://opensource.org/licenses/BSD-3-Clause</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<!--
|
||||
IMPORTANT NOTE
|
||||
Building ANTLR is now performed via the bild.py script.
|
||||
However, we still need a pom to: - manage dependencies during development
|
||||
- publish metadata to maven central The above are the only reason for keeping
|
||||
IMPORTANT NOTE
|
||||
Building ANTLR is now performed via the bild.py script.
|
||||
However, we still need a pom to: - manage dependencies during development
|
||||
- publish metadata to maven central The above are the only reason for keeping
|
||||
this file. No support will be provided.
|
||||
-->
|
||||
<developers>
|
||||
|
|
19
tool/pom.xml
19
tool/pom.xml
|
@ -4,18 +4,27 @@
|
|||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>4.5</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ANTLR 4 Tool</name>
|
||||
<description>The ANTLR 4 grammar compiler.</description>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>BSD 3-Clause License</name>
|
||||
<url>http://opensource.org/licenses/BSD-3-Clause</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<!--
|
||||
IMPORTANT NOTE
|
||||
Building ANTLR is now performed via the bild.py script.
|
||||
However, we still need a pom to: - manage dependencies during development
|
||||
- publish metadata to maven central The above are the only reason for keeping
|
||||
IMPORTANT NOTE
|
||||
Building ANTLR is now performed via the bild.py script.
|
||||
However, we still need a pom to: - manage dependencies during development
|
||||
- publish metadata to maven central The above are the only reason for keeping
|
||||
this file. No support will be provided.
|
||||
-->
|
||||
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Terence Parr</name>
|
||||
|
|
Loading…
Reference in New Issue