You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Petr V." <gr...@yahoo.com> on 2008/11/01 00:10:55 UTC

Re: exec-maven-plugin exit Code Issue

It's going to be a fun week end :-(

Okay so here is some more update . The nant script is call as many times as pom files I have in whole project ... I added the exec plugin definition in top pom file but it is executed for each sub module .... How could I stop it from doing it ?

Any help will make my Halloween evening cool  :-)

Thanks,

Petr 

--- On Sat, 11/1/08, Petr V. <gr...@yahoo.com> wrote:
From: Petr V. <gr...@yahoo.com>
Subject: Re: exec-maven-plugin exit Code Issue
To: "Maven Users List" <us...@maven.apache.org>
Date: Saturday, November 1, 2008, 3:51 AM

I am able to call my nant buid via exec-maven-plugin but my nnat script is keep
callin agian and again and build process never ends.

I put the following in my top pom file of project. I guess phase mean when we
need to call the nant script iof folliwng snippet but what does
<goal>exec</goal> mean ? 

<plugin>
                   
<groupId>org.codehaus.mojo</groupId>
                   
<artifactId>exec-maven-plugin</artifactId>
                    <version>1.1</version>
                    <executions>
                      <execution>
                        <id>nantbuild</id>
                        <configuration>
                         
<executable>nant</executable>
                          
<workingDirectory>F:\shared</workingDirectory>
                        </configuration>
                         
<phase>compile</phase>
                        <goals>
                         
<goal>exec</goal>
                        </goals>
                      </execution>         
                    </executions>
</plugin>           

Thanks,

Petr

--- On Fri, 10/31/08, Petr V. <gr...@yahoo.com> wrote:
From: Petr V. <gr...@yahoo.com>
Subject: exec-maven-plugin exit Code Issue
To: "Maven Users List" <us...@maven.apache.org>
Date: Friday, October 31, 2008, 10:58 PM

Okay as advised by Stephen  Connolly, from my maven pom file , I am trying to
call some other script(let's
assume it is an ant script for sake of discussion) which fails but my
maven build process goes on. I want my maven build to fail if it calls
some external script which fails. I looked at documentation of plugin
but I don't see any option that would help me setting up what to do when
my called program or script via exec-maven-plugin fails



  <plugin>

        <groupId>org.codehaus.mojo</groupId>

        <artifactId>exec-maven-plugin</artifactId>

        <version>1.1</version>

        <executions>

          <execution>

            <id>dowithant</id>

            <configuration>

              <executable>ant</executable>

            </configuration>

              <phase>compile</phase>

            <goals>

              <goal>exec</goal>

            </goals>

          </execution>         

        </executions>

 </plugin>



