You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ninju Bohra <ni...@yahoo.com> on 2005/01/18 17:41:17 UTC

Weird behavior with mixing antcall with input

Hey Guys (and gals),
 
I am having some trouble with trying to use antcall with input tasks.
 
See attached build file (called whats_up.xml).
 
The two targets that don't work (realwork1 and realwork2) both use helper targets that use <antcall> tasks to invoke the <input> tasks, while the third target (realwork3) seems to work okay and so that why it think it is related to my usage of <antcall> task and not the <input> task.
 
The first target (realwork1) asks for the import.user name but is unable to expand its value in the messge for the input password.
 
The second target (realwork2) asks for the import.user the first time, and asks for it again the second time (due to a intentional typo) even though it should not.
 
Any ideas as to why the <antcall> invoked input tasks do not seem to honor the property set by previous <antcall> tasks
 
Ninju


		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Find what you need with new enhanced search. Learn more.

Xerces problem with JDK 1.5 and Ant 1.6.2

Posted by ram <ra...@curvesoft.com>.
Hi,

I'm having a problem running a small test program that calls
DocumentBuilderFactor.newInstance() and prints out the name
of the actual factory class.

If I run it by invoking java (1.5) directly on the commandline,
it works fine and reports the factory as:

factory is: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

If I run it with ant (1.6.1 or 1.6.2), I get this error:

[java] javax.xml.parsers.FactoryConfigurationError: Provider
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl could not be instantiated

In both cases I'm adding nothing to the classpath beyond
the current directory (.).

Thanks for any help.

Ram

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


Re: Weird behavior with mixing antcall with input

Posted by Ninju Bohra <ni...@yahoo.com>.
Ooooops...
 
I had forgetten about the behavior, thanks for the reminder...
 
Ninju

Jeffrey E Care <ca...@us.ibm.com> wrote:
Properties set in the target run by do not get passed back to 
the calling target. I would suggest you investigate antcontrib's 
AntCallBack task: 
http://ant-contrib.sourceforge.net/tasks/antcallback_task.html

JEC
-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis


Ninju Bohra wrote on 01/18/2005 11:41:17 AM:

> Hey Guys (and gals),
> 
> I am having some trouble with trying to use antcall with input tasks.
> 
> See attached build file (called whats_up.xml).
> 
> The two targets that don't work (realwork1 and realwork2) both use 
> helper targets that use tasks to invoke the  [input]  tasks,
> while the third target (realwork3) seems to work okay and so that 
> why it think it is related to my usage of task and not the
>  [input]  task.
> 
> The first target (realwork1) asks for the import.user name but is 
> unable to expand its value in the messge for the input password.
> 
> The second target (realwork2) asks for the import.user the first 
> time, and asks for it again the second time (due to a intentional 
> typo) even though it should not.
> 
> Any ideas as to why the invoked input tasks do not seem to
> honor the property set by previous tasks
> 
> Ninju
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search. Learn more.
> 
> 
***********************************************************************************************************
> 
* Why are things not working
*

> 
************************************************************************************************************
> 
-->
> 

> 
> 
>  [input] > from:" addproperty="import.user">
> 
> 
>  [input] > account (${import.user}):" addproperty="import.password">
> 
> 
> 
>  [input] > from:" addproperty="export.user">
> 
> 
>  [input] > account (${bypass.user}):" addproperty="bypass.user">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  [input] > from:" addproperty="override.user">
>  [input] > account (${override.user}):" addproperty="override.password">
> > merely no-ops (yea!)" -->
>  [input] > account (${override.user}):" addproperty="override.password">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
		
---------------------------------
Do you Yahoo!?
 All your favorites on one personal page � Try My Yahoo!

Re: Weird behavior with mixing antcall with input

Posted by Jeffrey E Care <ca...@us.ibm.com>.
Properties set in the target run by <antcall> do not get passed back to 
the calling target. I would suggest you investigate antcontrib's 
AntCallBack task: 
http://ant-contrib.sourceforge.net/tasks/antcallback_task.html

JEC
-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis


Ninju Bohra <ni...@yahoo.com> wrote on 01/18/2005 11:41:17 AM:

> Hey Guys (and gals),
> 
> I am having some trouble with trying to use antcall with input tasks.
> 
> See attached build file (called whats_up.xml).
> 
> The two targets that don't work (realwork1 and realwork2) both use 
> helper targets that use <antcall> tasks to invoke the <input> tasks,
> while the third target (realwork3) seems to work okay and so that 
> why it think it is related to my usage of <antcall> task and not the
> <input> task.
> 
> The first target (realwork1) asks for the import.user name but is 
> unable to expand its value in the messge for the input password.
> 
> The second target (realwork2) asks for the import.user the first 
> time, and asks for it again the second time (due to a intentional 
> typo) even though it should not.
> 
> Any ideas as to why the <antcall> invoked input tasks do not seem to
> honor the property set by previous <antcall> tasks
> 
> Ninju
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search. Learn more.
> <!-- 

> 
***********************************************************************************************************
> 
* Why are things not working
*

> 
************************************************************************************************************
> 
-->
> <project name="Whats_up" basedir=".">
> 
>     <target name="get.import.user" unless="import.user">
>        <input message="Please enter username you wish to import 
> from:" addproperty="import.user" />
>     </target>
>     <target name="get.import.password">
>        <input message="Please enter the password for the import 
> account (${import.user}):" addproperty="import.password" />
>     </target>
> 
>     <target name="get.bypass.user">
>        <input message="Please enter username you wish to import 
> from:"   addproperty="export.user" />
>     </target>
>     <target name="get.bypass.password">
>        <input message="Please enter the password for the export 
> account (${bypass.user}):" addproperty="bypass.user" />
>     </target>
> 
>     <target name="get.import.info">
>        <antcall target="get.import.user"/>
>        <antcall target="get.import.password"/>
>     </target>
> 
>     <target name="get.bypass.info">
>        <antcall target="get.bypass.user"/>
>        <antcall target="get.bypass.password"/>
>     </target>
> 
>     <target name="works.fine">
>        <input message="Please enter username you wish to override 
> from:" addproperty="override.user" />
>        <input message="Please enter the password for the override 
> account (${override.user}):" addproperty="override.password" />
>        <!-- try to re-input an already set property and the task 
> merely no-ops (yea!)" -->
>        <input message="Please enter the password for the override 
> account (${override.user}):" addproperty="override.password" />
>     </target>
> 
> 
>     <target name="real_work1" depends="get.import.info">
>         <echo message="do real work1..."/>
>     </target>
> 
>     <target name="real_work2" depends="get.bypass.info">
>         <echo message="do real work 2..."/>
>     </target>
> 
>     <target name="real_work3" depends="works.fine">
>         <echo message="do real work 3..."/>
>     </target>
> 
> </project>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org