You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Shailesh Sharma <sh...@yahoo.com> on 2007/03/26 15:07:23 UTC

Problem with condition selection property; Help needed

Hi,
  I have a "for loop" in one target that iterates through few times and then call my actual deployment target".
   
  The problem is that when I accept "n" (i.e NO) as the first selection, the whole build just comes out of the loop and do not allow me to choose selection for the rest of the files in the "for loop".
   
  Please help.
   
  Exception:
   
  BUILD FAILED
file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62:  ******* You have choosen not to continue.  Build aborted by user. *******
   
   
  Following is snippet of my build.xml file ...
   
   
  <target name="call-first">
          <foreach list="${name.list}" delimiter="," target="call-second" param="sourceappname" inheritall="true">
        </foreach>
  </target>
   
  
<target name="call-second">
<propertycopy.....................>
   
  <input
      message="Aceepy either y or n to continue and then press enter"
    
    validargs="y,n"
    addproperty="user.selection"
  />
  
  <condition property="do.abort">
    <equals arg1="n" arg2="${user.selection}"/>
  </condition>
  
  <fail if="do.abort"> ******* You have choosen not to continue.  Build aborted by user. *******</fail>
      <java classname="weblogic.Deployer" fork="true" maxmemory="512m" failonerror="true">
    .
    .
    .
    .
    ..
    
    
</target>    
   

 
---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

RE: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
I think, iam going to live with this problem for the time being.
   
  :)
  

bill <bi...@wilandra.com> wrote:
  Sorry abut that last empty post.

You might want to look at AntForm, http://antforms.sourceforge.net/ . With
it you can show a UI window where the user can pick the component to deploy
by clicking check boxes. Each checkbox can set a different property that you
can test to see if you want to proceed.

HTH Bill

-----Original Message-----
From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
Sent: Tuesday, April 10, 2007 8:13 AM
To: Ant Users List
Subject: Re: Problem with condition selection property; Help needed

actually, the deployer is sometimes suggested to just deploy 1 or 2 or 3 or
etc. So, it circumstantial.



Kevin Jackson wrote:
Hi,

You are setting a property to a value (n | y) in your [input] task.
As soon as you set a property it keeps that value for the whole build as ant
properties are immutable.

It won't behave like you expect and each time reset to the value you choose,
it will just be the first value that you set.

I'm also not sure that using a loop is the best way to achieve your
requirements, isn't it easier to just deploy all of the ear files in an
output directory regardless of how many there are? Why do you need to loop
at all?

Kev

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




---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.



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



       
---------------------------------
The fish are biting.
 Get more visitors on your site using Yahoo! Search Marketing.

RE: Problem with condition selection property; Help needed

Posted by bill <bi...@wilandra.com>.
Sorry abut that last empty post.

You might want to look at AntForm, http://antforms.sourceforge.net/ . With
it you can show a UI window where the user can pick the component to deploy
by clicking check boxes. Each checkbox can set a different property that you
can test to see if you want to proceed.

HTH Bill

-----Original Message-----
From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
Sent: Tuesday, April 10, 2007 8:13 AM
To: Ant Users List
Subject: Re: Problem with condition selection property; Help needed

actually, the deployer is sometimes suggested to just deploy 1 or 2 or 3 or
etc. So, it circumstantial.
   
  

Kevin Jackson <fo...@gmail.com> wrote:
  Hi,

You are setting a property to a value (n | y) in your  [input]  task.
As soon as you set a property it keeps that value for the whole build as ant
properties are immutable.

It won't behave like you expect and each time reset to the value you choose,
it will just be the first value that you set.

I'm also not sure that using a loop is the best way to achieve your
requirements, isn't it easier to just deploy all of the ear files in an
output directory regardless of how many there are? Why do you need to loop
at all?

Kev

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



       
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.



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


RE: Problem with condition selection property; Help needed

Posted by bill <bi...@wilandra.com>.
 

-----Original Message-----
From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
Sent: Tuesday, April 10, 2007 8:13 AM
To: Ant Users List
Subject: Re: Problem with condition selection property; Help needed

actually, the deployer is sometimes suggested to just deploy 1 or 2 or 3 or
etc. So, it circumstantial.
   
  

Kevin Jackson <fo...@gmail.com> wrote:
  Hi,

You are setting a property to a value (n | y) in your  [input]  task.
As soon as you set a property it keeps that value for the whole build as ant
properties are immutable.

It won't behave like you expect and each time reset to the value you choose,
it will just be the first value that you set.

I'm also not sure that using a loop is the best way to achieve your
requirements, isn't it easier to just deploy all of the ear files in an
output directory regardless of how many there are? Why do you need to loop
at all?

Kev

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



       
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.



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


Re: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
actually, the deployer is sometimes suggested to just deploy 1 or 2 or 3 or etc. So, it circumstantial.
   
  

Kevin Jackson <fo...@gmail.com> wrote:
  Hi,

You are setting a property to a value (n | y) in your  [input]  task.
As soon as you set a property it keeps that value for the whole build
as ant properties are immutable.

It won't behave like you expect and each time reset to the value you
choose, it will just be the first value that you set.

I'm also not sure that using a loop is the best way to achieve your
requirements, isn't it easier to just deploy all of the ear files in
an output directory regardless of how many there are? Why do you need
to loop at all?

Kev

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



       
---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

Re: Problem with condition selection property; Help needed

Posted by Kevin Jackson <fo...@gmail.com>.
Hi,

You are setting a property to a value (n | y) in your <input> task.
As soon as you set a property it keeps that value for the whole build
as ant properties are immutable.

It won't behave like you expect and each time reset to the value you
choose, it will just be the first value that you set.

I'm also not sure that using a loop is the best way to achieve your
requirements, isn't it easier to just deploy all of the ear files in
an output directory regardless of how many there are?  Why do you need
to loop at all?

Kev

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


