Solved

problems running a deploy.bat file

Posted on 2010-11-22
5
779 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
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 500 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
micro services spring boot application error 3 183
Java Timer (static) 9 43
HashTable highest marks enumeration alternative 9 37
What's wrong with this code? 4 22
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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 and create new code templates in NetBeans IDE 8.0 for Windows.

785 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