You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Karunakar Chatla <ka...@cybage.com> on 2005/08/17 13:23:27 UTC

FW : Error while executing exec task

Now I have modified the build file like following :
<project name="DotNet">
    <target name="Build .Net Projects" >
  <exec executable="devenv" output="E:/output.log">
   <arg line="E:/DARTmail/DARTmail/ui/lgUI/lgui.sln /REBUILD Release" />
  </exec>
 </target>
</project>

Now the devenv is returning 1 and it says that build is successful.
But now also I am not getting anything in output file (i.e E:/output.log).
What might be the problem?


----- Original Message ----- 
From: "Karunakar Chatla" <ka...@cybage.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Wednesday, August 17, 2005 4:21 PM
Subject: Error while executing exec task



Hi,

I have encountered a problem... I don't know whether to call it strange or I
am doing it wrong.

I have to compile a .Net project through exec task.

Following is my build file :

<project name="DotNet">
    <description>
        Script to build all the .Net Components
    </description>
    <property name="win.view.path" value="E:/DARTmail" />
    <property name="build.options" value="/REBUILD" />
    <target name="Build .Net Projects" >
       <echo message="Building .Net components" />
       <echo message="Setting environment" />

       <!-- 
          <exec executable="C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\vsvars32.bat" os="Windows 2000" output="e:/out.txt"
            failonerror="false" />
       -->

       <!-- Build sslgui project -->
      <exec executable='"C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE\devenv"' os="Windows 2000" output="E:/BuildDotNet.log"
failonerror="true" >
        <arg line='${win.view.path}/DARTmail/ui/lgUI/lgui.sln
${build.options} Release' />
      </exec>
 </target>
</project>

This is giving following error :
      BUILD FAILED
      Ant Error Message: E:\BuildAutomation\Phase
II\RAndD\Cruise\build-components.xml:14: The following error occurred while
executing this line: E:\BuildAutomation\Phase II\RAndD\Cruise\checkout\DotNe
t\build.xml:17: exec returned: 1


I have tried in following ways :
1) Uncommented the first exec task to set the environment before calling
devenv. Given only the executable name (i.e devenv) in second exec task.
2) Thought the problem might be because of the spaces in the path, so
deliberately put the path inside the quotes.
3) Given absolute path for all.

In all the cases it is failing with the above error message. The irritating
thing was that "E:/BuildDotNet.log" file created is of 0 KB. no log is
written to this file.
I don't know why this is happening.

Can anybody help me out?


Thanks,
Karunakar Chatla



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


RE: FW : Error while executing exec task

Posted by Dominique Devienne <dd...@gmail.com>.
1 is not a successful error code. Probably means devenv is not in your Path.
I always add failonerror="true" to <exec>. Then you'll see that it fails.

Fix up your Path to have devenv found correctly. --DD

> -----Original Message-----
> From: Karunakar Chatla [mailto:karunakarc@cybage.com]
> Sent: Wednesday, August 17, 2005 6:23 AM
> To: Ant Users List
> Subject: FW : Error while executing exec task
> 
> Now I have modified the build file like following :
> <project name="DotNet">
>     <target name="Build .Net Projects" >
>   <exec executable="devenv" output="E:/output.log">
>    <arg line="E:/DARTmail/DARTmail/ui/lgUI/lgui.sln /REBUILD Release" />
>   </exec>
>  </target>
> </project>
> 
> Now the devenv is returning 1 and it says that build is successful.
> But now also I am not getting anything in output file (i.e E:/output.log).
> What might be the problem?
> 
> 
> ----- Original Message -----
> From: "Karunakar Chatla" <ka...@cybage.com>
> To: "Ant Users List" <us...@ant.apache.org>
> Sent: Wednesday, August 17, 2005 4:21 PM
> Subject: Error while executing exec task
> 
> 
> 
> Hi,
> 
> I have encountered a problem... I don't know whether to call it strange or
> I
> am doing it wrong.
> 
> I have to compile a .Net project through exec task.
> 
> Following is my build file :
> 
> <project name="DotNet">
>     <description>
>         Script to build all the .Net Components
>     </description>
>     <property name="win.view.path" value="E:/DARTmail" />
>     <property name="build.options" value="/REBUILD" />
>     <target name="Build .Net Projects" >
>        <echo message="Building .Net components" />
>        <echo message="Setting environment" />
> 
>        <!--
>           <exec executable="C:\Program Files\Microsoft Visual Studio .NET
> 2003\Common7\Tools\vsvars32.bat" os="Windows 2000" output="e:/out.txt"
>             failonerror="false" />
>        -->
> 
>        <!-- Build sslgui project -->
>       <exec executable='"C:\Program Files\Microsoft Visual Studio .NET
> 2003\Common7\IDE\devenv"' os="Windows 2000" output="E:/BuildDotNet.log"
> failonerror="true" >
>         <arg line='${win.view.path}/DARTmail/ui/lgUI/lgui.sln
> ${build.options} Release' />
>       </exec>
>  </target>
> </project>
> 
> This is giving following error :
>       BUILD FAILED
>       Ant Error Message: E:\BuildAutomation\Phase
> II\RAndD\Cruise\build-components.xml:14: The following error occurred
> while
> executing this line: E:\BuildAutomation\Phase
> II\RAndD\Cruise\checkout\DotNe
> t\build.xml:17: exec returned: 1
> 
> 
> I have tried in following ways :
> 1) Uncommented the first exec task to set the environment before calling
> devenv. Given only the executable name (i.e devenv) in second exec task.
> 2) Thought the problem might be because of the spaces in the path, so
> deliberately put the path inside the quotes.
> 3) Given absolute path for all.
> 
> In all the cases it is failing with the above error message. The
> irritating
> thing was that "E:/BuildDotNet.log" file created is of 0 KB. no log is
> written to this file.
> I don't know why this is happening.
> 
> Can anybody help me out?
> 
> 
> Thanks,
> Karunakar Chatla
> 
> 
> 
> ---------------------------------------------------------------------
> 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