diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2011-10-21 12:03:49 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2011-10-21 12:03:49 +0300 |
commit | 5e542ff9e7133574be03709d0e8a1b27ab8bc7a5 (patch) | |
tree | 27a9ed0ed40189bbdc26581b5e97e47a3ac24f7b | |
parent | c93e010e37efc0f4cc51b996263361f2f93e5512 (diff) | |
download | xz-java-5e542ff9e7133574be03709d0e8a1b27ab8bc7a5.tar.gz |
Quick & dirty hack to create files for a Maven repository.
Switching from Ant to Maven could make repository handling
simpler, but I cannot study all the required details of
Maven right now. People need XZ in a Maven repository as
soon as possible and it's already horribly late.
-rw-r--r-- | build.properties | 3 | ||||
-rw-r--r-- | build.xml | 27 | ||||
-rw-r--r-- | fileset-misc.txt | 2 | ||||
-rw-r--r-- | maven/README | 2 | ||||
-rw-r--r-- | maven/pom_template.xml | 58 |
5 files changed, 92 insertions, 0 deletions
diff --git a/build.properties b/build.properties index 4ef814f..cbfbd03 100644 --- a/build.properties +++ b/build.properties @@ -24,3 +24,6 @@ doc_dir = ${build_dir}/doc extdoc_url = http://download.oracle.com/javase/6/docs/api extdoc_dir = extdoc + +pom_template = maven/pom_template.xml +maven_dir = ${build_dir}/maven @@ -100,4 +100,31 @@ </jar> </target> + <!-- It's an ugly quick hack. Maybe some day there will be a cleaner + version (e.g. by using Maven). --> + <target name="maven" depends="dist, doc, jar" + description="Creates the files for a Maven repository"> + <mkdir dir="${maven_dir}"/> + + <copy file="${pom_template}" tofile="${maven_dir}/xz-${version}.pom" + overwrite="true"> + <filterset> + <filter token="VERSION" value="${version}"/> + <filter token="TITLE" value="${title}"/> + <filter token="HOMEPAGE" value="${homepage}"/> + </filterset> + </copy> + + <copy file="${jar_dir}/xz.jar" tofile="${maven_dir}/xz-${version}.jar" + preservelastmodified="true" overwrite="true"/> + + <jar destfile="${maven_dir}/xz-${version}-javadoc.jar" + basedir="${doc_dir}"/> + + <jar destfile="${maven_dir}/xz-${version}-sources.jar"> + <fileset dir="." includesfile="fileset-misc.txt"/> + <fileset dir="." includesfile="fileset-src.txt"/> + </jar> + </target> + </project> diff --git a/fileset-misc.txt b/fileset-misc.txt index 1ae729a..8e8dd41 100644 --- a/fileset-misc.txt +++ b/fileset-misc.txt @@ -6,3 +6,5 @@ build.properties fileset-src.txt fileset-misc.txt .gitignore +maven/README +maven/pom_template.xml diff --git a/maven/README b/maven/README new file mode 100644 index 0000000..2692a97 --- /dev/null +++ b/maven/README @@ -0,0 +1,2 @@ +The pom_template.xml is for a Maven repository but it's not meant +for building the project. Note that build.xml will replace @foo@ tags. diff --git a/maven/pom_template.xml b/maven/pom_template.xml new file mode 100644 index 0000000..1adeece --- /dev/null +++ b/maven/pom_template.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Author: Lasse Collin <lasse.collin@tukaani.org>
+
+ This file has been put into the public domain.
+ You can do whatever you want with this file.
+-->
+
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.tukaani</groupId>
+ <artifactId>xz</artifactId>
+ <version>@VERSION@</version>
+ <packaging>jar</packaging>
+
+ <name>XZ for Java</name>
+ <description>@TITLE@</description>
+ <url>@HOMEPAGE@</url>
+
+ <licenses>
+ <license>
+ <name>Public Domain</name>
+ <comments>You can do whatever you want with this package.</comments>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+
+ <scm>
+ <url>http://git.tukaani.org/?p=xz-java.git</url>
+ <connection>scm:git:http://git.tukaani.org/xz-java.git</connection>
+ </scm>
+
+ <developers>
+ <developer>
+ <name>Lasse Collin</name>
+ <email>lasse.collin@tukaani.org</email>
+ </developer>
+ </developers>
+
+ <contributors>
+ <contributor>
+ <!-- According to Maven docs, it's good to only list those people
+ as <developers> that should be contacted if someone wants
+ to talk with an upstream developer. Thus, Igor Pavlov is
+ marked as a <contributor> even though XZ for Java simply
+ couldn't exist without Igor Pavlov's code. -->
+ <name>Igor Pavlov</name>
+ <url>http://7-zip.org/</url>
+ </contributor>
+ </contributors>
+
+</project>
|