[jdom-interest] jdom-contrib
Laurent Bihanic
laurent.bihanic at atosorigin.com
Mon Mar 31 01:42:45 PST 2003
Hi,
JS wrote:
> Hi there Brad,
> many thanks for your reply. Indeed, I was able to download the nitely
> drop. But the jar won't build. I try executing build.bat but no response.I have Ant 1.5 installed on my C:\ant
> The ant.jar is in my classpath and I have jdom-b8 installed as well.
> Any idea what I'm missing in order to create the jdom-contrib jar file?
>
> I get a response when I enter "ant package"
> The build starts and then fails during the compile. I cant capture all of
> the ant output, but heres some of it.
You should not invoke ant directly but use one of the build script (sh or bat)
as these set the classpath required for compiling.
But this may not be sufficient...
I suspect the whole build stuff of jdom-contrib in CVS to be totally out of
date. If I remember well (if this has not been fixed), even when invoked
correcly, it fails because it tries of invoke classes that do not exist.
If this happens to you, I've attached are the build files I use. Replace the
ones you downloaded with these, remove samples/SpitfireParserDemo.java and it
should work.
Laurent
-------------- next part --------------
#!/bin/sh
if [ "$JAVA_HOME" = "" ] ; then
echo "ERROR: JAVA_HOME not found in your environment."
echo
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."
exit 1
fi
if [ `uname | grep -n CYGWIN` ]; then
PS=";"
else
PS=":"
fi
ADDITIONALCLASSPATH=$JAVA_HOME/lib/classes.zip${PS}../jdom/lib/collections.jar
export ADDITIONALCLASSPATH
./build.sh $*
unset ADDITIONALCLASSPATH
-------------- next part --------------
#!/bin/sh
echo
echo "Building..."
echo
if [ "$JAVA_HOME" = "" ] ; then
echo "ERROR: JAVA_HOME not found in your environment."
echo
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."
exit 1
fi
if [ `uname | grep -n CYGWIN` ]; then
PS=";"
else
PS=":"
fi
JDOM_LIBS="../jdom/lib"
LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar${PS}${JDOM_LIBS}/xerces.jar${PS}${JDOM_LIBS}/jaxp.jar
LOCALCLASSPATH=${LOCALCLASSPATH}${PS}./lib/jakarta-regexp-1.1.jar
LOCALCLASSPATH=${LOCALCLASSPATH}${PS}${JDOM_LIBS}/ant.jar${PS}../jdom/build/classes
ANT_HOME=$JDOM_LIBS
echo Building with classpath $LOCALCLASSPATH${PS}$ADDITIONALCLASSPATH
echo
echo Starting Ant...
echo
$JAVA_HOME/bin/java -Dant.home=$ANT_HOME -classpath $LOCALCLASSPATH${PS}$ADDITIONALCLASSPATH org.apache.tools.ant.Main $*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.xml
Type: text/xml
Size: 10179 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030331/743747ea/build.xml
-------------- next part --------------
@echo off
if "%JAVA_HOME%" == "" goto error
set ADDITIONALCLASSPATH=%JAVA_HOME%\lib\classes.zip;..\jdom\lib\collections.jar
call build %1 %2 %3 %4 %5
goto end
:error
echo ERROR: JAVA_HOME not found in your environment.
echo Please, set the JAVA_HOME variable in your environment to match the
echo location of the Java Virtual Machine you want to use.
:end
set ADDITIONALCLASSPATH=
-------------- next part --------------
@echo off
echo Building...
if "%JAVA_HOME%" == "" goto error
set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;..\jdom\lib\xerces.jar;..\jdom\lib\jaxp.jar;.\lib\jakarta-regexp-1.1.jar;..\jdom\lib\ant.jar;..\jdom\build\classes
set ANT_HOME=../jdom/lib
echo Building with classpath %LOCALCLASSPATH%;%ADDITIONALCLASSPATH%
echo Starting Ant...
%JAVA_HOME%\bin\java.exe -Dant.home="%ANT_HOME%" -classpath "%LOCALCLASSPATH%;%ADDITIONALCLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5
goto end
:error
echo ERROR: JAVA_HOME not found in your environment.
echo Please, set the JAVA_HOME variable in your environment to match the
echo location of the Java Virtual Machine you want to use.
:end
set LOCALCLASSPATH=
More information about the jdom-interest
mailing list