RE: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
I have figured out that this is happening because of fork=true  while deploying.
  I do not know the solution.
   
   
   
      <java classname="weblogic.Deployer" fork="true" maxmemory="256m" failonerror="true">
   
   
   
  

Shailesh Sharma <sh...@yahoo.com> wrote:
  Here is my build.xml































 [input]  validargs="y,n"
addproperty="user.selection"
/>



***** You have chosen not to deploy ${file}. *****


. 
.
.
.























Shailesh Sharma wrote:
I am still looking for a solution.

Iam using foreach task. and i loop through it and it ask Y/N as an input.

But if I select Y for the first input, for the second input, i have to press Y twice.

any solution so far on this?




Shailesh Sharma wrote:
I am using foreach task as you suggest previously with an example. it works except that when i select "Y" for my first selection of the file deployment, the next gives me an option to select "Y/N" ... BUT when select either Y/N ...it does not work. If i press enter again, it ask me to select Y/N for the second time ...and NOW it works (depending upon whatever i choose Y/N). So, the second selection for my files works after 2 times of acceptance.



"Anderson, Rob (Global Trade)" wrote:
Are you still having problems with this? You need to use the foreach
task, rather than the for task.

-Rob Anderson 

> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Monday, April 02, 2007 7:32 AM
> To: Ant Users List
> Subject: RE: Problem with condition selection property; Help needed
> 
> I am using following:
> 
> Apache Ant version 1.6.2 compiled on August 5 2004
> 
> 
> 
> Shailesh Sharma wrote:
> I am getting following errors now ...
> 
> 
> BUILD FAILED
> /export/bea/Mah-ail/AIL/AOCB/scripts/build.xml:174: The type 
> doesn't support the "keepgoing" attribute.
> 
> 
> 
> "Anderson, Rob (Global Trade)" wrote:
> OK. I think I understand what you are trying to do. I would 
> suggest using the task, rather than the task, because the 
> task has a keepgiong attribute.
> 
> Here is a solution that works for me.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> [input] validargs="y,n" addproperty="user.selection"/>
> 
> 
> 
> 
> ******* You have chosen not to deploy
> ${sourceappname.a}. *****
> Deploying ${sourceappname.a}
> 
> 
> 
> 
> -Rob Anderson
> 
> 
> 
> > -----Original Message-----
> > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > Sent: Thursday, March 29, 2007 7:54 AM
> > To: Ant Users List
> > Subject: RE: Problem with condition selection property; Help needed
> > 
> > Rob, Thanks for atleast writing something. I am still having that 
> > problem.
> > 
> > Actually this is the scenario:
> > 
> > I am using this build to deploy my application ear files. I 
> have 3 ear 
> > files in total. But it could sometimes be less or more than 3. So, 
> > this build is a generic script.
> > 
> > Basically, every time when i deploy my application ear file, this 
> > build ask me for a selection "Y/N" -- when i accept "Y" it 
> deploy that 
> > particular file, then it ask me for the next and so on so forth.
> > 
> > But when i accept "N" as a selection for the first ear 
> file, it just 
> > comes out as "build failed". I do not want that. I want to 
> move on to 
> > the next ear file for me to get selection "Y/N" again till 
> i ran out 
> > of my number of ear files IRRESPECTIVE of me selecting "N" for 
> > particular ear files( that i do not want to deploy momentarily).
> > 
> > Please advise and let me know how to change the logic.
> > 
> > 
> > "Anderson, Rob (Global Trade)" wrote:
> > Shailesh, When fail is executed, the build fails. What are you 
> > expecting to happen?
> > 
> > -Rob Anderson
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > > Sent: Monday, March 26, 2007 7:01 PM
> > > To: Ant Users List
> > > Subject: Re: Problem with condition selection property; 
> Help needed
> > > 
> > > I am still scratching my head on my problem. Any help is 
> much much 
> > > appreciated.
> > > 
> > > Best Regards.
> > > 
> > > 
> > > Shailesh Sharma wrote:
> > > Hi,
> > > I have a "for loop" in one target that iterates through few times 
> > > and then call my actual deployment target".
> > > 
> > > The problem is that when I accept "n" (i.e NO) as the first 
> > > selection, the whole build just comes out of the loop and do not 
> > > allow me to choose selection for the rest of the files in 
> the "for 
> > > loop".
> > > 
> > > Please help.
> > > 
> > > Exception:
> > > 
> > > BUILD FAILED
> > > file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > 
> > > Following is snippet of my build.xml file ...
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > [input] message="Aceepy either y or n to continue and then press 
> > > enter"
> > > 
> > > validargs="y,n"
> > > addproperty="user.selection"
> > > />
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > .
> > > .
> > > .
> > > .
> > > ..
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ---------------------------------
> > > Bored stiff? Loosen up...
> > > Download and play hundreds of games for free on Yahoo! Games.
> > > 
> > > 
> > > ---------------------------------
> > > Expecting? Get great news right away with email Auto-Check.
> > > Try the Yahoo! Mail Beta.
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Sucker-punch spam with award-winning protection.
> > Try the free Yahoo! Mail Beta.
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> ---------------------------------
> No need to miss a message. Get email on-the-go with Yahoo! 
> Mail for Mobile. Get started.
> 
> 
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> 


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




---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
Here is my build.xml
   
   
   
  <?xml version="1.0" encoding="iso-8859-1"?>
<project name="dev" default="all" basedir=".">
  <property file="./application.properties"/>
