You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jeffrey Bacon <jb...@magmic.com> on 2004/07/05 23:57:21 UTC

Am I missing something stupid here?  I can use my own condition but when 
I use isset I get:

build.xml:343: Class net.sf.antcontrib.logic.IfTask doesn't support the
  nested "isset" element.



     <contrib:if>
       <isset property="com.magmic-libs-built" />
       <contrib:then>
         <contrib:var name="build_classpath" 
value="${build_classpath};${basedir}/${temp.dir}/com.magmic.jar" />
       </contrib:then>
     </contrib:if>

-- 
--
Jeffrey Bacon
jbacon@magmic.com
Creative Developer
http://www.magmic.com

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


Re:

Posted by Jacob Kjome <ho...@visi.com>.
At 10:49 PM 7/5/2004 -0400, you wrote:
>it works if I use <magmic:exists ... /> (my own custom Condition) instead 
>of the isset but it doesn't like the built-in conditions.
>
>Is there a namespace for the default tasks? current: or ant: or something?

You need to check out the new beta of Ant-1.6.2.  In 1.6.0 and 1.6.1, if 
you use a namespace, you have to use that namespace for all 
subelements.  With 1.6.2..., well, here's what they wrote in the release 
notes...

"Nested elements for namespaced tasks and types may belong to the Ant 
default namespace as well as the task's or type's namespace."

http://cvs.apache.org/dist/ant/v1.6.2beta1/

Jake

>--
>Jeffrey Bacon
>jbacon@magmic.com
>Creative Developer
>http://www.magmic.com
>
>Alexey N. Solofnenko wrote:
>>Please try it without namespace. It works on my system. There were few 
>>emails saying that namespace processing is broken. I still do not 
>>understand how it works in ANT, so I never use it.
>>- Alexey.
>>Jeffrey Bacon wrote:
>>
>>>Am I missing something stupid here?  I can use my own condition but when 
>>>I use isset I get:
>>>
>>>build.xml:343: Class net.sf.antcontrib.logic.IfTask doesn't support the
>>>  nested "isset" element.
>>>
>>>
>>>
>>>     <contrib:if>
>>>       <isset property="com.magmic-libs-built" />
>>>       <contrib:then>
>>>         <contrib:var name="build_classpath" 
>>> value="${build_classpath};${basedir}/${temp.dir}/com.magmic.jar" />
>>>       </contrib:then>
>>>     </contrib:if>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org


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


Re:

Posted by Jeffrey Bacon <jb...@magmic.com>.
it works if I use <magmic:exists ... /> (my own custom Condition) 
instead of the isset but it doesn't like the built-in conditions.

Is there a namespace for the default tasks? current: or ant: or something?
--
Jeffrey Bacon
jbacon@magmic.com
Creative Developer
http://www.magmic.com

Alexey N. Solofnenko wrote:
> Please try it without namespace. It works on my system. There were few 
> emails saying that namespace processing is broken. I still do not 
> understand how it works in ANT, so I never use it.
> 
> - Alexey.
> 
> Jeffrey Bacon wrote:
> 
>> Am I missing something stupid here?  I can use my own condition but 
>> when I use isset I get:
>>
>> build.xml:343: Class net.sf.antcontrib.logic.IfTask doesn't support the
>>  nested "isset" element.
>>
>>
>>
>>     <contrib:if>
>>       <isset property="com.magmic-libs-built" />
>>       <contrib:then>
>>         <contrib:var name="build_classpath" 
>> value="${build_classpath};${basedir}/${temp.dir}/com.magmic.jar" />
>>       </contrib:then>
>>     </contrib:if>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

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


Re:

Posted by "Alexey N. Solofnenko" <A....@mdl.com>.
Please try it without namespace. It works on my system. There were few 
emails saying that namespace processing is broken. I still do not 
understand how it works in ANT, so I never use it.

- Alexey.

Jeffrey Bacon wrote:

