Fedora Linux Support Community & Resources Center
  #1  
Old 8th March 2012, 04:13 AM
sepoto Offline
Registered User
 
Join Date: Dec 2010
Posts: 174
linuxfirefox
Usage of Ant.

Code:
[penguin@Penguin-PC bin]$ ls -la
total 20
drwx------. 2 penguin penguin 4096 Mar  7 19:37 .
drwx------. 5 penguin penguin 4096 Mar  7 19:37 ..
-rw-------. 1 penguin penguin 4599 May 13  2011 build.xml
-rw-------. 1 penguin penguin  439 May 13  2011 NSClient.bat
[penguin@Penguin-PC bin]$ ant deploy
Buildfile: /home/penguin/Downloads/ERP/bin/build.xml
  [taskdef] Could not load definitions from resource axis-tasks.properties. It could not be found.

init:
     [echo] --------------------------------------------------------------
     [echo] Project Root Directory is /home/penguin/Downloads/ERP
     [echo] 
     [echo] JAVA_HOME is ${env.JAVA_HOME}
     [echo] AXIS_HOME is ${env.AXIS_HOME}
     [echo] 
     [echo] WSDL location is https://webservices.netsuite.com/wsdl/v2011_2_0/netsuite.wsdl
     [echo] --------------------------------------------------------------

BUILD FAILED
/home/penguin/Downloads/ERP/bin/build.xml:40: The JAVA2_HOME environment variable needs to be set in order to use this ant script. Please see README for details.

Total time: 0 seconds
[penguin@Penguin-PC bin]$
This is the contents of build.xml
Code:
<?xml version="1.0" encoding="utf-8"?>

<project name="NetSuite Sample Client" default="help" basedir="../">



  <!--External properties file-->

  <property file="nsclient.properties"></property>

  <property environment="env"></property>

  

  <!--Directory definitions-->

  <property name="build.dir" value="${basedir}/build"></property>

  <property name="src.dir" value="${basedir}/src"></property>

  <property name="generated.src.dir" value="${basedir}/src.generated"></property>

  <property name="dist.dir" value="${basedir}/out"></property>

  <property name="axis.dir" value="${env.AXIS_HOME}"></property>

  

  <!-- Axis classpath -->

  <path id="project.classpath">

    <pathelement path="${build.dir}"></pathelement>

    <pathelement path="${axis.dir}/lib/axis.jar"></pathelement>

    <pathelement path="${axis.dir}/lib/axis-ant.jar"></pathelement>

    <pathelement path="${axis.dir}/lib/axis-schema.jar"></pathelement>

    <pathelement path="${axis.dir}/lib/commons-discovery-0.2.jar"></pathelement>

    <pathelement path="${axis.dir}/lib/commons-logging-1.0.4.jar"></pathelement>

    <pathelement path="${axis.dir}/lib/jaxrpc.jar"></pathelement>

    <pathelement path="${axis.dir}/lib/log4j-1.2.8.jar"></pathelement>

    <pathelement path="${axis.dir}/lib/saaj.jar"></pathelement>

    <pathelement path="${axis.dir}/lib/wsdl4j-1.5.1.jar"></pathelement>

  </path>

  

  <!-- Task definitions -->

  <taskdef resource="axis-tasks.properties" classpathref="project.classpath"></taskdef>

  <target name="init">

    <echo>--------------------------------------------------------------</echo>

    <echo>Project Root Directory is ${basedir}</echo>

    <echo></echo>

    <echo>JAVA_HOME is ${env.JAVA_HOME}</echo>

    <echo>AXIS_HOME is ${axis.dir}</echo>

    <echo></echo>

    <echo>WSDL location is ${wsdl.url}</echo>

    <echo>--------------------------------------------------------------</echo>

    <fail unless="env.JAVA_HOME">

      The JAVA2_HOME environment variable needs to be set in order to use this ant script. Please see README for details.

    </fail>

    <fail unless="env.AXIS_HOME"> 

      The AXIS_HOME environment variable needs to be set in order to use this ant script. Please see README for details.

    </fail>

    <tstamp></tstamp>

  </target>

  

  <target name="help">

    <echo>

        Description: This is the Ant build script for the sample NetSuite web 

        services client application that demonstrates how to NetSuite's

        web services using the Apache Axis platform. 

        

        Before you can use this script, please ensure that the following 

        variables have been set in the env.properties file:

        

          AXIS_HOME - point to your Axis installation root

         

        Usage: 

            ant deploy: Performs a new build including regenerating the proxy classes

            ant compile: Compiles all java classes, including generated proxy classes

            ant generate.proxy: Generates client proxies using Axis WSDL2Java       

            ant clean: Cleans the current build

		</echo>

  </target>

  

  <!-- Recycle client -->

  <target name="deploy" depends="init, clean, generate.proxy, compile" description="Performs a new build including regenerating the proxy classes"/>

  

  <!-- Compile client using generated classes -->

  <target name="compile" depends="init" description="Compiles all java classes">

    <echo>Compiling client java sources...</echo>

    <mkdir dir="${build.dir}"></mkdir>

    <javac srcdir="${src.dir};${generated.src.dir}" destdir="${build.dir}" verbose="false" debug="on">

      <classpath refid="project.classpath"></classpath>

    </javac>

  </target>

  

  <!-- Generate client interfaces -->

  <target name="generate.proxy" depends="init" description="Generates client proxies using Axis WSDL2Java">

    <mkdir dir="${generated.src.dir}"></mkdir>

    <echo>Generating client interfaces using Apache Axis</echo>

    <echo>From ${wsdl.url}</echo>

    <!--axis-wsdl2java output="${generated.src.dir}" testcase="true" verbose="true" url="${wsdl.url}"-->

    <axis-wsdl2java output="${generated.src.dir}" verbose="true" url="${wsdl.url}" all="true" wrapArrays="true">

      <mapping namespace="http://axis.apache.org/ns/interop" package="interop"></mapping>

    </axis-wsdl2java>

  </target>

  

  <!-- Clean all client classes -->

  <target name="clean" description="Cleanup client.">

    <delete dir="${generated.src.dir}"></delete>

    <delete dir="${build.dir}"></delete>

  </target>

  

</project>
Does anyone know what this dribble about "Could not load definitions from resource axis-tasks.properties. It could not be found." and "JAVA2_HOME" coming out of my terminal means?

Much Thanks!
Reply With Quote
Reply

Tags
ant, usage

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU usage negatifo Using Fedora 6 1st July 2007 10:28 PM
100% CPU Usage Rupam Bezbarua Using Fedora 9 9th July 2006 11:21 AM
100% Cpu Usage Gritstone Using Fedora 7 8th September 2005 10:32 AM
CVS usage mnguyen Programming & Packaging 1 25th November 2004 04:27 AM


Current GMT-time: 22:14 (Friday, 29-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat