You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by fabien_pichard <fa...@hotmail.com> on 2007/11/08 00:07:20 UTC

cannot mkdir in a target

Hello!
I am new to ant, have search back and forth why this code does not work.
<project description="test build">
 <target name="foo">
    <mkdir dir="foo1"/>
 </target>
</project> 

If I do this
<project description="test build">
    <mkdir dir="foo1"/>
</project> 

it works, no problem... 
I have checked misc FAQ, this site and other and I wondering what I am doing
wrong.

-- fabien
-- 
View this message in context: http://www.nabble.com/cannot-mkdir-in-a-target-tf4768002.html#a13638140
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: cannot mkdir in a target

Posted by fabien_pichard <fa...@hotmail.com>.
Merci Dominique!

I feel like a fool... :)

- fabien


Dominique Devienne-2 wrote:
> 
> On 11/7/07, fabien_pichard <fa...@hotmail.com> wrote:
>> <project description="test build">
>>  <target name="foo">
>>     <mkdir dir="foo1"/>
>>  </target>
>> </project>
>>
>> If I do this
>> <project description="test build">
>>     <mkdir dir="foo1"/>
>> </project>
>>
>> it works, no problem...
>> I have checked misc FAQ, this site and other and I wondering what I am
>> doing
>> wrong.
> 
> Well, how do you call Ant on the command line?
> 
> All tasks not in a target are always executed, but the ones in targets
> are executed only if their target is executed, and since you didn't
> specify the project's default target, if you don't explicitly specify
> the target name "foo" as argument to the build, it will not be
> executed by default.
> 
> Just running "ant foo" should fix your problem. I don't see how else
> this build could not work ;-) --DD
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/cannot-mkdir-in-a-target-tf4768002.html#a13638453
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: cannot mkdir in a target

Posted by Dominique Devienne <dd...@gmail.com>.
On 11/7/07, fabien_pichard <fa...@hotmail.com> wrote:
> <project description="test build">
>  <target name="foo">
>     <mkdir dir="foo1"/>
>  </target>
> </project>
>
> If I do this
> <project description="test build">
>     <mkdir dir="foo1"/>
> </project>
>
> it works, no problem...
> I have checked misc FAQ, this site and other and I wondering what I am doing
> wrong.

Well, how do you call Ant on the command line?

All tasks not in a target are always executed, but the ones in targets
are executed only if their target is executed, and since you didn't
specify the project's default target, if you don't explicitly specify
the target name "foo" as argument to the build, it will not be
executed by default.

Just running "ant foo" should fix your problem. I don't see how else
this build could not work ;-) --DD

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