You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Andrei <an...@netrom.ro> on 2003/08/20 15:53:38 UTC

Nested elements

        I have a task called uni-d

    <target name="UniDTask">
       <taskdef name="uni-d"
           classname="be.unid.generate.AntTask"
           classpath="${unid.dir}/uni-d.jar"
           classpathref="task.path"
          />
     </target>

and here i use it:

    <target name="task" depends="UniDTask">
        <uni-d
            appdir="D:\Work\Uni-D\test\src\uni-d"
            definition="test1.xml"
            outputdir="../../build/src"
            spackage="be.unid.test.om"
            template="xejb">
            <config
                name="extra">
                <attribute name="datasource" value="java:/ICtraceDS"/>
                <attribute jndi="IC-trace"/>
            </config>
        </uni-d>

This task add's the values for attributes:
        appdir; definition; outputdir;  spackage;  template     in the
config   section of a ini file. The problem is that i have to create another
section in the ini file named extra and add the values for the parameters
datasource and jndi in the extra section of ini file. For this purpose i
must use the sintax in as you can se above:

            <config
                name="extra">
                <attribute name="datasource" value="java:/ICtraceDS"/>
                <attribute jndi="IC-trace"/>
            </config>


How can i do that?


                                                                    Andrei






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


Re: Nested elements

Posted by Andrei <an...@netrom.ro>.
        I succed with Ant,
            Thank you all for your help.




Andrei



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


Re: Nested elements

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Also, in addition to the information Jan has sent, have a look at the 
Feb. issue of JavaPro magazine (its online).  I wrote an article that 
describes exactly what you are asking about.

	Erik


On Thursday, August 21, 2003, at 02:12  AM, Andrei wrote:

>         Dear Antoine,
>
> the problem is that i have to write the code for the uni-d task  i 
> have to
> support that sintax. I understand that i have to write some functions
> add, or addConfigured but i don,t know how to write the functions. I 
> have
> problems with the function body, i don't know what to write there.
> Can you help me?
>
>
> ----- Original Message -----
> From: "Antoine Levy-Lambert" <an...@antbuild.com>
> To: "Ant Developers List" <de...@ant.apache.org>
> Sent: Wednesday, August 20, 2003 7:01 PM
> Subject: Re: Nested elements
>
>
>> You should ask help from the person who wrote the uni-d task.
>> The source code of uni-d task should have an addConfig method.
>> There should be a datatype config corresponding to what you have in 
>> the
>> config section.
>> The source code for config should have an addAttribute method
>> There should also be a datatype attribute.
>> You also need to do typedefs for attribute and config so that ant
>> understands these special datatypes.
>> Cheers,
>> Antoine
>> ----- Original Message -----
>> From: "Andrei" <an...@netrom.ro>
>> To: "Ant Developers List" <de...@ant.apache.org>
>> Sent: Wednesday, August 20, 2003 3:53 PM
>> Subject: Nested elements
>>
>>
>>>         I have a task called uni-d
>>>
>>>     <target name="UniDTask">
>>>        <taskdef name="uni-d"
>>>            classname="be.unid.generate.AntTask"
>>>            classpath="${unid.dir}/uni-d.jar"
>>>            classpathref="task.path"
>>>           />
>>>      </target>
>>>
>>> and here i use it:
>>>
>>>     <target name="task" depends="UniDTask">
>>>         <uni-d
>>>             appdir="D:\Work\Uni-D\test\src\uni-d"
>>>             definition="test1.xml"
>>>             outputdir="../../build/src"
>>>             spackage="be.unid.test.om"
>>>             template="xejb">
>>>             <config
>>>                 name="extra">
>>>                 <attribute name="datasource" 
>>> value="java:/ICtraceDS"/>
>>>                 <attribute jndi="IC-trace"/>
>>>             </config>
>>>         </uni-d>
>>>
>>> This task add's the values for attributes:
>>>         appdir; definition; outputdir;  spackage;  template     in 
>>> the
>>> config   section of a ini file. The problem is that i have to create
>> another
>>> section in the ini file named extra and add the values for the
> parameters
>>> datasource and jndi in the extra section of ini file. For this 
>>> purpose i
>>> must use the sintax in as you can se above:
>>>
>>>             <config
>>>                 name="extra">
>>>                 <attribute name="datasource" 
>>> value="java:/ICtraceDS"/>
>>>                 <attribute jndi="IC-trace"/>
>>>             </config>
>>>
>>>
>>> How can i do that?
>>>
>>>
>>>
> Andrei
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: dev-help@ant.apache.org
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>> For additional commands, e-mail: dev-help@ant.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


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


Re: Nested elements

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Also, in addition to the information Jan has sent, have a look at the 
Feb. issue of JavaPro magazine (its online).  I wrote an article that 
describes exactly what you are asking about.

	Erik


On Thursday, August 21, 2003, at 02:12  AM, Andrei wrote:

