summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/build.xml6
-rw-r--r--make/maven-common.xml81
-rw-r--r--make/pom-template.xml4
3 files changed, 88 insertions, 3 deletions
diff --git a/make/build.xml b/make/build.xml
index 5380867..7ebcef6 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -808,6 +808,8 @@
<!-- Put the files created by target gluegen.build from
build directory to maven repository, local or remote
(targets maven.install and maven.deploy.snapshot respectively)-->
+
+ <import file="maven-common.xml" />
<target name="maven.prepare.pom">
<copy file="pom-template.xml" tofile="${build}/pom-${artifactId}.xml" overwrite="true">
@@ -885,7 +887,7 @@
</exec>
</target>
- <target name="maven.antcalls">
+ <target name="maven.antcalls">
<antcall target="maven.${mvn.task}.artifact" inheritall="true">
<param name="artifactId" value="gluegen"/>
<param name="description" value="GlueGen - JNI Glue Code Generator"/>
@@ -896,7 +898,7 @@
</antcall>
<antcall target="maven.${mvn.task}.native.artifact" inheritall="true">
<param name="artifactId" value="gluegen-rt-natives"/>
- <param name="description" value="Gluegen runtime native libraries for ${os.and.arch}"/>
+ <param name="description" value="GlueGen runtime native libraries for ${os.and.arch}"/>
</antcall>
<!--<antcall target="maven.${mvn.task}.artifact" inheritall="true">-->
<!--<param name="artifactId" value="gluegen-rt-cdc"/>-->
diff --git a/make/maven-common.xml b/make/maven-common.xml
new file mode 100644
index 0000000..57c31e8
--- /dev/null
+++ b/make/maven-common.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- reuseable maven related targets -->
+<project name="maven-common" basedir=".">
+
+ <target name="maven.prepare.pom">
+ <copy file="pom-template.xml" tofile="${build}/pom-${artifactId}.xml" overwrite="true">
+ <filterset>
+ <filter token="ARTIFACTID" value="${artifactId}"/>
+ <filter token="VERSION" value="${maven.artifacts.version}"/>
+ <filter token="DESCRIPTION" value="${description}"/>
+ <filter token="DEPENDENCIES" value=""/>
+ </filterset>
+ </copy>
+ </target>
+
+ <target name="maven.prepare.native.pom">
+ <loadfile srcfile="pom-rt-dependency.xml" property="maven.dependencies.section"/>
+ <copy file="pom-template.xml" tofile="${build}/pom-${artifactId}-${os.and.arch}.xml" overwrite="true">
+ <filterchain description="Put in the dependencies section, then replace tokens">
+ <replacetokens>
+ <token key="DEPENDENCIES" value="${maven.dependencies.section}"/>
+ </replacetokens>
+ <replacetokens>
+ <token key="ARTIFACTID" value="${artifactId}"/>
+ <token key="VERSION" value="${maven.artifacts.version}"/>
+ <token key="DESCRIPTION" value="${description}"/>
+ </replacetokens>
+ </filterchain>
+ </copy>
+ </target>
+
+ <target name="maven.install.artifact">
+ <antcall target="maven.prepare.pom" inheritall="true"/>
+ <exec executable="mvn" dir="${build}">
+ <arg value="install:install-file"/>
+ <arg value="-Dfile=${artifactId}.jar"/>
+ <arg value="-DpomFile=pom-${artifactId}.xml"/>
+ <arg value="-DcreateChecksum=true"/>
+ </exec>
+ </target>
+
+ <target name="maven.install.native.artifact">
+ <antcall target="maven.prepare.native.pom" inheritall="true"/>
+ <exec executable="mvn" dir="${build}">
+ <arg value="install:install-file"/>
+ <arg value="-Dfile=${artifactId}-${os.and.arch}.jar"/>
+ <arg value="-DpomFile=pom-${artifactId}-${os.and.arch}.xml"/>
+ <arg value="-DcreateChecksum=true"/>
+ <arg value="-Dclassifier=${os.and.arch}"/>
+ </exec>
+ </target>
+
+ <target name="maven.deploy.artifact">
+ <antcall target="maven.prepare.pom" inheritall="true"/>
+ <exec executable="mvn" dir="${build}">
+ <arg value="deploy:deploy-file"/>
+ <arg value="-DrepositoryId=sonatype-nexus-snapshots"/>
+ <arg value="-Durl=https://oss.sonatype.org/content/repositories/snapshots/"/>
+
+ <arg value="-Dfile=${artifactId}.jar"/>
+ <arg value="-DpomFile=pom-${artifactId}.xml"/>
+ <arg value="-DcreateChecksum=true"/>
+ </exec>
+ </target>
+
+ <target name="maven.deploy.native.artifact">
+ <antcall target="maven.prepare.native.pom" inheritall="true"/>
+ <exec executable="mvn" dir="${build}">
+ <arg value="deploy:deploy-file"/>
+ <arg value="-DrepositoryId=sonatype-nexus-snapshots"/>
+ <arg value="-Durl=https://oss.sonatype.org/content/repositories/snapshots/"/>
+
+ <arg value="-Dfile=${artifactId}-${os.and.arch}.jar"/>
+ <arg value="-DpomFile=pom-${artifactId}-${os.and.arch}.xml"/>
+ <arg value="-DcreateChecksum=true"/>
+ <arg value="-Dclassifier=${os.and.arch}"/>
+ </exec>
+ </target>
+
+</project>
diff --git a/make/pom-template.xml b/make/pom-template.xml
index 4a93ae7..26bae6b 100644
--- a/make/pom-template.xml
+++ b/make/pom-template.xml
@@ -28,7 +28,7 @@
<email>[email protected]</email>
<url>http://github.com/sgothel</url>
<organization>Jausoft</organization>
- <organizationUrl>http://http://jausoft.com/blog</organizationUrl>
+ <organizationUrl>http://jausoft.com/blog</organizationUrl>
<roles>
<role>developer</role>
</roles>
@@ -39,6 +39,8 @@
<name>Michael Bien</name>
<email>[email protected]</email>
<url>http://github.com/mbien</url>
+ <organization>michael-bien.com</organization>
+ <organizationUrl>http://michael-bien.com</organizationUrl>
<roles>
<role>developer</role>
</roles>