ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conelly, Luis (EM, DDEMESIS)" <Luis.Cone...@ge.com>
Subject RE: How to print out a <path > structure
Date Mon, 10 Nov 2003 17:15:42 GMT
Jan / All

	I have checked out the reference you sent me. However I am still having certain issues (the
task cannot be found)

	This is a snippet of the test:

    <!--Build.xml-->
    <property environment="env"/>
    <property name="dist" location="dist"/>
	
    <!--Set Classpath-->
    <path id="project.class.path">
        <pathelement path="${env.CLASSPATH}"/>
        <fileset dir="${lib}">
            <include name="**/*.jar"/>
            <include name="**/*.zip"/>
        </fileset>
        <fileset dir="${env.ANT_HOME}/lib">
            <include name="**/*.jar"/>
            <include name="**/*.zip"/>
        </fileset>
        <pathelement location="src"/>
    </path>
      
    <!-- Taskdef for editproperties task-->
    <target name="declareEditProperties" >
        <taskdef name="editproperties" 
                 classpath="${env.ANT_HOME}/lib/editproperties.jar"
                 classname="com.pazoom.tools.EditPropertiesTask"/>
    </target>

    <!--init target - Starts the tstamp task -->
    <target name="init" description="Initializes Time / Date feature">
        <tstamp/>
        <echo message="${DSTAMP} - ${TSTAMP}"/>
        <property name="project.class.path.value" refid="project.class.path"/>
        <echo message="The classpath for this build file is:"/>
        <echo message="${project.class.path.value}"/>
    </target>
      
    <target name="editprops" depends="declareEditProperties,init">
        <editproperties file="${dist}/lib/${DSTAMP}/edocs.properties">
            <editproperty name="ematrix_port" value="7001"/>   
            <editproperty name="server_ip" value="sjcqa01.ne.ge.com"/>   
            <editproperty name="server_port" value="1099"/>   
            <editproperty name="temp_path_checkout" value="${qa.path.checkout}"/>  

            <editproperty name="application.path" value="${qa.app.path}"/>   
        </editproperties>
    </target>
    <!--End of Build.xml-->

    But when I execute the 'editprops' task, I got following error:

-------------------------------------------------
Buildfile: build.xml

declareEditProperties:

BUILD FAILED
file:C:/Projects/GNF/eDocs/build.xml:69: taskdef class com.pazoom.tools.EditPropertiesTask
cannot be found

Total time: 1 second
-------------------------------------------------

The jar file (editproperties.jar) which contains this task is in my %ANT_HOME%/lib directory

I've tried both to set the classpath either by a <path> structure and by setting the
classpath in the taskdef, but nothing seems to work. 

Any thoughts about this?

Regards
-Luis

-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: Monday, November 10, 2003 1:55 AM
To: user@ant.apache.org
Subject: RE: How to print out a <path > structure


> 	I'd like to know which jar files are available for my 
> ant tasks. This is a snippet of the script
> 
>     <path id="project.class.path">
>         <pathelement path="${env.CLASSPATH}"/>
>         <fileset dir="${lib}">
>             <include name="**/*.jar"/>
>             <include name="**/*.zip"/>
>         </fileset>
>         <fileset dir="${env.ANT_HOME}/lib">
>             <include name="**/*.jar"/>
>             <include name="**/*.zip"/>
>         </fileset>
>         <pathelement location="src"/>
>     </path>
> 
> 	I want to know which jar & zip files I can reach within 
> an ant task, bcoz I want to implement a new task and I drop 
> the jar file in $ANT_HOME/lib, but it seems I cannot 
> implement a task within the jar file.


You can print out a path with <pathconvert> and <echo>.

Have you <taskdef>ed your new task?
Maybe the tutorial in the Manual will help you
http://ant.apache.org/manual-1.6beta/tutorial-writing-tasks.html


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message