Update of the build system to make the script cleaner and make ./lib/endorsed libs automatically used in both script and build classpaths.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352231 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nicola Ken Barozzi 2002-03-16 17:08:00 +00:00
parent aedcb64537
commit 91f2aab60a
10 changed files with 45 additions and 16 deletions

2
appendcp.bat Normal file
View File

@ -0,0 +1,2 @@
set CLASSPATH=%CLASSPATH%;%1

View File

@ -4,10 +4,10 @@ set OLD_ANT_HOME=%ANT_HOME%
set ANT_HOME=tools\ant set ANT_HOME=tools\ant
set OLD_CLASSPATH=%CLASSPATH% set OLD_CLASSPATH=%CLASSPATH%
set CLASSPATH=tools\centipede\lib\xml-apis.jar;tools\centipede\lib\xerces.jar;tools\centipede\lib\xalan.jar;tools\centipede\lib\junit.jar;tools\centipede\lib\jIzPress.jar;tools\centipede\lib\jtidy.jar for %%i in (.\lib\endorsed\*.jar) do call appendcp.bat %%i
for %%i in (.\tools\centipede\lib\*.jar) do call appendcp.bat %%i
call %ANT_HOME%\bin\ant -listener org.apache.tools.ant.XmlLogger %1 %2 %3 %4 %5 %6 %7 %8 %9 call %ANT_HOME%\bin\ant -listener org.apache.tools.ant.XmlLogger %1 %2 %3 %4 %5 %6 %7 %8 %9
set ANT_HOME=%OLD_ANT_HOME% set ANT_HOME=%OLD_ANT_HOME%
set CLASSPATH=%OLD_CLASSPATH% set CLASSPATH=%OLD_CLASSPATH%

View File

@ -1,8 +1,23 @@
#!/bin/sh #!/bin/sh
# ----- Verify and Set Required Environment Variables -------------------------
if [ "$JAVA_HOME" = "" ] ; then
echo You must set JAVA_HOME to point at your Java Development Kit installation
exit 1
fi
chmod u+x ./tools/ant/bin/antRun chmod u+x ./tools/ant/bin/antRun
chmod u+x ./tools/ant/bin/ant chmod u+x ./tools/ant/bin/ant
# ----- Verify and Set Required Environment Variables -------------------------
if [ "$TERM" = "cygwin" ] ; then
S=';'
else
S=':'
fi
# ----- Set Up The Runtime Classpath ------------------------------------------
OLD_ANT_HOME=$ANT_HOME OLD_ANT_HOME=$ANT_HOME
unset ANT_HOME unset ANT_HOME
@ -11,7 +26,7 @@ CP=$CLASSPATH
export CP export CP
unset CLASSPATH unset CLASSPATH
CLASSPATH="./tools/centipede/lib/xml-apis.jar:./tools/centipede/lib/xerces.jar:./tools/centipede/lib/xalan.jar:./tools/centipede/lib/junit.jar:./tools/centipede/lib/jIzPress.jar:./tools/centipede/lib/jtidy.jar" CLASSPATH="`echo ./lib/endorsed/*.jar | tr ' ' $S``echo ./tools/centipede/lib/*.jar | tr ' ' $S`"
export CLASSPATH export CLASSPATH
$PWD/./tools/ant/bin/ant -listener org.apache.tools.ant.XmlLogger $@ $PWD/./tools/ant/bin/ant -listener org.apache.tools.ant.XmlLogger $@

View File

@ -1,3 +0,0 @@
xalan-2.2.0.jar
xerces-2.0.0.jar
junit-3.7.jar

View File

@ -19,12 +19,18 @@
<!-- Indentify Classpath --> <!-- Indentify Classpath -->
<!-- =================================================================== --> <!-- =================================================================== -->
<path id="centipede.classpath"> <path id="centipede.classpath">
<fileset dir="./lib/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="./tools/centipede/lib"> <fileset dir="./tools/centipede/lib">
<include name="*.jar"/> <include name="*.jar"/>
</fileset> </fileset>
</path> </path>
<path id="classpath"> <path id="classpath">
<fileset dir="./lib/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="./lib/core"> <fileset dir="./lib/core">
<include name="*.jar"/> <include name="*.jar"/>
</fileset> </fileset>
@ -34,11 +40,17 @@
</path> </path>
<path id="examples.classpath"> <path id="examples.classpath">
<fileset dir="./lib/endorsed">
<include name="*.jar"/>
</fileset>
<!-- FIXME : how to build a path that references a property set in 'init' target ? --> <!-- FIXME : how to build a path that references a property set in 'init' target ? -->
<pathelement path="./build/jakarta-poi/classes"/> <pathelement path="./build/jakarta-poi/classes"/>
</path> </path>
<path id="scratchpad.classpath"> <path id="scratchpad.classpath">
<fileset dir="./lib/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="./lib/core"> <fileset dir="./lib/core">
<include name="*.jar"/> <include name="*.jar"/>
</fileset> </fileset>
@ -53,6 +65,9 @@
</path> </path>
<path id="contrib.classpath"> <path id="contrib.classpath">
<fileset dir="./lib/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="./lib/core"> <fileset dir="./lib/core">
<include name="*.jar"/> <include name="*.jar"/>
</fileset> </fileset>