I've noticed that the CP from Windows/Cygwin isn't used, i tried drop
a copy of tomcat's servlet-api.jar into infrastructure/lib but with no
help.
Os: Microsoft Windows XP Professional x64 Edition Version 2003 Service
Pack 2
Cygwin: 1.7.1-1
Java:java version "1.6.0_18" Java(TM) SE Runtime Environment (build
1.6.0_18-b07) Java HotSpot(TM)  64-Bit Server VM (build 16.0-b13,
mixed mode)
Application Server: Apache Tomcat 6.0.24 Server
Database: MySQL 5.1.43-winx64
for f in `readlink -f "lib/*.jar"`; do
    CP="${CP}:"`cygpath -wp "${f}"`
The output of classpath.sh looks ok but rebuildjar.sh still fails on
same errors as above.
Construction of the CP variable in comp.sh looks like this:
CP=`bin/classpath.sh`
_tmp=`readlink -f build`
CP="${CP}\;"`cygpath -wp "${_tmp}"`
The obfuscation caused some errors so I commented it:
# if [ $OBFUSC ] ; then
    # echo obfuscating...
    # scala -classpath $CP:. net.appjet.bodylock.compressor \
	# build/net/appjet/ajstdlib/streaming-client.js
# fi
Now I'm struggling with the end of makejar.sh:
$JAR -uf /tmp/appjet.jar . #META-INF com javax org net uk v scala
dojox
Above line throws an error in:
java.io.IOException: The system cannot find the path specified
        at java.io.WinNTFileSystem.createFileExclusively(Native
Method)
        at java.io.File.checkAndCreate(File.java:1704)
        at java.io.File.createTempFile(File.java:1792)
        at
sun.tools.jar.Main.createTempFileInSameDirectoryAs(Main.java:119)
        at sun.tools.jar.Main.run(Main.java:191)
        at sun.tools.jar.Main.main(Main.java:1149)
