Permalink
Browse files

Add limited maven support for PRIVATE USE ONLY

cherry-pick (altered) from commit d81c488
Fixes #91
  • Loading branch information...
1 parent 808f082 commit d5ca1cace78f7508d6dd0e9454838879554aec97 @jodastephen jodastephen committed Sep 27, 2012
Showing with 126 additions and 3 deletions.
  1. +46 −3 build.xml
  2. +34 −0 maven/jsr-310-TZDB-all.pom
  3. +46 −0 maven/threeten.pom
View
49 build.xml
@@ -6,6 +6,7 @@
@author Oliver Fischer (o.b.fischer@swe-blog.net)
@author Stephen Colebourne
@author Richard Warburton
+ @author Benjamin Graf
-->
<project name="threeten" default="dist">
<description>
@@ -16,15 +17,22 @@
<property file="version.properties"/>
<tstamp />
- <property name="jarName" value="threeten-${version.full}.jar" />
- <property name="jarNameSources" value="threeten-sources-${version.full}.jar" />
- <property name="jarNameJavadoc" value="threeten-javadoc-${version.full}.jar" />
+ <property name="maven" value="${dist}/maven" />
+
+ <property name="jarBase" value="threeten-${version.full}" />
+ <property name="jarName" value="${jarBase}.jar" />
+ <property name="jarNameSources" value="${jarBase}-sources.jar" />
+ <property name="jarNameJavadoc" value="${jarBase}-javadoc.jar" />
+ <property name="jarNamePom" value="${jarBase}.pom" />
<property name="jarCoreName" value="threeten-core-${version.full}.jar" />
<property name="jarStandardName" value="threeten-standard-${version.full}.jar" />
<property name="jarExtraName" value="threeten-extra-${version.full}.jar" />
<property name="jarOpenJDKName" value="threeten-openjdk-${version.full}.jar" />
<property name="jarAllName" value="threeten-all-${version.full}.jar" />
<property name="distFileName" value="threeten-${version.full}.zip"/>
+ <property name="tzdbBase" value="jsr-310-TZDB-all-${version.full}" />
+ <property name="tzdbJarName" value="${tzdbBase}.jar" />
+ <property name="tzdbJarNamePom" value="${tzdbBase}.pom" />
<macrodef name="get-dependency">
<attribute name="group" />
@@ -441,6 +449,41 @@
<zip destfile="${dist}/${distFileName}" basedir="${dist.workarea}" />
</target>
+ <target name="maven.clean">
+ <delete dir="${maven}" includes="**/*" failonerror="false"/>
+ </target>
+
+ <target name="maven" depends="maven.clean, dist">
+ <mkdir dir="${maven}"/>
+ <mkdir dir="${maven}/threeten"/>
+ <mkdir dir="${maven}/tzdb"/>
+
+ <copy todir="${maven}/threeten">
+ <fileset file="${build}/${jarName}"/>
+ <fileset file="${build}/${jarNameSources}"/>
+ <fileset file="${build}/${jarNameJavadoc}"/>
+ </copy>
+ <copy filtering="true" file="maven/threeten.pom" tofile="${maven}/threeten/${jarNamePom}">
+ <filterset>
+ <filter token="version" value="${version.full}"/>
+ </filterset>
+ </copy>
+ <copy file="${lib.main}/${tzdb.outputjar}" tofile="${maven}/tzdb/${tzdbJarName}"/>
+ <copy filtering="true" file="maven/jsr-310-TZDB-all.pom" tofile="${maven}/tzdb/${tzdbJarNamePom}">
+ <filterset>
+ <filter token="version" value="${version.full}"/>
+ </filterset>
+ </copy>
+
+ <checksum algorithm="sha1">
+ <fileset dir="${maven}/threeten"/>
+ <fileset dir="${maven}/tzdb"/>
+ </checksum>
+
+ <jar destfile="${maven}/${jarBase}-maven-bundle.jar" basedir="${maven}/threeten" includes="${jarBase}*"/>
+ <jar destfile="${maven}/${tzdbBase}-maven-bundle.jar" basedir="${maven}/tzdb" includes="${tzdbBase}*"/>
+ </target>
+
<!-- ==================================================================== -->
<target name="examples" depends="compile-core-tests" description="outputs some examples to system out">
<java classname="javax.time.Examples" classpathref="test.path" fork="true"/>
View
34 maven/jsr-310-TZDB-all.pom
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <!-- This pom is provided for PRIVATE USE ONLY -->
+ <!-- It is not intended to permit ThreeTen to be publicly available via maven -->
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>javax.time</groupId>
+ <artifactId>jsr-310-TZDB-all</artifactId>
+ <packaging>jar</packaging>
+
+ <name>ThreeTen time-zone database</name>
+ <version>@version@</version>
+
+ <url>http://threeten.sourceforge.net/</url>
+
+ <scm>
+ <url>https://github.com/ThreeTen/threeten.git</url>
+ <connection>scm:git:git@github.com:threeten/threeten.git</connection>
+ <developerConnection>scm:git:git@github.com:threeten/threeten.git</developerConnection>
+ </scm>
+
+ <mailingLists>
+ <mailingList>
+ <name>Threeten Develop Mailing List</name>
+ <post>threeten-develop@lists.sourceforge.net</post>
+ <subscribe>https://lists.sourceforge.net/lists/listinfo/threeten-develop</subscribe>
+ <unsubscribe>https://lists.sourceforge.net/lists/listinfo/threeten-develop</unsubscribe>
+ <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=threeten-develop</archive>
+ </mailingList>
+ </mailingLists>
+</project>
View
46 maven/threeten.pom
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+
+ <!-- This pom is provided for PRIVATE USE ONLY -->
+ <!-- It is not intended to permit ThreeTen to be publicly available via maven -->
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>javax.time</groupId>
+ <artifactId>threeten</artifactId>
+ <packaging>jar</packaging>
+
+ <name>ThreeTen core</name>
+ <version>@version@</version>
+
+ <description>
+ ThreeTen date and time API, reference implementation for JSR 310
+ </description>
+
+ <url>http://threeten.sourceforge.net/</url>
+
+ <scm>
+ <url>https://github.com/ThreeTen/threeten.git</url>
+ <connection>scm:git:git@github.com:threeten/threeten.git</connection>
+ <developerConnection>scm:git:git@github.com:threeten/threeten.git</developerConnection>
+ </scm>
+
+ <mailingLists>
+ <mailingList>
+ <name>Threeten Develop Mailing List</name>
+ <post>threeten-develop@lists.sourceforge.net</post>
+ <subscribe>https://lists.sourceforge.net/lists/listinfo/threeten-develop</subscribe>
+ <unsubscribe>https://lists.sourceforge.net/lists/listinfo/threeten-develop</unsubscribe>
+ <archive>http://sourceforge.net/mailarchive/forum.php?forum_name=threeten-develop</archive>
+ </mailingList>
+ </mailingLists>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.time</groupId>
+ <artifactId>jsr-310-TZDB-all</artifactId>
+ <version>@version@</version>
+ </dependency>
+ </dependencies>
+</project>

0 comments on commit d5ca1ca

Please sign in to comment.