summaryrefslogtreecommitdiffstats
path: root/maven
diff options
context:
space:
mode:
authorMark Raynsford <[email protected]>2014-03-04 21:00:33 +0000
committerMark Raynsford <[email protected]>2014-03-04 21:00:33 +0000
commit7f28cc15004e143f77f7b90f8e543c16f84dcff0 (patch)
tree3ec1a7065565cfe7431782d12c30dc1e9dbce02c /maven
parentdf09b8533ba8665d9d396e77cb0dd4a07d9584fa (diff)
Bug 991 - Rewrite deployment scripts to correctly deploy all files (including missing atomics).
Adds joal-android and jocl-android projects.
Diffstat (limited to 'maven')
-rwxr-xr-xmaven/joal-android.pom.sh37
-rwxr-xr-xmaven/jocl-android.pom.sh37
-rwxr-xr-xmaven/make-copy-jars.sh60
-rwxr-xr-xmaven/make-deploy-one.sh72
-rw-r--r--maven/make-projects.txt46
5 files changed, 174 insertions, 78 deletions
diff --git a/maven/joal-android.pom.sh b/maven/joal-android.pom.sh
new file mode 100755
index 0000000..cb5a1c2
--- /dev/null
+++ b/maven/joal-android.pom.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+if [ $# -ne 1 ]
+then
+ echo "usage: version" 1>&2
+ exit 1
+fi
+
+VERSION="$1"
+shift
+
+cat <<EOF
+<?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/xsd/maven-4.0.0.xsd">
+
+ <!-- -->
+ <!-- Auto generated by joal.pom.sh, do not edit directly! -->
+ <!-- -->
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jogamp.joal</groupId>
+ <artifactId>joal-android</artifactId>
+ <version>${VERSION}</version>
+ <packaging>jar</packaging>
+ <name>JOAL Android files</name>
+ <description>Java™ Binding for the OpenAL® API (Android runtime)</description>
+ <url>http://jogamp.org/joal/www/</url>
+
+EOF
+
+cat joal.pom.in || exit 1
+cat <<EOF
+</project>
+EOF
diff --git a/maven/jocl-android.pom.sh b/maven/jocl-android.pom.sh
new file mode 100755
index 0000000..e2c2c0f
--- /dev/null
+++ b/maven/jocl-android.pom.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+if [ $# -ne 1 ]
+then
+ echo "usage: version" 1>&2
+ exit 1
+fi
+
+VERSION="$1"
+shift
+
+cat <<EOF
+<?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/xsd/maven-4.0.0.xsd">
+
+ <!-- -->
+ <!-- Auto generated by jocl-android.pom.sh, do not edit directly! -->
+ <!-- -->
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jogamp.jocl</groupId>
+ <artifactId>jocl-android</artifactId>
+ <version>${VERSION}</version>
+ <packaging>jar</packaging>
+ <name>JOCL</name>
+ <description>Java™ Binding for the OpenCL® API (Android runtime)</description>
+ <url>http://jogamp.org/jocl/www/</url>
+
+EOF
+
+cat jocl.pom.in || exit 1
+cat <<EOF
+</project>
+EOF
diff --git a/maven/make-copy-jars.sh b/maven/make-copy-jars.sh
index 3b52b65..6ad63ab 100755
--- a/maven/make-copy-jars.sh
+++ b/maven/make-copy-jars.sh
@@ -11,7 +11,7 @@ copy()
TARGET="$2"
info "copy $1 $2.tmp" 1>&2
- cp "$1" "$2.tmp" || exit 1
+ cp -n "$1" "$2.tmp" || exit 1
info "rename $2.tmp $2" 1>&2
mv "$2.tmp" "$2" || exit 1
}
@@ -60,60 +60,84 @@ do
# Determine whether or not the project has atomic jars
ATOMICS=`echo "${PROJECT_LINE}" | awk -F: '{print $5}'` || exit 1
- ATOMICS=`echo "${ATOMICS}" | tr -d ' '` || exit 1
+
+ # Keep a list of all files copied, for deployment later
+ MANIFEST_FILE="output/${NAME}/${VERSION}/manifest.txt"
# Copy all native jars, if necessary
if [ "${NATIVES}" = "natives" ]
then
for PLATFORM in ${PLATFORMS}
do
+ OUTPUT_NAME="${NAME}-${VERSION}-natives-${PLATFORM}.jar"
SOURCE="${INPUT}/jar/${NAME}-natives-${PLATFORM}.jar"
- TARGET="output/${NAME}/${VERSION}/${NAME}-${VERSION}-natives-${PLATFORM}.jar"
+ TARGET="output/${NAME}/${VERSION}/${OUTPUT_NAME}"
copy "${SOURCE}" "${TARGET}"
+ echo "${OUTPUT_NAME}" >> "${MANIFEST_FILE}"
done
+ else
+ if [ "${NATIVES}" = "atomic-natives" ]
+ then
+ for PLATFORM in ${PLATFORMS}
+ do
+ OUTPUT_NAME="${NAME}-${VERSION}-natives-${PLATFORM}.jar"
+ SOURCE="${INPUT}/jar/atomic/${NAME}-natives-${PLATFORM}.jar"
+ TARGET="output/${NAME}/${VERSION}/${OUTPUT_NAME}"
+ copy "${SOURCE}" "${TARGET}"
+ echo "${OUTPUT_NAME}" >> "${MANIFEST_FILE}"
+ done
+ fi
fi
# Copy dummy jar, if necessary
if [ "${DUMMY}" = "dummy-jar" ]
then
+ OUTPUT_NAME="${NAME}.jar"
SOURCE="empty.jar"
else
# Copy main jar
- SOURCE="${INPUT}/jar/${NAME}.jar"
+ OUTPUT_NAME="${NAME}.jar"
+ SOURCE="${INPUT}/jar/${OUTPUT_NAME}"
fi
- TARGET="output/${NAME}/${VERSION}/${NAME}.jar"
+ TARGET="output/${NAME}/${VERSION}/${OUTPUT_NAME}"
copy "${SOURCE}" "${TARGET}"
+ echo "${OUTPUT_NAME}" >> "${MANIFEST_FILE}"
# Copy dummy jars, if necessary
if [ "${SRC_ZIP}" = "dummy-src" ]
then
- SOURCE="empty.jar"
+ OUTPUT_NAME="${NAME}-${VERSION}-sources.jar"
+ SOURCE="empty.jar"
else
- SOURCE="${INPUT}/${SRC_ZIP}"
+ SOURCE="${INPUT}/${SRC_ZIP}"
fi
- TARGET="output/${NAME}/${VERSION}/${NAME}-${VERSION}-sources.jar"
+ TARGET="output/${NAME}/${VERSION}/${OUTPUT_NAME}"
copy "${SOURCE}" "${TARGET}"
+ echo "${OUTPUT_NAME}" >> "${MANIFEST_FILE}"
# Copy dummy jars to 'javadoc' jars, as we
# don't publish real versions of these yet.
+ OUTPUT_NAME="${NAME}-${VERSION}-javadoc.jar"
SOURCE="empty.jar"
- TARGET="output/${NAME}/${VERSION}/${NAME}-${VERSION}-javadoc.jar"
+ TARGET="output/${NAME}/${VERSION}/${OUTPUT_NAME}"
copy "${SOURCE}" "${TARGET}"
+ echo "${OUTPUT_NAME}" >> "${MANIFEST_FILE}"
- # Copy atomic jars, if necessary.
- if [ "${ATOMICS}" = "atomics" ]
+ # Copy atomics, if necessary
+ if [ ! -z "${ATOMICS}" ]
then
- for JAR in ${INPUT}/jar/atomic/${NAME}-*.jar
+ info "atomics: ${ATOMICS}"
+ IFS=" "
+ for ATOMIC in ${ATOMICS}
do
- JAR_NAME=`basename "${JAR}"` || exit 1
- JAR_NAME=`echo ${JAR_NAME} | sed "s/^${NAME}-//g"` || exit 1
- JAR_NAME="${NAME}-${VERSION}-${JAR_NAME}"
-
- SOURCE="${JAR}"
+ JAR_NAME="${NAME}-${VERSION}-${ATOMIC}.jar"
+ SOURCE="${INPUT}/jar/atomic/${NAME}-${ATOMIC}.jar"
TARGET="output/${NAME}/${VERSION}/${JAR_NAME}"
copy "${SOURCE}" "${TARGET}"
+ echo "${JAR_NAME}" >> "${MANIFEST_FILE}"
done
+ IFS="
+"
fi
-
done
diff --git a/maven/make-deploy-one.sh b/maven/make-deploy-one.sh
index d547c25..40c2e3a 100755
--- a/maven/make-deploy-one.sh
+++ b/maven/make-deploy-one.sh
@@ -27,56 +27,46 @@ fi
info "using repository: ${REPOSITORY_ID} ${REPOSITORY_URL}"
-PLATFORMS=`cat make-platforms.txt | awk '{print $1}'` || exit 1
CURRENT_DIR=`pwd` || exit 1
-PROJECT_LINE=`./make-list-projects.sh | grep -P "^${NAME}\s+"` || exit 1
-
-# Determine whether or not the project has native jars
-NATIVES=`echo "${PROJECT_LINE}" | awk -F: '{print $2}'` || exit 1
-NATIVES=`echo "${NATIVES}" | tr -d ' '` || exit 1
-
cd "output/${NAME}/${VERSION}" || exit 1
# Maintain a list of extra files, along with their classifiers, to deploy.
-DEPLOY_EXTRA_FILES=""
-DEPLOY_EXTRA_CLASSIFIERS=""
-DEPLOY_EXTRA_TYPES=""
+DEPLOY_FILES=""
+DEPLOY_CLASSIFIERS=""
+DEPLOY_TYPES=""
-# Deploy javadoc jar
-f="${NAME}-${VERSION}-javadoc.jar"
-info "adding file ${f}"
-DEPLOY_EXTRA_FILES="${f}"
-DEPLOY_EXTRA_CLASSIFIERS="javadoc"
-DEPLOY_EXTRA_TYPES="jar"
+IFS="
+"
-# Deploy source jar
-f="${NAME}-${VERSION}-sources.jar"
-info "adding file ${f}"
-DEPLOY_EXTRA_FILES="${DEPLOY_EXTRA_FILES},${f}"
-DEPLOY_EXTRA_CLASSIFIERS="${DEPLOY_EXTRA_CLASSIFIERS},sources"
-DEPLOY_EXTRA_TYPES="${DEPLOY_EXTRA_TYPES},jar"
+for LINE in `cat manifest.txt`
+do
+ if [ "${LINE}" = "${NAME}.jar" ]
+ then
+ true
+ else
+ CLASS=`echo ${LINE} | sed "s/^${NAME}-${VERSION}-//g; s/\.jar$//g"`
-# Deploy native jars into repository, if necessary.
-if [ "${NATIVES}" = "natives" ]
-then
- for PLATFORM in ${PLATFORMS}
- do
- f="${NAME}-${VERSION}-natives-${PLATFORM}.jar"
- DEPLOY_EXTRA_FILES="${DEPLOY_EXTRA_FILES},${f}"
- DEPLOY_EXTRA_CLASSIFIERS="${DEPLOY_EXTRA_CLASSIFIERS},natives-${PLATFORM}"
- DEPLOY_EXTRA_TYPES="${DEPLOY_EXTRA_TYPES},jar"
- info "adding file ${f}"
- done
-fi
+ if [ ! -z "${DEPLOY_FILES}" ]
+ then
+ DEPLOY_FILES="${DEPLOY_FILES},${LINE}"
+ DEPLOY_CLASSIFIERS="${DEPLOY_CLASSIFIERS},${CLASS}"
+ DEPLOY_TYPES="${DEPLOY_TYPES},jar"
+ else
+ DEPLOY_FILES="${LINE}"
+ DEPLOY_CLASSIFIERS="${CLASS}"
+ DEPLOY_TYPES="jar"
+ fi
+ fi
+done
# Deploy everything.
-mvn gpg:sign-and-deploy-file \
- "-DpomFile=pom.xml" \
- "-Dfile=${NAME}.jar" \
- "-Dfiles=${DEPLOY_EXTRA_FILES}" \
- "-Dclassifiers=${DEPLOY_EXTRA_CLASSIFIERS}" \
- "-Dtypes=${DEPLOY_EXTRA_TYPES}" \
- "-Durl=${REPOSITORY_URL}" \
+mvn gpg:sign-and-deploy-file \
+ "-DpomFile=pom.xml" \
+ "-Dfile=${NAME}.jar" \
+ "-Dfiles=${DEPLOY_FILES}" \
+ "-Dclassifiers=${DEPLOY_CLASSIFIERS}" \
+ "-Dtypes=${DEPLOY_TYPES}" \
+ "-Durl=${REPOSITORY_URL}" \
"-DrepositoryId=${REPOSITORY_ID}"
diff --git a/maven/make-projects.txt b/maven/make-projects.txt
index 62c269d..a38eec5 100644
--- a/maven/make-projects.txt
+++ b/maven/make-projects.txt
@@ -1,23 +1,31 @@
#
# Lines prefixed with '#' are considered comments and ignored.
#
-# project-name : has-natives? : use-dummy-jar? : source-jar-name? : atomics?
+# project-name : natives? : use-dummy-jar? : source-jar-name? : atomics?
#
-gluegen : no-natives : no-dummy-jar : gluegen-java-src.zip : atomics
-gluegen-rt : natives : no-dummy-jar : gluegen-java-src.zip : no-atomics
-gluegen-rt-android : no-natives : no-dummy-jar : gluegen-java-src.zip : no-atomics
-gluegen-rt-main : no-natives : dummy-jar : dummy-src : no-atomics
-joal : natives : no-dummy-jar : joal-java-src.zip : no-atomics
-joal-main : no-natives : dummy-jar : dummy-src : no-atomics
-jocl : natives : no-dummy-jar : jocl-java-src.zip : no-atomics
-jocl-main : no-natives : dummy-jar : dummy-src : no-atomics
-jogl : no-natives : dummy-jar : jogl-java-src.zip : atomics
-jogl-all : natives : no-dummy-jar : jogl-java-src.zip : no-atomics
-jogl-all-android : no-natives : no-dummy-jar : jogl-java-src.zip : no-atomics
-jogl-all-main : no-natives : dummy-jar : dummy-src : no-atomics
-jogl-all-mobile : no-natives : no-dummy-jar : jogl-java-src.zip : no-atomics
-jogl-all-mobile-main : no-natives : dummy-jar : dummy-src : no-atomics
-jogl-all-noawt : no-natives : no-dummy-jar : jogl-java-src.zip : no-atomics
-jogl-all-noawt-main : no-natives : dummy-jar : dummy-src : no-atomics
-nativewindow : no-natives : dummy-jar : dummy-src : atomics
-newt : no-natives : dummy-jar : dummy-src : atomics
+# Where:
+# natives := "natives" | "no-natives" | "atomic-natives"
+# use-dummy-jar := "no-dummy-jar" | "dummy-jar"
+# source-jar-name := "dummy-src" | name
+# atomics := name*
+#
+gluegen : no-natives : no-dummy-jar : gluegen-java-src.zip :
+gluegen-rt : natives : no-dummy-jar : gluegen-java-src.zip :
+gluegen-rt-android : no-natives : no-dummy-jar : gluegen-java-src.zip :
+gluegen-rt-main : no-natives : dummy-jar : dummy-src :
+joal : natives : no-dummy-jar : joal-java-src.zip :
+joal-android : no-natives : no-dummy-jar : joal-java-src.zip :
+joal-main : no-natives : dummy-jar : dummy-src :
+jocl-android : no-natives : no-dummy-jar : jocl-java-src.zip :
+jocl : natives : no-dummy-jar : jocl-java-src.zip :
+jocl-main : no-natives : dummy-jar : dummy-src :
+jogl : no-natives : dummy-jar : jogl-java-src.zip : awt core fonts-p0 gldesktop gldesktop-dbg glmobile glmobile-dbg glu glu-gldesktop omx os-android os-osx os-win os-x11 sdk swt util-awt util-fixedfuncemu util-gldesktop util-graph util
+jogl-all : natives : no-dummy-jar : jogl-java-src.zip :
+jogl-all-android : no-natives : no-dummy-jar : jogl-java-src.zip :
+jogl-all-main : no-natives : dummy-jar : dummy-src :
+jogl-all-mobile : no-natives : no-dummy-jar : jogl-java-src.zip :
+jogl-all-mobile-main : no-natives : dummy-jar : dummy-src :
+jogl-all-noawt : no-natives : no-dummy-jar : jogl-java-src.zip :
+jogl-all-noawt-main : no-natives : dummy-jar : dummy-src :
+nativewindow : atomic-natives : dummy-jar : dummy-src : awt core os-osx os-win os-x11
+newt : atomic-natives : dummy-jar : dummy-src : awt core driver-android driver-bcm-old driver-bcm-vc driver-intelgdl driver-kd driver-linux driver-osx driver-win driver-x11 event ogl swt