Solved

problems running a deploy.bat file

Posted on 2010-11-22
5
773 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
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

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

Expert Comment

by:jcott28
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now