<property name="failonerror" value="true" />
  <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<taskdef  resource = "net/sf/antcontrib/antlib.xml"/>
  <target name="deploy-application-testnet-dr">
    <for list="${name.list}" param="sourceappname" keepgoing="true">
    <sequential>
      <antcall target="deploy-now-on-testnet-dr" inheritall="true">
        <param name="sourceappname" value="@{sourceappname}"/>
      </antcall>
    </sequential>
  </for>
  </target>
  <target name="deploy-now-on-testnet-dr">
        <propertycopy name="file" from="${sourceappname}.file" silent="true"/>
        <propertycopy name="name" from="${sourceappname}.name" silent="true"/>
        <propertycopy name="type" from="${sourceappname}.type" silent="true"/>
    <input message="Do you want to deploy ${name} to TESTNET-DR? "
    validargs="y,n"
    addproperty="user.selection"
  />
  <condition property="do.abort">
    <equals arg1="n" arg2="${user.selection}"/>
  </condition>
  <fail if="do.abort"> ***** You have chosen not to deploy ${file}. *****</fail>
    <!-- tasks to deploy the app -->
      <java classname="weblogic.Deployer" fork="true" maxmemory="256m" failonerror="true">
. 
.
.
.
  </java>
  </target>
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  

Shailesh Sharma <sh...@yahoo.com> wrote:
  I am still looking for a solution.

Iam using foreach task. and i loop through it and it ask Y/N as an input.

But if I select Y for the first input, for the second input, i have to press Y twice.

any solution so far on this?




Shailesh Sharma wrote:
I am using foreach task as you suggest previously with an example. it works except that when i select "Y" for my first selection of the file deployment, the next gives me an option to select "Y/N" ... BUT when select either Y/N ...it does not work. If i press enter again, it ask me to select Y/N for the second time ...and NOW it works (depending upon whatever i choose Y/N). So, the second selection for my files works after 2 times of acceptance.



"Anderson, Rob (Global Trade)" wrote:
Are you still having problems with this? You need to use the foreach
task, rather than the for task.

-Rob Anderson 

> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Monday, April 02, 2007 7:32 AM
> To: Ant Users List
> Subject: RE: Problem with condition selection property; Help needed
> 
> I am using following:
> 
> Apache Ant version 1.6.2 compiled on August 5 2004
> 
> 
> 
> Shailesh Sharma wrote:
> I am getting following errors now ...
> 
> 
> BUILD FAILED
> /export/bea/Mah-ail/AIL/AOCB/scripts/build.xml:174: The type 
> doesn't support the "keepgoing" attribute.
> 
> 
> 
> "Anderson, Rob (Global Trade)" wrote:
> OK. I think I understand what you are trying to do. I would 
> suggest using the task, rather than the task, because the 
> task has a keepgiong attribute.
> 
> Here is a solution that works for me.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> [input] validargs="y,n" addproperty="user.selection"/>
> 
> 
> 
> 
> ******* You have chosen not to deploy
> ${sourceappname.a}. *****
> Deploying ${sourceappname.a}
> 
> 
> 
> 
> -Rob Anderson
> 
> 
> 
> > -----Original Message-----
> > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > Sent: Thursday, March 29, 2007 7:54 AM
> > To: Ant Users List
> > Subject: RE: Problem with condition selection property; Help needed
> > 
> > Rob, Thanks for atleast writing something. I am still having that 
> > problem.
> > 
> > Actually this is the scenario:
> > 
> > I am using this build to deploy my application ear files. I 
> have 3 ear 
> > files in total. But it could sometimes be less or more than 3. So, 
> > this build is a generic script.
> > 
> > Basically, every time when i deploy my application ear file, this 
> > build ask me for a selection "Y/N" -- when i accept "Y" it 
> deploy that 
> > particular file, then it ask me for the next and so on so forth.
> > 
> > But when i accept "N" as a selection for the first ear 
> file, it just 
> > comes out as "build failed". I do not want that. I want to 
> move on to 
> > the next ear file for me to get selection "Y/N" again till 
> i ran out 
> > of my number of ear files IRRESPECTIVE of me selecting "N" for 
> > particular ear files( that i do not want to deploy momentarily).
> > 
> > Please advise and let me know how to change the logic.
> > 
> > 
> > "Anderson, Rob (Global Trade)" wrote:
> > Shailesh, When fail is executed, the build fails. What are you 
> > expecting to happen?
> > 
> > -Rob Anderson
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > > Sent: Monday, March 26, 2007 7:01 PM
> > > To: Ant Users List
> > > Subject: Re: Problem with condition selection property; 
> Help needed
> > > 
> > > I am still scratching my head on my problem. Any help is 
> much much 
> > > appreciated.
> > > 
> > > Best Regards.
> > > 
> > > 
> > > Shailesh Sharma wrote:
> > > Hi,
> > > I have a "for loop" in one target that iterates through few times 
> > > and then call my actual deployment target".
> > > 
> > > The problem is that when I accept "n" (i.e NO) as the first 
> > > selection, the whole build just comes out of the loop and do not 
> > > allow me to choose selection for the rest of the files in 
> the "for 
> > > loop".
> > > 
> > > Please help.
> > > 
> > > Exception:
> > > 
> > > BUILD FAILED
> > > file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > 
> > > Following is snippet of my build.xml file ...
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > [input] message="Aceepy either y or n to continue and then press 
> > > enter"
> > > 
> > > validargs="y,n"
> > > addproperty="user.selection"
> > > />
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > .
> > > .
> > > .
> > > .
> > > ..
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ---------------------------------
> > > Bored stiff? Loosen up...
> > > Download and play hundreds of games for free on Yahoo! Games.
> > > 
> > > 
> > > ---------------------------------
> > > Expecting? Get great news right away with email Auto-Check.
> > > Try the Yahoo! Mail Beta.
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Sucker-punch spam with award-winning protection.
> > Try the free Yahoo! Mail Beta.
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> ---------------------------------
> No need to miss a message. Get email on-the-go with Yahoo! 
> Mail for Mobile. Get started.
> 
> 
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> 


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




---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
I am still looking for a solution.
  
Iam using foreach task. and i loop through it and it ask Y/N as an input.
   
  But if I select Y for the first input, for the second input, i have to press Y twice.
   
  any solution so far on this?
   
   
   
  
