javaee5 Tutorial first step error(can not run ant)
Hi all,
I have just installedSun Java System Application Server enterprise Editionin my computer.
My system is getoo .
I copy thejavaee5Tutorial to the directory ofSun Java System Application Server enterprise Edition
Here is the error:
in the bookstore1 directory: run ant
Buildfile: build.xml
BUILD FAILED
/opt/SUNWappserver/javaeetutorial5/examples/web/bookstore1/build.xml:23: The following error occurred while executing this line:
/opt/SUNWappserver/javaeetutorial5/examples/bp-project/main.xml:20: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else" attribute.
Total time: 1 second
regards!
aries211
[750 byte] By [
aries211] at [2007-11-14]

Hi all:
I am following the examples of javaeetutorial5 and I am having problems running ANT for the hello2 web module when I select the following command:
I DID NOT HAVE PROBLEMS WITH HELLO1 but I am having problem with hello2......
I am using java version 1.4.2_07 in my classpath.....
If you need more information please let me know.....
C:\javaeetutorial5\examples\web\hello2>ant
Buildfile: build.xml
-pre-init:
init:
default-ear:
-pre-compile:
bpp-actual-compilation:
[echo] Compiling hello2
[javac] Compiling 2 source files to C:\javaeetutorial5\examples\web\hello2\b
uild\web\WEB-INF\classes
[javac] javac: invalid target release: 1.5
[javac] Usage: javac <options> <source files>
[javac] where possible options include:
[javac]-gGenerate all debugging info
[javac]-g:noneGenerate no debugging info
[javac]-g:{lines,vars,source}Generate only some debugging info
[javac]-nowarnGenerate no warnings
[javac]-verboseOutput messages about what the compiler
is doing
[javac]-deprecation Output source locations where deprecated
APIs are used
[javac]-classpath <path> Specify where to find user class files
[javac]-sourcepath <path>Specify where to find input source files
[javac]-bootclasspath <path>Override location of bootstrap class fil
es
[javac]-extdirs <dirs>Override location of installed extension
s
[javac]-d <directory>Specify where to place generated class f
iles
[javac]-encoding <encoding>Specify character encoding used by sourc
e files
[javac]-source <release> Provide source compatibility with specif
ied release
[javac]-target <release> Generate class files for specific VM ver
sion
[javac]-help Print a synopsis of standard options
BUILD FAILED
C:\javaeetutorial5\examples\bp-project\command-line-ant-tasks.xml:89: Compile fa
iled; see the compiler error output for details.
Total time: 1 second
C:\javaeetutorial5\examples\web\hello2>
Hi all ....
it's me again.....I just try a couple of minutes ago to run ANT for the bookstore1 of the Example Servlets of the Java EE 5 Tutorial and still getting this frustated error:
C:\javaeetutorial5\examples\web\bookstore1>ant
Buildfile: build.xml
-pre-init:
init:
default-ear:
build-common:
-pre-init:
init:
default-ear:
-pre-compile:
bpp-actual-compilation:
[echo] Compiling bookstore
[javac] Compiling 11 source files to C:\javaeetutorial5\examples\web\booksto
re\build\classes
[javac] javac: invalid target release: 1.5
[javac] Usage: javac <options> <source files>
[javac] where possible options include:
[javac]-gGenerate all debugging info
[javac]-g:noneGenerate no debugging info
[javac]-g:{lines,vars,source}Generate only some debugging info
[javac]-nowarnGenerate no warnings
[javac]-verboseOutput messages about what the compiler
is doing
[javac]-deprecation Output source locations where deprecated
APIs are used
[javac]-classpath <path> Specify where to find user class files
[javac]-sourcepath <path>Specify where to find input source files
[javac]-bootclasspath <path>Override location of bootstrap class fil
es
[javac]-extdirs <dirs>Override location of installed extension
s
[javac]-d <directory>Specify where to place generated class f
iles
[javac]-encoding <encoding>Specify character encoding used by sourc
e files
[javac]-source <release> Provide source compatibility with specif
ied release
[javac]-target <release> Generate class files for specific VM ver
sion
[javac]-help Print a synopsis of standard options
[subant] Failure for target 'default' of: C:\javaeetutorial5\examples\web\boo
kstore\build.xml
[subant] The following error occurred while executing this line:
[subant] C:\javaeetutorial5\examples\bp-project\command-line-ant-tasks.xml:89
: Compile failed; see the compiler error output for details.
copy-common-jars:
[mkdir] Created dir: C:\javaeetutorial5\examples\web\bookstore1\build\web\WE
B-INF\lib
BUILD FAILED
C:\javaeetutorial5\examples\web\bookstore1\build.xml:36: Warning: Could not find
file C:\javaeetutorial5\examples\web\bookstore\dist\bookstore.jar to copy.
Total time: 1 second
C:\javaeetutorial5\examples\web\bookstore1>
- -
Here it is the build.properties file
# uncomment the property javaee.home, and add the path
# to your GlassFish Java EE 5 SDK installation
#
javaee.home=c:/Sun/AppServer
javaee.tutorial.home=c:/javaeetutorial5
# machine name (or the IP address) where the applications will be deployed.
javaee.server.name=localhost
# port number where the app-server is accessed by the users
javaee.server.port=8080
# port number where the admin server of the app-server is available
javaee.adminserver.port=4848
# Uncomment the property j2ee.server.username,
# and replace the administrator username of the app-server
javaee.server.username=admin
# Uncomment the property j2ee.server.passwordfile,
# and replace the following line to point to a file that
# contains the admin password for your app-server.
# The file should contain the password in the following line:
#
# AS_ADMIN_PASSWORD=adminadmin
#
# Notice that the password is adminadmin since this is
# the default password used by the glassfish app-server installation.
#
javaee.server.passwordfile=${javaee.tutorial.home}/examples/common/admin-passwo rd.txt
appserver.instance=server
# Uncomment and set this property to the location of the browser you
# choose to launch when an application is deployed.
# On Windows and Mac OS X the default browser is used.
#default.browser=/Applications/Firefox.app/Contents/MacOS/firefox-bin
# Database vendor property for db tasks
db.vendor=javadb
- --
This is in my SYSTEM VARIABLE:
CLASSPATH= c:\sun\appserver\lib;C:\Program Files\IBM\WebSphere MQ\Java\lib\providerutil.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\ldap.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jta.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jndi.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\connector.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\fscontext.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;c:\j2sdk1.4.2_07;C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip\
javaee.home = C:\\Sun\\AppServer
JAVA_HOME = c:\j2sdk1.4.2_07
- -
Thank you in advanced....