>         Dear Antoine,
>
> the problem is that i have to write the code for the uni-d task  i 
> have to
> support that sintax. I understand that i have to write some functions
> add, or addConfigured but i don,t know how to write the functions. I 
> have
> problems with the function body, i don't know what to write there.
> Can you help me?
>
>
> ----- Original Message -----
> From: "Antoine Levy-Lambert" <an...@antbuild.com>
> To: "Ant Developers List" <de...@ant.apache.org>
> Sent: Wednesday, August 20, 2003 7:01 PM
> Subject: Re: Nested elements
>
>
>> You should ask help from the person who wrote the uni-d task.
>> The source code of uni-d task should have an addConfig method.
>> There should be a datatype config corresponding to what you have in 
>> the
>> config section.
>> The source code for config should have an addAttribute method
>> There should also be a datatype attribute.
>> You also need to do typedefs for attribute and config so that ant
>> understands these special datatypes.
>> Cheers,
>> Antoine
>> ----- Original Message -----
>> From: "Andrei" <an...@netrom.ro>
>> To: "Ant Developers List" <de...@ant.apache.org>
>> Sent: Wednesday, August 20, 2003 3:53 PM
>> Subject: Nested elements
>>
>>
>>>         I have a task called uni-d
>>>
>>>     <target name="UniDTask">
>>>        <taskdef name="uni-d"
>>>            classname="be.unid.generate.AntTask"
>>>            classpath="${unid.dir}/uni-d.jar"
>>>            classpathref="task.path"
>>>           />
>>>      </target>
>>>
>>> and here i use it:
>>>
>>>     <target name="task" depends="UniDTask">
>>>         <uni-d
>>>             appdir="D:\Work\Uni-D\test\src\uni-d"
>>>             definition="test1.xml"
>>>             outputdir="../../build/src"
>>>             spackage="be.unid.test.om"
>>>             template="xejb">
>>>             <config
>>>                 name="extra">
>>>                 <attribute name="datasource" 
>>> value="java:/ICtraceDS"/>
>>>                 <attribute jndi="IC-trace"/>
>>>             </config>
>>>         </uni-d>
>>>
>>> This task add's the values for attributes:
>>>         appdir; definition; outputdir;  spackage;  template     in 
>>> the
>>> config   section of a ini file. The problem is that i have to create
>> another
>>> section in the ini file named extra and add the values for the
> parameters
>>> datasource and jndi in the extra section of ini file. For this 
>>> purpose i
>>> must use the sintax in as you can se above:
>>>
>>>             <config
>>>                 name="extra">
>>>                 <attribute name="datasource" 
>>> value="java:/ICtraceDS"/>
>>>                 <attribute jndi="IC-trace"/>
>>>             </config>
>>>
>>>
>>> How can i do that?
>>>
>>>
>>>
> Andrei
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: dev-help@ant.apache.org
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>> For additional commands, e-mail: dev-help@ant.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


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


Re: Nested elements

Posted by Andrei <an...@netrom.ro>.
        Dear Antoine,

the problem is that i have to write the code for the uni-d task  i have to
support that sintax. I understand that i have to write some functions
add, or addConfigured but i don,t know how to write the functions. I have
problems with the function body, i don't know what to write there.
Can you help me?


----- Original Message -----
From: "Antoine Levy-Lambert" <an...@antbuild.com>
To: "Ant Developers List" <de...@ant.apache.org>
Sent: Wednesday, August 20, 2003 7:01 PM
Subject: Re: Nested elements


> You should ask help from the person who wrote the uni-d task.
> The source code of uni-d task should have an addConfig method.
> There should be a datatype config corresponding to what you have in the
> config section.
> The source code for config should have an addAttribute method
> There should also be a datatype attribute.
> You also need to do typedefs for attribute and config so that ant
> understands these special datatypes.
> Cheers,
> Antoine
> ----- Original Message -----
> From: "Andrei" <an...@netrom.ro>
> To: "Ant Developers List" <de...@ant.apache.org>
> Sent: Wednesday, August 20, 2003 3:53 PM
> Subject: Nested elements
>
>
> >         I have a task called uni-d
> >
> >     <target name="UniDTask">
> >        <taskdef name="uni-d"
> >            classname="be.unid.generate.AntTask"
> >            classpath="${unid.dir}/uni-d.jar"
> >            classpathref="task.path"
> >           />
> >      </target>
> >
> > and here i use it:
> >
> >     <target name="task" depends="UniDTask">
> >         <uni-d
> >             appdir="D:\Work\Uni-D\test\src\uni-d"
> >             definition="test1.xml"
> >             outputdir="../../build/src"
> >             spackage="be.unid.test.om"
> >             template="xejb">
> >             <config
> >                 name="extra">
> >                 <attribute name="datasource" value="java:/ICtraceDS"/>
> >                 <attribute jndi="IC-trace"/>
> >             </config>
> >         </uni-d>
> >
> > This task add's the values for attributes:
> >         appdir; definition; outputdir;  spackage;  template     in the
> > config   section of a ini file. The problem is that i have to create
> another
> > section in the ini file named extra and add the values for the
parameters
> > datasource and jndi in the extra section of ini file. For this purpose i
> > must use the sintax in as you can se above:
> >
> >             <config
> >                 name="extra">
> >                 <attribute name="datasource" value="java:/ICtraceDS"/>
> >                 <attribute jndi="IC-trace"/>
> >             </config>
> >
> >
> > How can i do that?
> >
> >
> >
Andrei
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>



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


