?
Solved

problems running a deploy.bat file

Posted on 2010-11-22
5
Medium Priority
?
796 Views
Last Modified: 2012-05-10
Hello, I ran a deploy.bat script, I am trying to run everything from the d:\ drive.

This is what happened:

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

Z:\>d:

D:\>cd d:\NHINC

d:\NHINC>deploy.bat

d:\NHINC>set AS_HOME=D:\Sun\AppServer

d:\NHINC>set IDE_HOME=D:\Program Files\NetBeans 6.7.1

d:\NHINC>set ANT_HOME=D:\Program Files\NetBeans 6.7.1\java2\ant

d:\NHINC>set ANT_OPTS=-Xmx872m -XX:MaxPermSize=512m "-Dcom.sun.aas.instanceName=
server"

d:\NHINC>set NHINC_PROPERTIES_DIR=D:\Sun\AppServer\domains\domain1\config\nhin

d:\NHINC>set JAVA_HOME=D:\Java\jdk1.6.0_16

d:\NHINC>set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;D:\Jav
a\jdk1.6.0_16\bin;D:\Program Files\NetBeans 6.7.1\java2\ant\bin

d:\NHINC>ant -buildfile deploy.xml Buildfile: deploy.xml [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xm
l. It could not be found.

BUILD FAILED
d:\NHINC\deploy.xml:6: taskdef class com.oopsconsultancy.xmltask.ant.XmlTask can
not be found

Total time: 0 seconds
d:\NHINC>

Can you tell me what I am doing wrong?
0
Comment
Question by:midani222
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:jcott28
ID: 34192340
Make sure you have your ant/bin folder in your Path and set your ANT_HOME property.
0
 
LVL 5

Expert Comment

by:jcott28
ID: 34192352
Looks like you also need to make sure you have the xmltask.jar file in your ant_home/lib folder.

http://sourceforge.net/projects/xmltask/files/xmltask/1.16/xmltask.jar/download
0
 

Author Comment

by:midani222
ID: 34192559
Hello I did everything you suggested, however, I did have a question:

Make sure you have your ant/bin folder in your Path and set your ANT_HOME property.

Okay I went to ANT_HOME and modified it to include the PATH.

However, when I run the .bat file, I still get this output, I cannot get it to stop going to c:

I want it to look at everything on d:

please review my results if you can:

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

Z:\>d:

D:\>cd d:\NHINC

d:\NHINC>deploy.bat

d:\NHINC>set AS_HOME=D:\Sun\AppServer

d:\NHINC>set IDE_HOME=D:\Program Files\NetBeans 6.7.1

d:\NHINC>set ANT_HOME=D:\Program Files\NetBeans 6.7.1\java2\ant

d:\NHINC>set ANT_OPTS=-Xmx872m -XX:MaxPermSize=512m "-Dcom.sun.aas.instanceName=
server"

d:\NHINC>set NHINC_PROPERTIES_DIR=D:\Sun\AppServer\domains\domain1\config\nhin

d:\NHINC>set JAVA_HOME=D:\Java\jdk1.6.0_16

d:\NHINC>set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;D:\Jav
a\jdk1.6.0_16\bin;D:\Program Files\NetBeans 6.7.1\java2\ant\bin

d:\NHINC>ant -buildfile deploy.xml
Buildfile: deploy.xml
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xm
l. It could not be found.

BUILD FAILED
d:\NHINC\deploy.xml:6: taskdef class com.oopsconsultancy.xmltask.ant.XmlTask can
not be found

Total time: 0 seconds
d:\NHINC>deploy.bat

d:\NHINC>set AS_HOME=D:\Sun\AppServer

d:\NHINC>set IDE_HOME=D:\Program Files\NetBeans 6.7.1

d:\NHINC>set ANT_HOME=D:\Program Files\NetBeans 6.7.1\java2\ant

d:\NHINC>set ANT_OPTS=-Xmx872m -XX:MaxPermSize=512m "-Dcom.sun.aas.instanceName=
server"

d:\NHINC>set NHINC_PROPERTIES_DIR=D:\Sun\AppServer\domains\domain1\config\nhin

d:\NHINC>set JAVA_HOME=D:\Java\jdk1.6.0_16

d:\NHINC>set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;D:\Jav
a\jdk1.6.0_16\bin;D:\Program Files\NetBeans 6.7.1\java2\ant\bin

d:\NHINC>ant -buildfile deploy.xml
Buildfile: deploy.xml
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xm
l. It could not be found.

BUILD FAILED
d:\NHINC\deploy.xml:6: taskdef class com.oopsconsultancy.xmltask.ant.XmlTask can
not be found

Total time: 0 seconds
d:\NHINC>deploy.bat

d:\NHINC>set AS_HOME=D:\Sun\AppServer

d:\NHINC>set IDE_HOME=D:\Program Files\NetBeans 6.7.1

d:\NHINC>set ANT_HOME=D:\Program Files\NetBeans 6.7.1\java2\ant

d:\NHINC>set ANT_OPTS=-Xmx872m -XX:MaxPermSize=512m "-Dcom.sun.aas.instanceName=
server"

d:\NHINC>set NHINC_PROPERTIES_DIR=D:\Sun\AppServer\domains\domain1\config\nhin

d:\NHINC>set JAVA_HOME=D:\Java\jdk1.6.0_16

d:\NHINC>set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;D:\Jav
a\jdk1.6.0_16\bin;D:\Program Files\NetBeans 6.7.1\java2\ant\bin

d:\NHINC>ant -buildfile deploy.xml
Buildfile: deploy.xml
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xm
l. It could not be found.

BUILD FAILED
d:\NHINC\deploy.xml:6: taskdef class com.oopsconsultancy.xmltask.ant.XmlTask can
not be found

Total time: 0 seconds
d:\NHINC>
0
 
LVL 17

Accepted Solution

by:
sweetfa2 earned 2000 total points
ID: 34200124
http://ant-contrib.sourceforge.net/

It looks like the ant-contrib library has not been installed in your ant environment.

Follow the link above to download the contrib and install it in the appropriate place.
0
 

Author Closing Comment

by:midani222
ID: 34200227
Hi I knew where to stick the .jar file, in the 'lib' directory, but it would have been more of a complete solution if it was stated to stick it in the ant/ant version/lib directory.

Thanks,
Michele
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
A solution for Fortify Path Manipulation.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question