Shailesh Sharma <sh...@yahoo.com> wrote:
  I am using foreach task as you suggest previously with an example. it works except that when i select "Y" for my first selection of the file deployment, the next gives me an option to select "Y/N" ... BUT when select either Y/N ...it does not work. If i press enter again, it ask me to select Y/N for the second time ...and NOW it works (depending upon whatever i choose Y/N). So, the second selection for my files works after 2 times of acceptance.



"Anderson, Rob (Global Trade)" wrote:
Are you still having problems with this? You need to use the foreach
task, rather than the for task.

-Rob Anderson 

> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Monday, April 02, 2007 7:32 AM
> To: Ant Users List
> Subject: RE: Problem with condition selection property; Help needed
> 
> I am using following:
> 
> Apache Ant version 1.6.2 compiled on August 5 2004
> 
> 
> 
> Shailesh Sharma wrote:
> I am getting following errors now ...
> 
> 
> BUILD FAILED
> /export/bea/Mah-ail/AIL/AOCB/scripts/build.xml:174: The type 
> doesn't support the "keepgoing" attribute.
> 
> 
> 
> "Anderson, Rob (Global Trade)" wrote:
> OK. I think I understand what you are trying to do. I would 
> suggest using the task, rather than the task, because the 
> task has a keepgiong attribute.
> 
> Here is a solution that works for me.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> [input] validargs="y,n" addproperty="user.selection"/>
> 
> 
> 
> 
> ******* You have chosen not to deploy
> ${sourceappname.a}. *****
> Deploying ${sourceappname.a}
> 
> 
> 
> 
> -Rob Anderson
> 
> 
> 
> > -----Original Message-----
> > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > Sent: Thursday, March 29, 2007 7:54 AM
> > To: Ant Users List
> > Subject: RE: Problem with condition selection property; Help needed
> > 
> > Rob, Thanks for atleast writing something. I am still having that 
> > problem.
> > 
> > Actually this is the scenario:
> > 
> > I am using this build to deploy my application ear files. I 
> have 3 ear 
> > files in total. But it could sometimes be less or more than 3. So, 
> > this build is a generic script.
> > 
> > Basically, every time when i deploy my application ear file, this 
> > build ask me for a selection "Y/N" -- when i accept "Y" it 
> deploy that 
> > particular file, then it ask me for the next and so on so forth.
> > 
> > But when i accept "N" as a selection for the first ear 
> file, it just 
> > comes out as "build failed". I do not want that. I want to 
> move on to 
> > the next ear file for me to get selection "Y/N" again till 
> i ran out 
> > of my number of ear files IRRESPECTIVE of me selecting "N" for 
> > particular ear files( that i do not want to deploy momentarily).
> > 
> > Please advise and let me know how to change the logic.
> > 
> > 
> > "Anderson, Rob (Global Trade)" wrote:
> > Shailesh, When fail is executed, the build fails. What are you 
> > expecting to happen?
> > 
> > -Rob Anderson
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > > Sent: Monday, March 26, 2007 7:01 PM
> > > To: Ant Users List
> > > Subject: Re: Problem with condition selection property; 
> Help needed
> > > 
> > > I am still scratching my head on my problem. Any help is 
> much much 
> > > appreciated.
> > > 
> > > Best Regards.
> > > 
> > > 
> > > Shailesh Sharma wrote:
> > > Hi,
> > > I have a "for loop" in one target that iterates through few times 
> > > and then call my actual deployment target".
> > > 
> > > The problem is that when I accept "n" (i.e NO) as the first 
> > > selection, the whole build just comes out of the loop and do not 
> > > allow me to choose selection for the rest of the files in 
> the "for 
> > > loop".
> > > 
> > > Please help.
> > > 
> > > Exception:
> > > 
> > > BUILD FAILED
> > > file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > 
> > > Following is snippet of my build.xml file ...
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > [input] message="Aceepy either y or n to continue and then press 
> > > enter"
> > > 
> > > validargs="y,n"
> > > addproperty="user.selection"
> > > />
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > .
> > > .
> > > .
> > > .
> > > ..
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ---------------------------------
> > > Bored stiff? Loosen up...
> > > Download and play hundreds of games for free on Yahoo! Games.
> > > 
> > > 
> > > ---------------------------------
> > > Expecting? Get great news right away with email Auto-Check.
> > > Try the Yahoo! Mail Beta.
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Sucker-punch spam with award-winning protection.
> > Try the free Yahoo! Mail Beta.
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> ---------------------------------
> No need to miss a message. Get email on-the-go with Yahoo! 
> Mail for Mobile. Get started.
> 
> 
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> 


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




---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
I am using foreach task as you suggest previously with an example. it works except that when i select "Y" for my first selection of the file deployment, the next gives me an option to select "Y/N" ... BUT when select either Y/N ...it does not work. If i press enter again, it ask me to select Y/N for the second time ...and NOW it works (depending upon whatever i choose Y/N).  So, the second selection for my files works after 2 times of acceptance.
   
  

"Anderson, Rob (Global Trade)" <Ro...@nike.com> wrote:
  Are you still having problems with this? You need to use the foreach
task, rather than the for task.

-Rob Anderson 

> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Monday, April 02, 2007 7:32 AM
> To: Ant Users List
> Subject: RE: Problem with condition selection property; Help needed
> 
> I am using following:
> 
> Apache Ant version 1.6.2 compiled on August 5 2004
> 
> 
> 
> Shailesh Sharma wrote:
> I am getting following errors now ...
> 
> 
> BUILD FAILED
> /export/bea/Mah-ail/AIL/AOCB/scripts/build.xml:174: The type 
> doesn't support the "keepgoing" attribute.
> 
> 
> 
> "Anderson, Rob (Global Trade)" wrote:
> OK. I think I understand what you are trying to do. I would 
> suggest using the task, rather than the task, because the 
> task has a keepgiong attribute.
> 
> Here is a solution that works for me.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> [input] validargs="y,n" addproperty="user.selection"/>
> 
> 
> 
> 
> ******* You have chosen not to deploy
> ${sourceappname.a}. *****
> Deploying ${sourceappname.a}
> 
> 
> 
> 
> -Rob Anderson
> 
> 
> 
> > -----Original Message-----
> > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > Sent: Thursday, March 29, 2007 7:54 AM
> > To: Ant Users List
> > Subject: RE: Problem with condition selection property; Help needed
> > 
> > Rob, Thanks for atleast writing something. I am still having that 
> > problem.
> > 
> > Actually this is the scenario:
> > 
> > I am using this build to deploy my application ear files. I 
> have 3 ear 
> > files in total. But it could sometimes be less or more than 3. So, 
> > this build is a generic script.
> > 
> > Basically, every time when i deploy my application ear file, this 
> > build ask me for a selection "Y/N" -- when i accept "Y" it 
> deploy that 
> > particular file, then it ask me for the next and so on so forth.
> > 
> > But when i accept "N" as a selection for the first ear 
> file, it just 
> > comes out as "build failed". I do not want that. I want to 
> move on to 
> > the next ear file for me to get selection "Y/N" again till 
> i ran out 
> > of my number of ear files IRRESPECTIVE of me selecting "N" for 
> > particular ear files( that i do not want to deploy momentarily).
> > 
> > Please advise and let me know how to change the logic.
> > 
> > 
> > "Anderson, Rob (Global Trade)" wrote:
> > Shailesh, When fail is executed, the build fails. What are you 
> > expecting to happen?
> > 
> > -Rob Anderson
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > > Sent: Monday, March 26, 2007 7:01 PM
> > > To: Ant Users List
> > > Subject: Re: Problem with condition selection property; 
> Help needed
> > > 
> > > I am still scratching my head on my problem. Any help is 
> much much 
> > > appreciated.
> > > 
> > > Best Regards.
> > > 
> > > 
> > > Shailesh Sharma wrote:
> > > Hi,
> > > I have a "for loop" in one target that iterates through few times 
> > > and then call my actual deployment target".
> > > 
> > > The problem is that when I accept "n" (i.e NO) as the first 
> > > selection, the whole build just comes out of the loop and do not 
> > > allow me to choose selection for the rest of the files in 
> the "for 
> > > loop".
> > > 
> > > Please help.
> > > 
> > > Exception:
> > > 
> > > BUILD FAILED
> > > file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > 
> > > Following is snippet of my build.xml file ...
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > [input] message="Aceepy either y or n to continue and then press 
> > > enter"
> > > 
> > > validargs="y,n"
> > > addproperty="user.selection"
> > > />
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > .
> > > .
> > > .
> > > .
> > > ..
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ---------------------------------
> > > Bored stiff? Loosen up...
> > > Download and play hundreds of games for free on Yahoo! Games.
> > > 
> > > 
> > > ---------------------------------
> > > Expecting? Get great news right away with email Auto-Check.
> > > Try the Yahoo! Mail Beta.
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Sucker-punch spam with award-winning protection.
> > Try the free Yahoo! Mail Beta.
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> ---------------------------------
> No need to miss a message. Get email on-the-go with Yahoo! 
> Mail for Mobile. Get started.
> 
> 
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> 


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



 
---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

RE: Problem with condition selection property; Help needed

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
Are you still having problems with this? You need to use the foreach
task, rather than the for task.

-Rob Anderson 

> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Monday, April 02, 2007 7:32 AM
> To: Ant Users List
> Subject: RE: Problem with condition selection property; Help needed
> 
> I am using following:
>    
>   Apache Ant version 1.6.2 compiled on August 5 2004
>    
>   
> 
> Shailesh Sharma <sh...@yahoo.com> wrote:
>   I am getting following errors now ...
> 
> 
> BUILD FAILED
> /export/bea/Mah-ail/AIL/AOCB/scripts/build.xml:174: The type 
> doesn't support the "keepgoing" attribute.
> 
> 
> 
> "Anderson, Rob (Global Trade)" wrote:
> OK. I think I understand what you are trying to do. I would 
> suggest using the task, rather than the task, because the 
> task has a keepgiong attribute.
> 
> Here is a solution that works for me.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> [input] validargs="y,n" addproperty="user.selection"/>
> 
> 
> 
> 
> ******* You have chosen not to deploy
> ${sourceappname.a}. *****
> Deploying ${sourceappname.a}
> 
> 
> 
> 
> -Rob Anderson
> 
> 
> 
> > -----Original Message-----
> > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > Sent: Thursday, March 29, 2007 7:54 AM
> > To: Ant Users List
> > Subject: RE: Problem with condition selection property; Help needed
> > 
> > Rob, Thanks for atleast writing something. I am still having that 
> > problem.
> > 
> > Actually this is the scenario:
> > 
> > I am using this build to deploy my application ear files. I 
> have 3 ear 
> > files in total. But it could sometimes be less or more than 3. So, 
> > this build is a generic script.
> > 
> > Basically, every time when i deploy my application ear file, this 
> > build ask me for a selection "Y/N" -- when i accept "Y" it 
> deploy that 
> > particular file, then it ask me for the next and so on so forth.
> > 
> > But when i accept "N" as a selection for the first ear 
> file, it just 
> > comes out as "build failed". I do not want that. I want to 
> move on to 
> > the next ear file for me to get selection "Y/N" again till 
> i ran out 
> > of my number of ear files IRRESPECTIVE of me selecting "N" for 
> > particular ear files( that i do not want to deploy momentarily).
> > 
> > Please advise and let me know how to change the logic.
> > 
> > 
> > "Anderson, Rob (Global Trade)" wrote:
> > Shailesh, When fail is executed, the build fails. What are you 
> > expecting to happen?
> > 
> > -Rob Anderson
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com]
> > > Sent: Monday, March 26, 2007 7:01 PM
> > > To: Ant Users List
> > > Subject: Re: Problem with condition selection property; 
> Help needed
> > > 
> > > I am still scratching my head on my problem. Any help is 
> much much 
> > > appreciated.
> > > 
> > > Best Regards.
> > > 
> > > 
> > > Shailesh Sharma wrote:
> > > Hi,
> > > I have a "for loop" in one target that iterates through few times 
> > > and then call my actual deployment target".
> > > 
> > > The problem is that when I accept "n" (i.e NO) as the first 
> > > selection, the whole build just comes out of the loop and do not 
> > > allow me to choose selection for the rest of the files in 
> the "for 
> > > loop".
> > > 
> > > Please help.
> > > 
> > > Exception:
> > > 
> > > BUILD FAILED
> > > file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > 
> > > Following is snippet of my build.xml file ...
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > [input] message="Aceepy either y or n to continue and then press 
> > > enter"
> > > 
> > > validargs="y,n"
> > > addproperty="user.selection"
> > > />
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ******* You have choosen not to continue. Build aborted by user. 
> > > *******
> > > 
> > > .
> > > .
> > > .
> > > .
> > > ..
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > ---------------------------------
> > > Bored stiff? Loosen up...
> > > Download and play hundreds of games for free on Yahoo! Games.
> > > 
> > > 
> > > ---------------------------------
> > > Expecting? Get great news right away with email Auto-Check.
> > > Try the Yahoo! Mail Beta.
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Sucker-punch spam with award-winning protection.
> > Try the free Yahoo! Mail Beta.
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> ---------------------------------
> No need to miss a message. Get email on-the-go with Yahoo! 
> Mail for Mobile. Get started.
> 
>  
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> 


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