> Am I missing something stupid here?  I can use my own condition but 
> when I use isset I get:
>
> build.xml:343: Class net.sf.antcontrib.logic.IfTask doesn't support the
>  nested "isset" element.
>
>
>
>     <contrib:if>
>       <isset property="com.magmic-libs-built" />
>       <contrib:then>
>         <contrib:var name="build_classpath" 
> value="${build_classpath};${basedir}/${temp.dir}/com.magmic.jar" />
>       </contrib:then>
>     </contrib:if>
>

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


Re:

Posted by Jeffrey Bacon <jb...@magmic.com>.
> Well, it is in the namespace associated with the contrib prefix.
> 
> When Ant detects the possible nested elements of a class and finds
> methods of the appropriate signatures for addXyz, createXyz or
> addConfiguredXyz it will see them as elements named xyz in the same
> namespace as the parent element.
> 
> The Ant-Contrib if task implementation inherits addIsset from Ant's
> ConditionBase class, so Ant sees a nested element isset in the same
> namespace that the if task belongs to.

ah... that makes sense.
(well, you know what I mean =), from an 'I understand' point of view)

>>is there an ETA on Ant 1.6.2 release?
> 
> 
> If nothing serious happens to the beta - it certainly has bugs, there
> are tons of unresolved reports in bugzilla, but if no new serious bug
> comes up - the final release is scheduled for July, 16.[1]

cool, guess I'll just att contrib: in front of it and remove it when I 
get that release.

Funny how we used Ant 1.5 for so long and then when I go to redesign the 
build system I just can't get away from these leading edge Ant features =).

> 
> Stefan
> 
> Footnotes: 
> [1]  <http://mail-archives.apache.org/eyebrowse/BrowseList?listName=dev@ant.apache.org&by=thread&from=812263>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

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


Re:

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 06 Jul 2004, Jeffrey Bacon <jb...@magmic.com> wrote:

> even though isset is not in the contrib namespace it will still find
> it when referenced as contrib:isset?

Well, it is in the namespace associated with the contrib prefix.

When Ant detects the possible nested elements of a class and finds
methods of the appropriate signatures for addXyz, createXyz or
addConfiguredXyz it will see them as elements named xyz in the same
namespace as the parent element.

The Ant-Contrib if task implementation inherits addIsset from Ant's
ConditionBase class, so Ant sees a nested element isset in the same
namespace that the if task belongs to.

> is there an ETA on Ant 1.6.2 release?

If nothing serious happens to the beta - it certainly has bugs, there
are tons of unresolved reports in bugzilla, but if no new serious bug
comes up - the final release is scheduled for July, 16.[1]

Stefan

Footnotes: 
[1]  <http://mail-archives.apache.org/eyebrowse/BrowseList?listName=dev@ant.apache.org&by=thread&from=812263>


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


Re:

Posted by Jeffrey Bacon <jb...@magmic.com>.
even though isset is not in the contrib namespace it will still find it 
when referenced as contrib:isset?  I'll try that tomorrow -- is there an 
ETA on Ant 1.6.2 release?
--
Jeffrey Bacon
jbacon@magmic.com
Creative Developer
http://www.magmic.com


Stefan Bodewig wrote:
> On Mon, 05 Jul 2004, Jeffrey Bacon <jb...@magmic.com> wrote:
> 
> 
>>Am I missing something stupid here?
> 
> 
> Yep, the way Ant deals with namespace for nested elements it detects
> by reflection.
> 
> I could explain the technical details if you want to, but to solve
> your problem either upgrade to 1.6.2beta (where we tried to make the
> handling less surprising) or use contrib:isset as element name.
> 
> Stefan
> 

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


Re:

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 05 Jul 2004, Jeffrey Bacon <jb...@magmic.com> wrote:

> Am I missing something stupid here?

Yep, the way Ant deals with namespace for nested elements it detects
by reflection.

I could explain the technical details if you want to, but to solve
your problem either upgrade to 1.6.2beta (where we tried to make the
handling less surprising) or use contrib:isset as element name.

Stefan

-- 
http://stefanbodewig.blogger.de/

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