Copy stuff from the root pom to the individual poms and remove the root. Remove dependency on the annotations artifact which no longer exists. hardcode the version number everywhere to make sure I don't use a variable that doesn't exist. update bild so that it uses a new maven_deploy() function I put into bilder.py

This commit is contained in:
Terence Parr 2015-01-13 17:29:38 -08:00
parent 9ae25db028
commit 6d9d60ccda
4 changed files with 193 additions and 294 deletions

47
bild.py
View File

@ -201,16 +201,10 @@ def test(t, cp, juprops, args):
shutil.copyfile(src, dst)
junit("out/test/" + t, cp=thiscp, verbose=False, args=juprops)
def all():
clean(True)
mkjar()
tests()
mkdoc()
mksrc()
install()
clean()
def install():
require(mkjar)
require(mksrc)
require(mkdoc)
mvn_install("dist/antlr4-" + VERSION + "-complete.jar",
"dist/antlr4-" + VERSION + "-complete-sources.jar",
"dist/antlr4-" + VERSION + "-complete-javadoc.jar",
@ -224,6 +218,23 @@ def install():
"antlr4-runtime",
VERSION)
def deploy():
require(mkjar)
require(mksrc)
require(mkdoc)
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)
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)
def clean(dist=False):
if dist:
rmdir("dist")
@ -247,6 +258,11 @@ def mksrc():
def mkdoc():
# add a few source dirs to reduce the number of javadoc errors
# JavaDoc needs antlr annotations source code
runtimedoc = "dist/antlr4-" + VERSION + "-javadoc.jar"
tooldoc = "dist/antlr4-" + VERSION + "-complete-javadoc.jar"
if not isstale("dist/antlr4"+VERSION+".jar", runtimedoc) and \
not isstale("dist/antlr4"+VERSION+"complete.jar", tooldoc):
return
mkdir("out/Annotations")
download("http://search.maven.org/remotecontent?filepath=org/antlr/antlr4-annotations/4.3/antlr4-annotations-4.3-sources.jar", "out/Annotations")
unjar("out/Annotations/antlr4-annotations-4.3-sources.jar", trgdir="out/Annotations")
@ -284,9 +300,18 @@ def mkdoc():
mkdir("doc/Java/org/antlr/v4/runtime/atn/images")
for f in glob.glob("runtime/Java/src/main/dot/org/antlr/v4/runtime/atn/images/*.dot"):
dot(f, "doc/Java/org/antlr/v4/runtime/atn/images", format="svg")
zip("dist/antlr4-" + VERSION + "-javadoc.jar", "doc/Java")
zip("dist/antlr4-" + VERSION + "-complete-javadoc.jar", "doc/JavaTool")
zip(runtimedoc, "doc/Java")
zip(tooldoc, "doc/JavaTool")
def all():
clean(True)
mkjar()
tests()
mkdoc()
mksrc()
install()
clean()
processargs(globals()) # E.g., "python bild.py all"

238
pom.xml
View File