RE: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
I am using following:
   
  Apache Ant version 1.6.2 compiled on August 5 2004
   
  

Shailesh Sharma <sh...@yahoo.com> wrote:
  I am getting following errors now ...


BUILD FAILED
/export/bea/Mah-ail/AIL/AOCB/scripts/build.xml:174: The type doesn't support the "keepgoing" attribute.



"Anderson, Rob (Global Trade)" wrote:
OK. I think I understand what you are trying to do. I would suggest
using the task, rather than the task, because the 
task has a keepgiong attribute.

Here is a solution that works for me.













[input] validargs="y,n" addproperty="user.selection"/>




******* You have chosen not to deploy
${sourceappname.a}. *****
Deploying ${sourceappname.a}




-Rob Anderson



> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Thursday, March 29, 2007 7:54 AM
> To: Ant Users List
> Subject: RE: Problem with condition selection property; Help needed
> 
> Rob, Thanks for atleast writing something. I am still having 
> that problem.
> 
> Actually this is the scenario:
> 
> I am using this build to deploy my application ear files. I 
> have 3 ear files in total. But it could sometimes be less or 
> more than 3. So, this build is a generic script.
> 
> Basically, every time when i deploy my application ear 
> file, this build ask me for a selection "Y/N" -- when i 
> accept "Y" it deploy that particular file, then it ask me for 
> the next and so on so forth.
> 
> But when i accept "N" as a selection for the first ear 
> file, it just comes out as "build failed". I do not want 
> that. I want to move on to the next ear file for me to get 
> selection "Y/N" again till i ran out of my number of ear 
> files IRRESPECTIVE of me selecting "N" for particular ear 
> files( that i do not want to deploy momentarily).
> 
> Please advise and let me know how to change the logic.
> 
> 
> "Anderson, Rob (Global Trade)" wrote:
> Shailesh, When fail is executed, the build fails. What are 
> you expecting
> to happen?
> 
> -Rob Anderson
> 
> 
> 
> > -----Original Message-----
> > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> > Sent: Monday, March 26, 2007 7:01 PM
> > To: Ant Users List
> > Subject: Re: Problem with condition selection property; Help needed
> > 
> > I am still scratching my head on my problem. Any help is 
> > much much appreciated.
> > 
> > Best Regards.
> > 
> > 
> > Shailesh Sharma wrote:
> > Hi,
> > I have a "for loop" in one target that iterates through few 
> > times and then call my actual deployment target".
> > 
> > The problem is that when I accept "n" (i.e NO) as the first 
> > selection, the whole build just comes out of the loop and do 
> > not allow me to choose selection for the rest of the files in 
> > the "for loop".
> > 
> > Please help.
> > 
> > Exception:
> > 
> > BUILD FAILED
> > file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> > ******* You have choosen not to continue. Build aborted by 
> > user. *******
> > 
> > 
> > Following is snippet of my build.xml file ...
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > [input] message="Aceepy either y or n to continue and then 
> > press enter"
> > 
> > validargs="y,n"
> > addproperty="user.selection"
> > />
> > 
> > 
> > 
> > 
> > 
> > ******* You have choosen not to continue. Build aborted by 
> > user. *******
> > 
> > .
> > .
> > .
> > .
> > ..
> > 
> > 
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Bored stiff? Loosen up...
> > Download and play hundreds of games for free on Yahoo! Games.
> > 
> > 
> > ---------------------------------
> > Expecting? Get great news right away with email Auto-Check.
> > Try the Yahoo! Mail Beta.
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> ---------------------------------
> Sucker-punch spam with award-winning protection.
> Try the free Yahoo! Mail Beta.
> 


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




---------------------------------
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.

 
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.

RE: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
I am getting following errors now ...
   
   
  BUILD FAILED
/export/bea/Mah-ail/AIL/AOCB/scripts/build.xml:174: The <for> type doesn't support the "keepgoing" attribute.
  
 
  
"Anderson, Rob (Global Trade)" <Ro...@nike.com> wrote:
  OK. I think I understand what you are trying to do. I would suggest
using the task, rather than the task, because the 
task has a keepgiong attribute.

Here is a solution that works for me.













 [input] validargs="y,n" addproperty="user.selection"/>