It calls my ant script which fails but it goes on with my maven build :-(.



Is there any way I can catch the failure of external script ?



Thanks,



Petr


--- On Fri, 10/31/08, Stephen Connolly <st...@gmail.com>
wrote:
From: Stephen Connolly <st...@gmail.com>
Subject: Re: Nant Plugin for Maven to integrate dot net component in main
project build ?
To: "Maven Users List" <us...@maven.apache.org>,
greatman787@yahoo.com
Date: Friday, October 31, 2008, 2:13 AM

have a look at the exec-maven-plugin

2008/10/30 Petr V. <gr...@yahoo.com>

> Yeah we have looked into nMaven but these are the existing projects and we
> do not want to put effort to convert them to nMaven _now_.
>
> Is there any way possible to call nant script from maven ?
>
> Thanks,
>
> Petr
>
>
>
>
>
> --- On Thu, 10/30/08, Wayne Fay <wa...@gmail.com> wrote:
> From: Wayne Fay <wa...@gmail.com>
> Subject: Re: Nant Plugin for Maven to integrate dot net component in main
> project build ?
> To: "Maven Users List" <us...@maven.apache.org>
> Date: Thursday, October 30, 2008, 11:47 PM
>
> On Thu, Oct 30, 2008 at 10:37 AM, Petr V. <gr...@yahoo.com>
wrote:
> > I have a project that has many components. Some are written in dot
net
> and
> some are in java.We are moving our build environment to maven.
>
> I'd encourage you to look at NMaven:
> http://incubator.apache.org/nmaven/
>
> I don't use it myself, but I know others are using it successfully
> with their dot-net projects.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>
>



      


      


      

Re: exec-maven-plugin exit Code Issue

Posted by "Petr V." <gr...@yahoo.com>.
Worked like a charm. BIG THANK YOU Stephen. 

--- On Sat, 11/1/08, Stephen Connolly <st...@gmail.com> wrote:
From: Stephen Connolly <st...@gmail.com>
Subject: Re: exec-maven-plugin exit Code Issue
To: "Maven Users List" <us...@maven.apache.org>
Cc: "Maven Users List" <us...@maven.apache.org>
Date: Saturday, November 1, 2008, 4:11 AM

add inherited false to the plugin section

Sent from my iPod

On 31 Oct 2008, at 23:10, "Petr V." <gr...@yahoo.com>
wrote:

> It's going to be a fun week end :-(
>
> Okay so here is some more update . The nant script is call as many  
> times as pom files I have in whole project ... I added the exec  
> plugin definition in top pom file but it is executed for each sub  
> module .... How could I stop it from doing it ?
>
> Any help will make my Halloween evening cool  :-)
>
> Thanks,
>
> Petr
>
> --- On Sat, 11/1/08, Petr V. <gr...@yahoo.com> wrote:
> From: Petr V. <gr...@yahoo.com>
> Subject: Re: exec-maven-plugin exit Code Issue
> To: "Maven Users List" <us...@maven.apache.org>
> Date: Saturday, November 1, 2008, 3:51 AM
>
> I am able to call my nant buid via exec-maven-plugin but my nnat  
> script is keep
> callin agian and again and build process never ends.
>
> I put the following in my top pom file of project. I guess phase  
> mean when we
> need to call the nant script iof folliwng snippet but what does
> <goal>exec</goal> mean ?
>
> <plugin>
>
> <groupId>org.codehaus.mojo</groupId>
>
> <artifactId>exec-maven-plugin</artifactId>
>                     <version>1.1</version>
>                     <executions>
>                       <execution>
>                         <id>nantbuild</id>
>                         <configuration>
>
> <executable>nant</executable>
>
> <workingDirectory>F:\shared</workingDirectory>
>                         </configuration>
>
> <phase>compile</phase>
>                         <goals>
>
> <goal>exec</goal>
>                         </goals>
>                       </execution>
>                     </executions>
> </plugin>
>
> Thanks,
>
> Petr
>
> --- On Fri, 10/31/08, Petr V. <gr...@yahoo.com> wrote:
> From: Petr V. <gr...@yahoo.com>
> Subject: exec-maven-plugin exit Code Issue
> To: "Maven Users List" <us...@maven.apache.org>
> Date: Friday, October 31, 2008, 10:58 PM
>
> Okay as advised by Stephen  Connolly, from my maven pom file , I am  
> trying to
> call some other script(let's
> assume it is an ant script for sake of discussion) which fails but my
> maven build process goes on. I want my maven build to fail if it calls
> some external script which fails. I looked at documentation of plugin
> but I don't see any option that would help me setting up what to do  
> when
> my called program or script via exec-maven-plugin fails
>
>
>
>   <plugin>
>
>         <groupId>org.codehaus.mojo</groupId>
>
>         <artifactId>exec-maven-plugin</artifactId>
>
>         <version>1.1</version>
>
>         <executions>
>
>           <execution>
>
>             <id>dowithant</id>
>
>             <configuration>
>
>               <executable>ant</executable>
>
>             </configuration>
>
>               <phase>compile</phase>
>
>             <goals>
>
>               <goal>exec</goal>
>
>             </goals>
>
>           </execution>
>
>         </executions>
>
>  </plugin>
>
>
>
> It calls my ant script which fails but it goes on with my maven  
> build :-(.
>
>
>
> Is there any way I can catch the failure of external script ?
>
>
>
> Thanks,
>
>
>
> Petr
>
>
> --- On Fri, 10/31/08, Stephen Connolly <stephen.alan.connolly@gmail.com

> >
> wrote:
> From: Stephen Connolly <st...@gmail.com>
> Subject: Re: Nant Plugin for Maven to integrate dot net component in  
> main
> project build ?
> To: "Maven Users List" <us...@maven.apache.org>,
> greatman787@yahoo.com
> Date: Friday, October 31, 2008, 2:13 AM
>
> have a look at the exec-maven-plugin
>
> 2008/10/30 Petr V. <gr...@yahoo.com>
>
>> Yeah we have looked into nMaven but these are the existing projects  
>> and we
>> do not want to put effort to convert them to nMaven _now_.
>>
>> Is there any way possible to call nant script from maven ?
>>
>> Thanks,
>>
>> Petr
>>
>>
>>
>>
>>
>> --- On Thu, 10/30/08, Wayne Fay <wa...@gmail.com> wrote:
>> From: Wayne Fay <wa...@gmail.com>
>> Subject: Re: Nant Plugin for Maven to integrate dot net component  
>> in main
>> project build ?
>> To: "Maven Users List" <us...@maven.apache.org>
>> Date: Thursday, October 30, 2008, 11:47 PM
>>
>> On Thu, Oct 30, 2008 at 10:37 AM, Petr V.
<gr...@yahoo.com>
> wrote:
>>> I have a project that has many components. Some are written in dot
> net
>> and
>> some are in java.We are moving our build environment to maven.
>>
>> I'd encourage you to look at NMaven:
>> http://incubator.apache.org/nmaven/
>>
>> I don't use it myself, but I know others are using it successfully
>> with their dot-net projects.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org




      

Re: exec-maven-plugin exit Code Issue

Posted by Stephen Connolly <st...@gmail.com>.
add inherited false to the plugin section

Sent from my iPod

On 31 Oct 2008, at 23:10, "Petr V." <gr...@yahoo.com> wrote:

> It's going to be a fun week end :-(
>
> Okay so here is some more update . The nant script is call as many  
> times as pom files I have in whole project ... I added the exec  
> plugin definition in top pom file but it is executed for each sub  
> module .... How could I stop it from doing it ?
>
> Any help will make my Halloween evening cool  :-)
>
> Thanks,
>
> Petr
>
> --- On Sat, 11/1/08, Petr V. <gr...@yahoo.com> wrote:
> From: Petr V. <gr...@yahoo.com>
> Subject: Re: exec-maven-plugin exit Code Issue
> To: "Maven Users List" <us...@maven.apache.org>
> Date: Saturday, November 1, 2008, 3:51 AM
>
> I am able to call my nant buid via exec-maven-plugin but my nnat  
> script is keep
> callin agian and again and build process never ends.
>
> I put the following in my top pom file of project. I guess phase  
> mean when we
> need to call the nant script iof folliwng snippet but what does
> <goal>exec</goal> mean ?
>
> <plugin>
>
> <groupId>org.codehaus.mojo</groupId>
>
> <artifactId>exec-maven-plugin</artifactId>
>                     <version>1.1</version>
>                     <executions>
>                       <execution>
>                         <id>nantbuild</id>
>                         <configuration>
>
> <executable>nant</executable>
>
> <workingDirectory>F:\shared</workingDirectory>
>                         </configuration>
>
> <phase>compile</phase>
>                         <goals>
>
> <goal>exec</goal>
>                         </goals>
>                       </execution>
>                     </executions>
> </plugin>
>
> Thanks,
>
> Petr
>
> --- On Fri, 10/31/08, Petr V. <gr...@yahoo.com> wrote:
> From: Petr V. <gr...@yahoo.com>
> Subject: exec-maven-plugin exit Code Issue
> To: "Maven Users List" <us...@maven.apache.org>
> Date: Friday, October 31, 2008, 10:58 PM
>
> Okay as advised by Stephen  Connolly, from my maven pom file , I am  
> trying to
> call some other script(let's
> assume it is an ant script for sake of discussion) which fails but my
> maven build process goes on. I want my maven build to fail if it calls
> some external script which fails. I looked at documentation of plugin
> but I don't see any option that would help me setting up what to do  
> when
> my called program or script via exec-maven-plugin fails
>
>
>
>   <plugin>
>
>         <groupId>org.codehaus.mojo</groupId>
>
>         <artifactId>exec-maven-plugin</artifactId>
>
>         <version>1.1</version>
>
>         <executions>
>
>           <execution>
>
>             <id>dowithant</id>
>
>             <configuration>
>
>               <executable>ant</executable>
>
>             </configuration>
>
>               <phase>compile</phase>
>
>             <goals>
>
>               <goal>exec</goal>
>
>             </goals>
>
>           </execution>
>
>         </executions>
>
>  </plugin>
>
>
>
> It calls my ant script which fails but it goes on with my maven  
> build :-(.
>
>
>
> Is there any way I can catch the failure of external script ?
>
>
>
> Thanks,
>
>
>
> Petr
>
>
> --- On Fri, 10/31/08, Stephen Connolly <stephen.alan.connolly@gmail.com 
> >
> wrote:
> From: Stephen Connolly <st...@gmail.com>
> Subject: Re: Nant Plugin for Maven to integrate dot net component in  
> main
> project build ?
> To: "Maven Users List" <us...@maven.apache.org>,
> greatman787@yahoo.com
> Date: Friday, October 31, 2008, 2:13 AM
>
> have a look at the exec-maven-plugin
>
> 2008/10/30 Petr V. <gr...@yahoo.com>
>
>> Yeah we have looked into nMaven but these are the existing projects  
>> and we
>> do not want to put effort to convert them to nMaven _now_.
>>
>> Is there any way possible to call nant script from maven ?
>>
>> Thanks,
>>
>> Petr
>>
>>
>>
>>
>>
>> --- On Thu, 10/30/08, Wayne Fay <wa...@gmail.com> wrote:
>> From: Wayne Fay <wa...@gmail.com>
>> Subject: Re: Nant Plugin for Maven to integrate dot net component  
>> in main
>> project build ?
>> To: "Maven Users List" <us...@maven.apache.org>
>> Date: Thursday, October 30, 2008, 11:47 PM
>>
>> On Thu, Oct 30, 2008 at 10:37 AM, Petr V. <gr...@yahoo.com>
> wrote:
>>> I have a project that has many components. Some are written in dot
> net
>> and
>> some are in java.We are moving our build environment to maven.
>>
>> I'd encourage you to look at NMaven:
>> http://incubator.apache.org/nmaven/
>>
>> I don't use it myself, but I know others are using it successfully
>> with their dot-net projects.
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org