The content of my infrastructure/build/ is:
net/... (looks ok)
com/... (looks ok)
t (zero sized file?)
What should I expect to find under infrastructure/build/?
... and in rebuildjar.sh:
JAR=jar
function genjar {
    echo "unzipping JARs..."
    pushd $1 >> /dev/null
    for a in `readlink -f "../../../etherpad/lib/*.jar"`; do
	$JAR xf `cygpath -wp "${a}"`
	rm -rf META-INF/
{MANIFEST.MF,NOTICE{,.txt},LICENSE{,.txt},INDEX.LIST,SUN_MICR.
{RSA,SF},maven}
    done
    popd >> /dev/null
}
... and:
_tmp=`readlink -f "../../build/appjet.jar"`
$JAR uf `cygpath -wp "${_tmp}"` `ls . | grep -v "^t$"`
JAVA=java
Well, if you don't mind hosting the files?
-if [ -z "$JAR" ]; then
-    if [ ! -z `which fastjar` ]; then
-        JAR=fastjar
-    else
-        JAR=jar
-    fi
-fi
+# if [ -z "$JAR" ]; then
+    # if [ ! -z `which fastjar` ]; then
+        # JAR=fastjar
+    # else
+        # JAR=jar
+    # fi
+# fi
 function notify {
     if [ ! -z `which growlnotify` ]; then
@@ -46,13 +46,16 @@
echo "including etherpad JARs..."
-JARFILES="echo ../etherpad/lib/*.jar"
+cd ../etherpad
+JARFILES=`../infrastructure/bin/classpath.sh`
+cd ../infrastructure
+JAR=jar
 function genjar {
     echo "unzipping JARs..."
     pushd $1 >> /dev/null
-    for a in ../../../etherpad/lib/*.jar; do
-       $JAR xf $a
+    for a in `readlink -f "../../../etherpad/lib/*.jar"`; do
+       $JAR xf `cygpath -wp "${a}"`
        rm -rf META-INF/
{MANIFEST.MF,NOTICE{,.txt},LICENSE{,.txt},INDEX.LIST,SUN_MICR.
{RSA,SF},maven}
     done
@@ -63,13 +66,14 @@
 echo "updating..."
 pushd buildcache/JAR-etherpad >> /dev/null
-$JAR uf ../../build/appjet.jar `ls . | grep -v "^t$"`
+_tmp=`readlink -f "../../build/appjet.jar"`
+$JAR uf `cygpath -wp "${_tmp}"` `ls . | grep -v "^t$"`
echo "done."
popd >> /dev/null
 dst="$OWD/appjet-eth$suffix.jar"
-cp -f build/appjet.jar $dst
-cd $OWD
-echo "wrote $dst"
+cp -f build/appjet.jar `readlink -f "${dst}"`
+cd `readlink -f "${OWD}"`
+echo "wrote "`readlink -f "${dst}"`
diff -r 302458c3fffc trunk/etherpad/bin/run-local.sh
--- a/trunk/etherpad/bin/run-local.sh   Fri Dec 25 22:53:09 2009 -0500
+++ b/trunk/etherpad/bin/run-local.sh   Thu Feb 18 15:47:51 2010 +0100
@@ -24,14 +24,18 @@
     fi
 fi
-CP="appjet-eth-dev.jar:data"
-for f in lib/*.jar; do
-    CP="$CP:$f"
+_tmp=`readlink -f "appjet-eth-dev.jar"`
+CP=`cygpath -wp "${_tmp}"`
+_tmp=`readlink -f "data"`
+CP="${CP}\;"`cygpath -wp "${_tmp}"`
+for f in `readlink -f "lib/*.jar"`; do
+    CP="$CP\;"`cygpath -wp "${f}"`
 done
 if [ -z "$JAVA" ]; then
     JAVA=java
 fi
+JAVA=java
 # etherpad properties file
 cfg_file=./data/etherpad.local.properties
diff -r 302458c3fffc trunk/infrastructure/bin/classpath.sh
--- a/trunk/infrastructure/bin/classpath.sh     Fri Dec 25 22:53:09
2009 -0500
+++ b/trunk/infrastructure/bin/classpath.sh     Thu Feb 18 15:47:51
2010 +0100
@@ -15,7 +15,7 @@
 #  limitations under the License.
 CP="./"
-for f in `ls lib/*.jar`; do
-    CP="${CP}:${f}"
+for f in `readlink -f "lib/*.jar"`; do
+    CP="${CP}\;"`cygpath -wp "${f}"`
 done
 echo $CP
diff -r 302458c3fffc trunk/infrastructure/bin/comp.sh
--- a/trunk/infrastructure/bin/comp.sh  Fri Dec 25 22:53:09 2009 -0500
+++ b/trunk/infrastructure/bin/comp.sh  Thu Feb 18 15:47:51 2010 +0100
@@ -32,7 +32,8 @@
 echo compiling with \'$CC\'...
 CP=`bin/classpath.sh`
-CP="build/:${CP}"
+_tmp=`readlink -f build`
+CP="${CP}\;"`cygpath -wp "${_tmp}"`
 if [ -z "$OBFUSC" ]; then
     OBFUSC=0
@@ -63,6 +64,7 @@
 COMMONFILES=`find net.appjet.common -name '*.java'`
 COMMONSCALAFILES=`find net.appjet.common -name '*.scala'`
+
 function gencommon {
     echo "compiling common..."
     javac \
@@ -80,6 +82,7 @@
 cacheonfiles common "$COMMONFILES $COMMONSCALAFILES" gencommon
 SARSFILES=`find net.appjet.common.sars -name '*.scala'`
+
 function gensars {
     echo "compiling sars..."
     $CC \
@@ -92,6 +95,7 @@
 cacheonfiles sars "$SARSFILES" gensars
 CLIFILES=`find net.appjet.common.cli -name '*.scala'`
+
 function gencli {
     echo "compiling cli..."
     $CC \
@@ -105,6 +109,7 @@
 cacheonfiles cli "$CLIFILES" gencli
 BODYLOCKFILES=`find net.appjet.bodylock -name '*.scala'`
+
 function genbodylock {
     echo "compiling rhino abstraction..."
     $CC \
@@ -118,6 +123,7 @@
 APPSERVERFILES=`find net.appjet.oui -name '*.scala'`
 APPSERVERJAVAFILES=`find net.appjet.oui -name '*.java'`
+
 function genappserver {
     echo "compiling appserver source..."
     javac \
@@ -136,6 +142,7 @@
 AJSTDLIBFILES=`find net.appjet.ajstdlib -name '*.scala'`
 AJSTDLIBJAVAFILES=`find net.appjet.ajstdlib -name '*.java'`
+
 function genajstdlib {
     echo "compiling ajstdlib..."
     mkdir -p $1
@@ -156,6 +163,7 @@
 cacheonfiles ajstdlib "$AJSTDLIBFILES $AJSTDLIBJAVAFILES" genajstdlib
 EPFILES=`find com.etherpad -name '*.scala'`
+
 function genetherpad {
     echo "compilng etherpad..."
     $CC \
@@ -168,6 +176,7 @@
 cacheonfiles etherpad "$EPFILES" genetherpad
 OOSERVICEFILES=`find com.etherpad.openofficeservice -name '*.scala'`
+
 function genooservice {
     echo "compiling ooservice..."
     $CC \
@@ -181,19 +190,21 @@
 echo "copying files..."
 cp net.appjet.ajstdlib/streaming-client.js build/net/appjet/ajstdlib/
-if [ $OBFUSC ] ; then
-    echo obfuscating...
-    scala -classpath $CP:. net.appjet.bodylock.compressor \
-       build/net/appjet/ajstdlib/streaming-client.js
-fi
+# if [ $OBFUSC ] ; then
+    # echo obfuscating...
+    # scala -classpath $CP:. net.appjet.bodylock.compressor \
+       # build/net/appjet/ajstdlib/streaming-client.js
+# fi
 cp net.appjet.ajstdlib/streaming-iframe.html build/net/appjet/
ajstdlib/
 mkdir -p build/net/appjet/ajstdlib/modules
+JSFILES=`find framework-src -name '*.js'`
+
 echo "building javascript classfiles..."
 scala -classpath $CP net.appjet.bodylock.Compiler \
     -destination=build/net/appjet/ajstdlib/ \
     -cutPrefix=framework-src \
-    `find framework-src -name '*.js'`
+    $JSFILES
 echo "done."
diff -r 302458c3fffc trunk/infrastructure/bin/makejar.sh
--- a/trunk/infrastructure/bin/makejar.sh       Fri Dec 25 22:53:09
2009 -0500
+++ b/trunk/infrastructure/bin/makejar.sh       Thu Feb 18 15:47:51
2010 +0100
@@ -32,12 +32,16 @@
TMPSTORE=/tmp/ajbuild-tmpstore-`date +%s`
-JARFILES=`echo $SCALA_HOME/lib/scala-library.jar lib/*.jar lib/
manifest`
+#JARFILES=`echo $SCALA_HOME/lib/scala-library.jar lib/*.jar lib/
manifest`
+JARFILES=`bin/jarpath.sh`
+
 function genjar {
     echo "unzipping JARs..."
     pushd $1 >> /dev/null
-    $JAR xf $SCALA_HOME/lib/scala-library.jar
+    #$JAR xf $SCALA_HOME/lib/scala-library.jar
+       $JAR xf $SCALA_HOME\lib\scala-library.jar
     rm -rf META-INF
+       echo :::${PWD}:::
     for a in ../../lib/*.jar; do
        $JAR xf $a
        rm -rf META-INF/
{MANIFEST.MF,NOTICE{,.txt},LICENSE{,.txt},INDEX.LIST,SUN_MICR.
{RSA,SF},maven}
@@ -63,7 +67,8 @@
 echo "making JAR..."
 mv appjet.jar /tmp/appjet.jar
-$JAR -uf /tmp/appjet.jar . #META-INF com javax org net uk v scala
dojox
+_tmp=`readlink -f "/tmp/appjet.jar"`
+$JAR uf `cygpath -wp "${_tmp}"` * #META-INF com javax org net uk v
scala dojox
 mv /tmp/appjet.jar ./
 echo "cleaning up..."
$ bin/rebuildjar.sh
using cached JAR...
compiling...
compiling with 'fsc'...
compiling common...
javac: invalid flag: Settings\skodaval\Desktop\Etherpad\etherpad\trunk
\infrastructure\build
Usage: javac <options> <source files>
use -help for a list of possible options
The only thing I changed after applying patch is to replace
cp ${MYSQL_CONNECTOR_JAR} lib/
cp ${MSSQL_CONNECTOR_JAR} lib/
with:
cp `cygpath -u "${MYSQL_CONNECTOR_JAR}"` lib/
#cp `cygpath -u "${MYSQL_CONNECTOR_JAR}"` lib/
in infrastructure/bin/makejar.sh to avoid the cp error
Why is simple javac failing..Can somebody please help me with this?
Thanks
Sateesh