Author: alex.guizar(a)jboss.com
Date: 2009-07-05 05:02:33 -0400 (Sun, 05 Jul 2009)
New Revision: 5229
Modified:
jbpm3/branches/jbpm-3.2-soa/hudson/hudson-home/command.sh
Log:
install db2 license file along with driver,
remove hardcoded driver versions
Modified: jbpm3/branches/jbpm-3.2-soa/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/hudson/hudson-home/command.sh 2009-07-05 03:55:25 UTC (rev
5228)
+++ jbpm3/branches/jbpm-3.2-soa/hudson/hudson-home/command.sh 2009-07-05 09:02:33 UTC (rev
5229)
@@ -23,9 +23,9 @@
;;
esac
-java -version 2> tmp.ver
-JAVA_VERSION=`grep "java version" tmp.ver | awk '{ print substr($3, 2,
length($3)-2); }'`
-rm tmp.ver
+java -version 2> version.tmp
+JAVA_VERSION=`grep "java version" version.tmp | awk '{ print substr($3, 2,
length($3)-2); }'`
+rm version.tmp
echo java version $JAVA_VERSION
case $JAVA_VERSION in
@@ -86,27 +86,44 @@
cp $JBOSS_HOME/docs/examples/jbpm/jbpm-$DATABASE-ds.xml
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-$DATABASE-ds.xml
cp $JBOSS_HOME/docs/examples/jbpm/hibernate.cfg.$DATABASE.xml
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar/hibernate.cfg.xml
-# Install Sybase JDBC driver manually as it is not redistributable
-SYBASE_JDBC_DRIVER=~/.m2/repository/com/sybase/jconnect/6.0.5/jconnect-6.0.5.jar
-if [ -f $SYBASE_JDBC_DRIVER ]; then
- echo "cp $SYBASE_JDBC_DRIVER
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
- cp $SYBASE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar
+#
+# Install non-redistributable JDBC drivers
+#
+MVN_CMD="mvn --offline --non-recursive $ENVIRONMENT -DoutputFile=resolve.tmp
dependency:resolve"
+echo $MVN_CMD; $MVN_CMD
+
+# Install Sybase driver
+JCONNECT_VERSION=`grep com.sybase:jconnect resolve.tmp | awk --field-separator : '{
print $4 }'`
+JCONNECT_JAR=~/.m2/repository/com/sybase/jconnect/$JCONNECT_VERSION/jconnect-$JCONNECT_VERSION.jar
+if [ -f $JCONNECT_JAR ]; then
+ CP_CMD="cp $JCONNECT_JAR
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
+ echo $CP_CMD; $CP_CMD
fi
-# Install Oracle JDBC driver manually as it is not redistributable
-ORACLE_JDBC_DRIVER=~/.m2/repository/com/oracle/ojdbc14/10.2.0.4/ojdbc14-10.2.0.4.jar
-if [ -f $ORACLE_JDBC_DRIVER ]; then
- echo "cp $ORACLE_JDBC_DRIVER
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
- cp $ORACLE_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar
+# Install Oracle driver
+OJDBC_VERSION=`grep com.oracle:ojdbc14:jar resolve.tmp | awk --field-separator : '{
print $4 }'`
+OJDBC_JAR=~/.m2/repository/com/oracle/ojdbc14/$OJDBC_VERSION/ojdbc14-$OJDBC_VERSION.jar
+if [ -f $OJDBC_JAR ]; then
+ CP_CMD="cp $OJDBC_JAR
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
+ echo $CP_CMD; $CP_CMD
fi
-# Install DB2 JDBC driver manually as it is not redistributable
-DB2_JDBC_DRIVER=~/.m2/repository/com/ibm/db2jcc/3.1.57/db2jcc-3.1.57.jar
-if [ -f $DB2_JDBC_DRIVER ]; then
- echo "cp $DB2_JDBC_DRIVER
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
- cp $DB2_JDBC_DRIVER $JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar
+# Install DB2 driver
+DB2JCC_VERSION=`grep com.ibm:db2jcc:jar:jar resolve.tmp | awk --field-separator : '{
print $4 }'`
+DB2JCC_JAR=~/.m2/repository/com/ibm/db2jcc/$DB2JCC_VERSION/db2jcc-$DB2JCC_VERSION.jar
+if [ -f $DB2JCC_JAR ]; then
+ CP_CMD="cp $DB2JCC_JAR
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
+ echo $CP_CMD; $CP_CMD
fi
+DB2JCC_LICENSE=~/.m2/repository/com/ibm/db2jcc_license_cu/$DB2JCC_VERSION/db2jcc_license_cu-$DB2JCC_VERSION.jar
+if [ -f $DB2JCC_LICENSE ]; then
+ CP_CMD="cp $DB2JCC_LICENSE
$JBOSS_HOME/server/$JBOSS_SERVER/deploy/jbpm/jbpm-service.sar"
+ echo $CP_CMD; $CP_CMD
+fi
+# Remove resolution output file
+rm resolve.tmp
+
#
# Start JBoss AS
#
Show replies by date