@ -1,238 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId>
<version>4.5-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ANTLR 4</name>
<description>ANTLR 4 Master Build POM</description>
<url>http://www.antlr.org</url>
<inceptionYear>1992</inceptionYear>
<organization>
<name>ANTLR</name>
<url>http://www.antlr.org</url>
</organization>
<licenses>
<license>
<name>The BSD License</name>
<url>http://www.antlr.org/license.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Terence Parr</name>
<url>http://parrt.cs.usfca.edu</url>
<roles>
<role>Project lead</role>
</roles>
</developer>
<developer>
<name>Sam Harwell</name>
<url>http://tunnelvisionlabs.com</url>
<roles>
<role>Developer - Coauthor of tool, C# target</role>
</roles>
</developer>
<developer>
<name>Eric Vergnaud</name>
<roles>
<role>Developer - JavaScript, C#, Python 2, Python 3</role>
</roles>
</developer>
<developer>
<name>Jim Idle</name>
<email>jimi@idle.ws</email>
<url>http://www.linkedin.com/in/jimidle</url>
<roles>
<role>Developer - Maven Plugin</role>
</roles>
</developer>
</developers>
<modules>
<module>runtime/Java</module>
<module>runtime/JavaAnnotations</module>
<module>tool</module>
<module>antlr4-maven-plugin</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java5.home>${env.JAVA5_HOME}</java5.home>
<java6.home>${env.JAVA6_HOME}</java6.home>
<bootclasspath.java5>${java5.home}/lib/rt.jar</bootclasspath.java5>
<bootclasspath.java6>${java6.home}/lib/rt.jar</bootclasspath.java6>
<bootclasspath.compile>${bootclasspath.java6}</bootclasspath.compile>
<bootclasspath.testCompile>${bootclasspath.java6}</bootclasspath.testCompile>
<antlr.testinprocess>true</antlr.testinprocess>
</properties>
<mailingLists>
<mailingList>
<name>antlr-discussion</name>
<archive>https://groups.google.com/forum/?fromgroups#!forum/antlr-discussion</archive>
</mailingList>
</mailingLists>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/antlr/antlr4/issues</url>
</issueManagement>
<scm>
<url>https://github.com/antlr/antlr4/tree/master</url>
<connection>scm:git:git://github.com/antlr/antlr4.git</connection>
<developerConnection>scm:git:git@github.com:antlr/antlr4.git</developerConnection>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>sonatype-oss-release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgs>
<arg>-Xlint</arg>
<arg>-Xlint:-serial</arg>
<arg>-bootclasspath</arg>
<arg>${bootclasspath.compile}</arg>
</compilerArgs>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<configuration>
<compilerArgs>
<arg>-Xlint</arg>
<arg>-Xlint:-serial</arg>
<arg>-bootclasspath</arg>
<arg>${bootclasspath.testCompile}</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<source>1.6</source>
<target>1.6</target>
<compilerArgs>
<arg>-Xlint</arg>
<arg>-Xlint:-serial</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<!-- override the version inherited from the parent -->
<version>2.2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<!-- override the version inherited from the parent -->
<version>2.9.1</version>
<configuration>
<quiet>true</quiet>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<!-- override the version inherited from the parent -->
<version>1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<!-- override the version inherited from the parent -->
<version>2.4.2</version>
<configuration>
<arguments>-Psonatype-oss-release ${release.arguments}</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,19 +1,77 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId>
<version>4.5-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.5-SNAPSHOT</version>
<name>ANTLR 4 Runtime</name>
<description>The ANTLR 4 Runtime</description>
<developers>
<developer>
<name>Terence Parr</name>
<url>http://parrt.cs.usfca.edu</url>
<roles>
<role>Project lead</role>
</roles>
</developer>
<developer>
<name>Sam Harwell</name>
<url>http://tunnelvisionlabs.com</url>
<roles>
<role>Developer - Coauthor of tool, C# target</role>
</roles>
</developer>
<developer>
<name>Eric Vergnaud</name>
<roles>
<role>Developer - JavaScript, C#, Python 2, Python 3</role>
</roles>
</developer>
<developer>
<name>Jim Idle</name>
<email>jimi@idle.ws</email>
<url>http://www.linkedin.com/in/jimidle</url>
<roles>
<role>Developer - Maven Plugin</role>
</roles>
</developer>
</developers>
<mailingLists>
<mailingList>
<name>antlr-discussion</name>
<archive>https://groups.google.com/forum/?fromgroups#!forum/antlr-discussion</archive>
</mailingList>
</mailingLists>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/antlr/antlr4/issues</url>
</issueManagement>
<scm>
<url>https://github.com/antlr/antlr4/tree/master</url>
<connection>scm:git:git://github.com/antlr/antlr4.git</connection>
<developerConnection>scm:git:git@github.com:antlr/antlr4.git</developerConnection>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<properties>
<!-- Assumes dot is in the system path, or specified for the build. -->
<dot.path>dot</dot.path>
@ -26,13 +84,6 @@
<version>1.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-annotations</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<profiles>
@ -104,7 +155,7 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>4.2.2</version>
<version>4.5-SNAPSHOT</version>
<configuration>
<sourceDirectory>src</sourceDirectory>
</configuration>

View File

@ -1,18 +1,76 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId>
<version>4.5-SNAPSHOT</version>
</parent>
<artifactId>antlr4</artifactId>
<name>ANTLR 4 Tool</name>
<description>The ANTLR 4 grammar compiler.</description>
<developers>
<developer>
<name>Terence Parr</name>
<url>http://parrt.cs.usfca.edu</url>
<roles>
<role>Project lead</role>
</roles>
</developer>
<developer>
<name>Sam Harwell</name>
<url>http://tunnelvisionlabs.com</url>
<roles>
<role>Developer - Coauthor of tool, C# target</role>
</roles>
</developer>
<developer>
<name>Eric Vergnaud</name>
<roles>
<role>Developer - JavaScript, C#, Python 2, Python 3</role>
</roles>
</developer>
<developer>
<name>Jim Idle</name>
<email>jimi@idle.ws</email>
<url>http://www.linkedin.com/in/jimidle</url>
<roles>
<role>Developer - Maven Plugin</role>
</roles>
</developer>
</developers>
<mailingLists>
<mailingList>
<name>antlr-discussion</name>
<archive>https://groups.google.com/forum/?fromgroups#!forum/antlr-discussion</archive>
</mailingList>
</mailingLists>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/antlr/antlr4/issues</url>
</issueManagement>
<scm>
<url>https://github.com/antlr/antlr4/tree/master</url>
<connection>scm:git:git://github.com/antlr/antlr4.git</connection>
<developerConnection>scm:git:git@github.com:antlr/antlr4.git</developerConnection>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
@ -20,28 +78,22 @@
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.44.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>8.1.16.v20140903</version>
<scope>test</scope>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.44.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>8.1.16.v20140903</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-annotations</artifactId>
<version>${project.version}</version>
<version>4.5-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
@ -63,6 +115,17 @@
<id>sonatype-oss-release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
@ -73,7 +136,6 @@
</dependencySourceIncludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
@ -120,7 +182,6 @@
</profiles>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
@ -137,7 +198,7 @@
<plugins>
<plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>3.5.2</version>