public
Last active

install jogamp's JOGL and GLUEGEN jars to a local maven repository

  • Download Gist
install_jogl_maven.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
#!/bin/bash
 
#filename specified
if [ $# != 3 ]; then
echo "usage: $0 distroUrl maven_repo version"
exit
else
echo "Processing: $1"
fi
 
 
BASEURL=$1
MVN_REPO=$2
VERSION=$3
 
TEMPFILE=./download/jogamp/$VERSION
mkdir -p "$TEMPFILE"
echo "using temp directory $TEMPFILE"
 
# base jogl class jar
echo "installing core jogl deps"
wget -nc $BASEURL/jar/jogl.all.jar.gz -O "$TEMPFILE/jogl.all.jar.gz"
gunzip "$TEMPFILE/jogl.all.jar.gz"
mvn install:install-file -Dversion=$VERSION -DlocalRepositoryPath="$MVN_REPO" -DgroupId=com.jogamp.jogl -DartifactId=jogl-all -Dpackaging=jar -Dfile="$TEMPFILE/jogl.all.jar" -DgeneratePom=true
 
echo "installing gluegen"
wget -nc $BASEURL/jar/gluegen-rt.jar -O "$TEMPFILE/gluegen-rt.jar"
mvn install:install-file -Dversion=$VERSION -DlocalRepositoryPath="$MVN_REPO" -DgroupId=com.jogamp.gluegen -DartifactId=gluegen-rt -Dpackaging=jar -Dfile="$TEMPFILE/gluegen-rt.jar" -DgeneratePom=true
 
# native jars
echo "installing native libs"
NATIVE_PLATFORMS="linux-amd64 linux-i586 macosx-universal solaris-amd64 solaris-i586 windows-amd64 windows-i586"
for platform in $NATIVE_PLATFORMS; do
echo " -> installing native lib for $platform"
wget -nc $BASEURL/jar/jogl-all-natives-$platform.jar -O "$TEMPFILE/jogl-all-natives-$platform.jar"
mvn install:install-file -DlocalRepositoryPath="$MVN_REPO" -Dclassifier="$platform" -Dversion=$VERSION -DgroupId=com.jogamp.jogl -DartifactId=jogl-natives -Dpackaging=jar -Dfile="$TEMPFILE/jogl-all-natives-$platform.jar" -DgeneratePom=true
wget -nc $BASEURL/jar/gluegen-rt-natives-$platform.jar -O "$TEMPFILE/gluegen-rt-natives-$platform.jar"
mvn install:install-file -DlocalRepositoryPath="$MVN_REPO" -Dclassifier="$platform" -Dversion=$VERSION -DgroupId=com.jogamp.gluegen -DartifactId=gluegen-natives -Dpackaging=jar -Dfile="$TEMPFILE/gluegen-rt-natives-$platform.jar" -DgeneratePom=true
done
pom_update.xml
XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<!-- note you'll probably want the OS-specific classifiers set using some maven magic to autodetect -->
<dependency>
<groupId>com.jogamp.jogl</groupId>
<artifactId>jogl-all</artifactId>
<version>2.0-rc5</version>
</dependency>
<dependency>
<groupId>com.jogamp.jogl</groupId>
<artifactId>jogl-natives</artifactId>
<version>2.0-rc5</version>
<classifier>windows-amd64</classifier>
</dependency>
<dependency>
<groupId>com.jogamp.gluegen</groupId>
<artifactId>gluegen-rt</artifactId>
<version>2.0-rc5</version>
</dependency>
<dependency>
<groupId>com.jogamp.gluegen</groupId>
<artifactId>gluegen-natives</artifactId>
<version>2.0-rc5</version>
<classifier>windows-amd64</classifier>
</dependency>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.