******* You have chosen not to deploy
${sourceappname.a}. *****
Deploying ${sourceappname.a}




-Rob Anderson



> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Thursday, March 29, 2007 7:54 AM
> To: Ant Users List
> Subject: RE: Problem with condition selection property; Help needed
> 
> Rob, Thanks for atleast writing something. I am still having 
> that problem.
> 
> Actually this is the scenario:
> 
> I am using this build to deploy my application ear files. I 
> have 3 ear files in total. But it could sometimes be less or 
> more than 3. So, this build is a generic script.
> 
> Basically, every time when i deploy my application ear 
> file, this build ask me for a selection "Y/N" -- when i 
> accept "Y" it deploy that particular file, then it ask me for 
> the next and so on so forth.
> 
> But when i accept "N" as a selection for the first ear 
> file, it just comes out as "build failed". I do not want 
> that. I want to move on to the next ear file for me to get 
> selection "Y/N" again till i ran out of my number of ear 
> files IRRESPECTIVE of me selecting "N" for particular ear 
> files( that i do not want to deploy momentarily).
> 
> Please advise and let me know how to change the logic.
> 
> 
> "Anderson, Rob (Global Trade)" wrote:
> Shailesh, When fail is executed, the build fails. What are 
> you expecting
> to happen?
> 
> -Rob Anderson
> 
> 
> 
> > -----Original Message-----
> > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> > Sent: Monday, March 26, 2007 7:01 PM
> > To: Ant Users List
> > Subject: Re: Problem with condition selection property; Help needed
> > 
> > I am still scratching my head on my problem. Any help is 
> > much much appreciated.
> > 
> > Best Regards.
> > 
> > 
> > Shailesh Sharma wrote:
> > Hi,
> > I have a "for loop" in one target that iterates through few 
> > times and then call my actual deployment target".
> > 
> > The problem is that when I accept "n" (i.e NO) as the first 
> > selection, the whole build just comes out of the loop and do 
> > not allow me to choose selection for the rest of the files in 
> > the "for loop".
> > 
> > Please help.
> > 
> > Exception:
> > 
> > BUILD FAILED
> > file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> > ******* You have choosen not to continue. Build aborted by 
> > user. *******
> > 
> > 
> > Following is snippet of my build.xml file ...
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > [input] message="Aceepy either y or n to continue and then 
> > press enter"
> > 
> > validargs="y,n"
> > addproperty="user.selection"
> > />
> > 
> > 
> > 
> > 
> > 
> > ******* You have choosen not to continue. Build aborted by 
> > user. *******
> > 
> > .
> > .
> > .
> > .
> > ..
> > 
> > 
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Bored stiff? Loosen up...
> > Download and play hundreds of games for free on Yahoo! Games.
> > 
> > 
> > ---------------------------------
> > Expecting? Get great news right away with email Auto-Check.
> > Try the Yahoo! Mail Beta.
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> ---------------------------------
> Sucker-punch spam with award-winning protection.
> Try the free Yahoo! Mail Beta.
> 


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



 
---------------------------------
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.

RE: Problem with condition selection property; Help needed

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
OK. I think I understand what you are trying to do. I would suggest
using the <for> task, rather than the <foreach> task, because the <for>
task has a keepgiong attribute.

Here is a solution that works for me.

<target name="looptest">
  <for list="${name.list}" param="sourceappname" keepgoing="true">
    <sequential>
      <antcall target="call-second" inheritall="true">
        <param name="sourceappname.a" value="@{sourceappname}"/>
      </antcall>
    </sequential>
  </for>
</target>

<target name="call-second">
  <input message="Do you want to deploy ${sourceappname.a}?"
validargs="y,n" addproperty="user.selection"/>
  <condition property="do.abort">
    <equals arg1="n" arg2="${user.selection}"/>
  </condition>

  <fail if="do.abort"> ******* You have chosen not to deploy
${sourceappname.a}. *****</fail>
  <echo>Deploying ${sourceappname.a}</echo>
  <!-- tasks to deploy the app -->
</target>


-Rob Anderson

 

> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Thursday, March 29, 2007 7:54 AM
> To: Ant Users List
> Subject: RE: Problem with condition selection property; Help needed
> 
> Rob, Thanks for atleast writing something. I am still having 
> that problem.
>    
>   Actually this is the scenario:
>    
>   I am using this build to deploy my application ear files. I 
> have 3 ear files in total. But it could sometimes be less or 
> more than 3. So, this build is a generic script.
>    
>   Basically,  every time when i deploy my application ear 
> file, this build ask me for a selection "Y/N" -- when i 
> accept "Y" it deploy that particular file, then it ask me for 
> the next and so on so forth.
>    
>   But when i accept "N" as a selection for the first ear 
> file, it just comes out as "build failed". I do not want 
> that. I want to move on to the next ear file for me to get 
> selection "Y/N" again till i ran out of my number of ear 
> files IRRESPECTIVE of me selecting "N" for particular ear 
> files( that i do not want to deploy momentarily).
>    
>   Please advise and let me know how to change the logic.
>   
> 
> "Anderson, Rob (Global Trade)" <Ro...@nike.com> wrote:
>   Shailesh, When fail is executed, the build fails. What are 
> you expecting
> to happen?
> 
> -Rob Anderson
> 
> 
> 
> > -----Original Message-----
> > From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> > Sent: Monday, March 26, 2007 7:01 PM
> > To: Ant Users List
> > Subject: Re: Problem with condition selection property; Help needed
> > 
> > I am still scratching my head on my problem. Any help is 
> > much much appreciated.
> > 
> > Best Regards.
> > 
> > 
> > Shailesh Sharma wrote:
> > Hi,
> > I have a "for loop" in one target that iterates through few 
> > times and then call my actual deployment target".
> > 
> > The problem is that when I accept "n" (i.e NO) as the first 
> > selection, the whole build just comes out of the loop and do 
> > not allow me to choose selection for the rest of the files in 
> > the "for loop".
> > 
> > Please help.
> > 
> > Exception:
> > 
> > BUILD FAILED
> > file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> > ******* You have choosen not to continue. Build aborted by 
> > user. *******
> > 
> > 
> > Following is snippet of my build.xml file ...
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > [input] message="Aceepy either y or n to continue and then 
> > press enter"
> > 
> > validargs="y,n"
> > addproperty="user.selection"
> > />
> > 
> > 
> > 
> > 
> > 
> > ******* You have choosen not to continue. Build aborted by 
> > user. *******
> > 
> > .
> > .
> > .
> > .
> > ..
> > 
> > 
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Bored stiff? Loosen up...
> > Download and play hundreds of games for free on Yahoo! Games.
> > 
> > 
> > ---------------------------------
> > Expecting? Get great news right away with email Auto-Check.
> > Try the Yahoo! Mail Beta.
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
>  
> ---------------------------------
> Sucker-punch spam with award-winning protection.
>  Try the free Yahoo! Mail Beta.
> 


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


