#!/bin/sh -x # Set these variables appropriate for your environment MAVEN_LOCAL_REP=$HOME/maven2rep/ # HK2 needs JDK 1.6 unless you have Stax implementation that you can provide JAVA_HOME=$HOME/software/jdk1.6.0_02 HK2_VERSION=0.2-SNAPSHOT mkdir lib # Copy required HK2 jars and their dependencies to lib. cp $MAVEN_LOCAL_REP/com/sun/enterprise/auto-depends/$HK2_VERSION/auto-depends-$HK2_VERSION.jar \ $MAVEN_LOCAL_REP/com/sun/enterprise/config/$HK2_VERSION/config-$HK2_VERSION.jar \ $MAVEN_LOCAL_REP/com/sun/enterprise/hk2-core/$HK2_VERSION/hk2-core-$HK2_VERSION.jar \ $MAVEN_LOCAL_REP/com/sun/enterprise/hk2/$HK2_VERSION/hk2-$HK2_VERSION.jar \ $MAVEN_LOCAL_REP/org/jvnet/tiger-types/1.0/tiger-types-1.0.jar \ ./lib # Copy our modules to lib. cp hello-*/target/*.jar ./lib #Now launch HK2 $JAVA_HOME/bin/java -jar ./lib/hk2-$HK2_VERSION.jar