Re: Nested elements

Posted by Andrei <an...@netrom.ro>.
        Dear Antoine,

the problem is that i have to write the code for the uni-d task  i have to
support that sintax. I understand that i have to write some functions
add, or addConfigured but i don,t know how to write the functions. I have
problems with the function body, i don't know what to write there.
Can you help me?


----- Original Message -----
From: "Antoine Levy-Lambert" <an...@antbuild.com>
To: "Ant Developers List" <de...@ant.apache.org>
Sent: Wednesday, August 20, 2003 7:01 PM
Subject: Re: Nested elements


> You should ask help from the person who wrote the uni-d task.
> The source code of uni-d task should have an addConfig method.
> There should be a datatype config corresponding to what you have in the
> config section.
> The source code for config should have an addAttribute method
> There should also be a datatype attribute.
> You also need to do typedefs for attribute and config so that ant
> understands these special datatypes.
> Cheers,
> Antoine
> ----- Original Message -----
> From: "Andrei" <an...@netrom.ro>
> To: "Ant Developers List" <de...@ant.apache.org>
> Sent: Wednesday, August 20, 2003 3:53 PM
> Subject: Nested elements
>
>
> >         I have a task called uni-d
> >
> >     <target name="UniDTask">
> >        <taskdef name="uni-d"
> >            classname="be.unid.generate.AntTask"
> >            classpath="${unid.dir}/uni-d.jar"
> >            classpathref="task.path"
> >           />
> >      </target>
> >
> > and here i use it:
> >
> >     <target name="task" depends="UniDTask">
> >         <uni-d
> >             appdir="D:\Work\Uni-D\test\src\uni-d"
> >             definition="test1.xml"
> >             outputdir="../../build/src"
> >             spackage="be.unid.test.om"
> >             template="xejb">
> >             <config
> >                 name="extra">
> >                 <attribute name="datasource" value="java:/ICtraceDS"/>
> >                 <attribute jndi="IC-trace"/>
> >             </config>
> >         </uni-d>
> >
> > This task add's the values for attributes:
> >         appdir; definition; outputdir;  spackage;  template     in the
> > config   section of a ini file. The problem is that i have to create
> another
> > section in the ini file named extra and add the values for the
parameters
> > datasource and jndi in the extra section of ini file. For this purpose i
> > must use the sintax in as you can se above:
> >
> >             <config
> >                 name="extra">
> >                 <attribute name="datasource" value="java:/ICtraceDS"/>
> >                 <attribute jndi="IC-trace"/>
> >             </config>
> >
> >
> > How can i do that?
> >
> >
> >
Andrei
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>



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


Re: Nested elements

Posted by Antoine Levy-Lambert <an...@antbuild.com>.
You should ask help from the person who wrote the uni-d task.
The source code of uni-d task should have an addConfig method.
There should be a datatype config corresponding to what you have in the
config section.
The source code for config should have an addAttribute method
There should also be a datatype attribute.
You also need to do typedefs for attribute and config so that ant
understands these special datatypes.
Cheers,
Antoine
----- Original Message -----
From: "Andrei" <an...@netrom.ro>
To: "Ant Developers List" <de...@ant.apache.org>
Sent: Wednesday, August 20, 2003 3:53 PM
Subject: Nested elements


>         I have a task called uni-d
>
>     <target name="UniDTask">
>        <taskdef name="uni-d"
>            classname="be.unid.generate.AntTask"
>            classpath="${unid.dir}/uni-d.jar"
>            classpathref="task.path"
>           />
>      </target>
>
> and here i use it:
>
>     <target name="task" depends="UniDTask">
>         <uni-d
>             appdir="D:\Work\Uni-D\test\src\uni-d"
>             definition="test1.xml"
>             outputdir="../../build/src"
>             spackage="be.unid.test.om"
>             template="xejb">
>             <config
>                 name="extra">
>                 <attribute name="datasource" value="java:/ICtraceDS"/>
>                 <attribute jndi="IC-trace"/>
>             </config>
>         </uni-d>
>
> This task add's the values for attributes:
>         appdir; definition; outputdir;  spackage;  template     in the
> config   section of a ini file. The problem is that i have to create
another
> section in the ini file named extra and add the values for the parameters
> datasource and jndi in the extra section of ini file. For this purpose i
> must use the sintax in as you can se above:
>
>             <config
>                 name="extra">
>                 <attribute name="datasource" value="java:/ICtraceDS"/>
>                 <attribute jndi="IC-trace"/>
>             </config>
>
>
> How can i do that?
>
>
>                                                                     Andrei
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>



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