RE: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
Rob, Thanks for atleast writing something. I am still having that problem.
   
  Actually this is the scenario:
   
  I am using this build to deploy my application ear files. I have 3 ear files in total. But it could sometimes be less or more than 3. So, this build is a generic script.
   
  Basically,  every time when i deploy my application ear file, this build ask me for a selection "Y/N" -- when i accept "Y" it deploy that particular file, then it ask me for the next and so on so forth.
   
  But when i accept "N" as a selection for the first ear file, it just comes out as "build failed". I do not want that. I want to move on to the next ear file for me to get selection "Y/N" again till i ran out of my number of ear files IRRESPECTIVE of me selecting "N" for particular ear files( that i do not want to deploy momentarily).
   
  Please advise and let me know how to change the logic.
  

"Anderson, Rob (Global Trade)" <Ro...@nike.com> wrote:
  Shailesh, When fail is executed, the build fails. What are you expecting
to happen?

-Rob Anderson



> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Monday, March 26, 2007 7:01 PM
> To: Ant Users List
> Subject: Re: Problem with condition selection property; Help needed
> 
> I am still scratching my head on my problem. Any help is 
> much much appreciated.
> 
> Best Regards.
> 
> 
> Shailesh Sharma wrote:
> Hi,
> I have a "for loop" in one target that iterates through few 
> times and then call my actual deployment target".
> 
> The problem is that when I accept "n" (i.e NO) as the first 
> selection, the whole build just comes out of the loop and do 
> not allow me to choose selection for the rest of the files in 
> the "for loop".
> 
> Please help.
> 
> Exception:
> 
> BUILD FAILED
> file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> ******* You have choosen not to continue. Build aborted by 
> user. *******
> 
> 
> Following is snippet of my build.xml file ...
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> [input] message="Aceepy either y or n to continue and then 
> press enter"
> 
> validargs="y,n"
> addproperty="user.selection"
> />
> 
> 
> 
> 
> 
> ******* You have choosen not to continue. Build aborted by 
> user. *******
> 
> .
> .
> .
> .
> ..
> 
> 
> 
> 
> 
> 
> ---------------------------------
> Bored stiff? Loosen up...
> Download and play hundreds of games for free on Yahoo! Games.
> 
> 
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> 


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



 
---------------------------------
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.

RE: Problem with condition selection property; Help needed

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
Shailesh, When fail is executed, the build fails. What are you expecting
to happen?

-Rob Anderson



> -----Original Message-----
> From: Shailesh Sharma [mailto:shailesh_scea@yahoo.com] 
> Sent: Monday, March 26, 2007 7:01 PM
> To: Ant Users List
> Subject: Re: Problem with condition selection property; Help needed
> 
> I am still scratching my head on my problem.  Any help is 
> much much appreciated.
>    
>   Best Regards.
>   
> 
> Shailesh Sharma <sh...@yahoo.com> wrote:
>   Hi,
> I have a "for loop" in one target that iterates through few 
> times and then call my actual deployment target".
> 
> The problem is that when I accept "n" (i.e NO) as the first 
> selection, the whole build just comes out of the loop and do 
> not allow me to choose selection for the rest of the files in 
> the "for loop".
> 
> Please help.
> 
> Exception:
> 
> BUILD FAILED
> file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: 
> ******* You have choosen not to continue. Build aborted by 
> user. *******
> 
> 
> Following is snippet of my build.xml file ...
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  [input] message="Aceepy either y or n to continue and then 
> press enter"
> 
> validargs="y,n"
> addproperty="user.selection"
> />
> 
> 
> 
> 
> 
> ******* You have choosen not to continue. Build aborted by 
> user. *******
> 
> .
> .
> .
> .
> ..
> 
> 
> 
> 
> 
> 
> ---------------------------------
> Bored stiff? Loosen up...
> Download and play hundreds of games for free on Yahoo! Games.
> 
>  
> ---------------------------------
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> 


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


Re: Problem with condition selection property; Help needed

Posted by Shailesh Sharma <sh...@yahoo.com>.
I am still scratching my head on my problem.  Any help is much much appreciated.
   
  Best Regards.
  

Shailesh Sharma <sh...@yahoo.com> wrote:
  Hi,
I have a "for loop" in one target that iterates through few times and then call my actual deployment target".

The problem is that when I accept "n" (i.e NO) as the first selection, the whole build just comes out of the loop and do not allow me to choose selection for the rest of the files in the "for loop".

Please help.

Exception:

BUILD FAILED
file:/export/bea/Win-splus/SPLUS/QPS/scripts/build.xml:62: ******* You have choosen not to continue. Build aborted by user. *******


Following is snippet of my build.xml file ...












 [input] message="Aceepy either y or n to continue and then press enter"

validargs="y,n"
addproperty="user.selection"
/>





******* You have choosen not to continue. Build aborted by user. *******

.
.
.
.
..






---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

 
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.