You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by eyal edri <ey...@gmail.com> on 2010/08/01 09:27:26 UTC
exec plugin:how to run plugin both in pom parent and pom without
overriding executions?
Hi,
i'm trying to run an execution of the exec plugin in a pom.
the build is the default profile:
* <plugin>*
* <groupId>org.codehaus.mojo</groupId>*
* <artifactId>exec-maven-plugin</artifactId>*
* <executions>*
* <execution>*
* <id>open-tarball</id>*
* <phase>validate</phase>*
* <goals>*
* <goal>exec</goal>*
* </goals>*
* </execution>*
* </executions>*
* <configuration>*
* <executable>tar</executable>*
* <arguments>*
* <argument>-zxvf</argument>*
* <argument>src/main/tar/${tar-ver}.tar.gz</argument>*
* <argument>-C</argument>*
* <argument>src/main/tar/</argument>*
* </arguments>*
* </configuration>*
* </plugin>*
i also have an execution in the pom parent:
*<profile>*
* <id>rpm-local</id>*
* <build>*
* <plugins>*
* <plugin>*
* <groupId>org.codehaus.mojo</groupId>*
* <artifactId>exec-maven-plugin</artifactId>*
* <executions>*
* <execution>*
* <id>build-local-yum-repo</id>*
* <phase>deploy</phase>*
* <goals>*
* <goal>exec</goal>*
* </goals>*
* </execution>*
* </executions>*
* <configuration>*
* <executable>ssh</executable>*
* <arguments>*
* <argument>${localYumRepo}</argument>*
* <argument>cd /rpm-home/;make</argument>*
* </arguments>*
* </configuration>*
* </plugin>*
* </plugins>*
* </build>*
* </profile>*
the pom overrides the execution on the parent pom, although its in a
different profile and have a diff ID.
anyone knows how to overcome this?
thanks,
--
Eyal Edri
Re: exec plugin:how to run plugin both in pom parent and pom without
overriding executions?
Posted by eyal edri <ey...@gmail.com>.
I managed to make it work only when moving the local exec command in the pom
to a new profile and making it not activation by default.
On Sun, Aug 1, 2010 at 10:55 AM, eyal edri <ey...@gmail.com> wrote:
> Problem is i want both of them to work,
> each works at a different lifecycle.
>
> the parent one is a general exec for rpm deploy, and the local one in pom
> is a specific one for open a tar.
>
>
> On Sun, Aug 1, 2010 at 10:44 AM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
>> why not make the execution in th eparent pom <inherited>false</inherited>?
>>
>> On 1 August 2010 08:27, eyal edri <ey...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > i'm trying to run an execution of the exec plugin in a pom.
>> > the build is the default profile:
>> >
>> > * <plugin>*
>> > * <groupId>org.codehaus.mojo</groupId>*
>> > * <artifactId>exec-maven-plugin</artifactId>*
>> > * <executions>*
>> > * <execution>*
>> > * <id>open-tarball</id>*
>> > * <phase>validate</phase>*
>> > * <goals>*
>> > * <goal>exec</goal>*
>> > * </goals>*
>> > * </execution>*
>> > * </executions>*
>> > * <configuration>*
>> > * <executable>tar</executable>*
>> > * <arguments>*
>> > * <argument>-zxvf</argument>*
>> > * <argument>src/main/tar/${tar-ver}.tar.gz</argument>*
>> > * <argument>-C</argument>*
>> > * <argument>src/main/tar/</argument>*
>> > * </arguments>*
>> > * </configuration>*
>> > * </plugin>*
>> >
>> > i also have an execution in the pom parent:
>> >
>> > *<profile>*
>> > * <id>rpm-local</id>*
>> > * <build>*
>> > * <plugins>*
>> > * <plugin>*
>> > * <groupId>org.codehaus.mojo</groupId>*
>> > * <artifactId>exec-maven-plugin</artifactId>*
>> > * <executions>*
>> > * <execution>*
>> > * <id>build-local-yum-repo</id>*
>> > * <phase>deploy</phase>*
>> > * <goals>*
>> > * <goal>exec</goal>*
>> > * </goals>*
>> > * </execution>*
>> > * </executions>*
>> > * <configuration>*
>> > * <executable>ssh</executable>*
>> > * <arguments>*
>> > * <argument>${localYumRepo}</argument>*
>> > * <argument>cd /rpm-home/;make</argument>*
>> > * </arguments>*
>> > * </configuration>*
>> > * </plugin>*
>> > * </plugins>*
>> > * </build>*
>> > * </profile>*
>> >
>> > the pom overrides the execution on the parent pom, although its in a
>> > different profile and have a diff ID.
>> >
>> > anyone knows how to overcome this?
>> >
>> > thanks,
>> >
>> >
>> > --
>> > Eyal Edri
>> >
>>
>
>
>
> --
> Eyal Edri
>
--
Eyal Edri
Re: exec plugin:how to run plugin both in pom parent and pom without
overriding executions?
Posted by eyal edri <ey...@gmail.com>.
Problem is i want both of them to work,
each works at a different lifecycle.
the parent one is a general exec for rpm deploy, and the local one in pom is
a specific one for open a tar.
On Sun, Aug 1, 2010 at 10:44 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> why not make the execution in th eparent pom <inherited>false</inherited>?
>
> On 1 August 2010 08:27, eyal edri <ey...@gmail.com> wrote:
>
> > Hi,
> >
> > i'm trying to run an execution of the exec plugin in a pom.
> > the build is the default profile:
> >
> > * <plugin>*
> > * <groupId>org.codehaus.mojo</groupId>*
> > * <artifactId>exec-maven-plugin</artifactId>*
> > * <executions>*
> > * <execution>*
> > * <id>open-tarball</id>*
> > * <phase>validate</phase>*
> > * <goals>*
> > * <goal>exec</goal>*
> > * </goals>*
> > * </execution>*
> > * </executions>*
> > * <configuration>*
> > * <executable>tar</executable>*
> > * <arguments>*
> > * <argument>-zxvf</argument>*
> > * <argument>src/main/tar/${tar-ver}.tar.gz</argument>*
> > * <argument>-C</argument>*
> > * <argument>src/main/tar/</argument>*
> > * </arguments>*
> > * </configuration>*
> > * </plugin>*
> >
> > i also have an execution in the pom parent:
> >
> > *<profile>*
> > * <id>rpm-local</id>*
> > * <build>*
> > * <plugins>*
> > * <plugin>*
> > * <groupId>org.codehaus.mojo</groupId>*
> > * <artifactId>exec-maven-plugin</artifactId>*
> > * <executions>*
> > * <execution>*
> > * <id>build-local-yum-repo</id>*
> > * <phase>deploy</phase>*
> > * <goals>*
> > * <goal>exec</goal>*
> > * </goals>*
> > * </execution>*
> > * </executions>*
> > * <configuration>*
> > * <executable>ssh</executable>*
> > * <arguments>*
> > * <argument>${localYumRepo}</argument>*
> > * <argument>cd /rpm-home/;make</argument>*
> > * </arguments>*
> > * </configuration>*
> > * </plugin>*
> > * </plugins>*
> > * </build>*
> > * </profile>*
> >
> > the pom overrides the execution on the parent pom, although its in a
> > different profile and have a diff ID.
> >
> > anyone knows how to overcome this?
> >
> > thanks,
> >
> >
> > --
> > Eyal Edri
> >
>
--
Eyal Edri
Re: exec plugin:how to run plugin both in pom parent and pom without
overriding executions?
Posted by Stephen Connolly <st...@gmail.com>.
why not make the execution in th eparent pom <inherited>false</inherited>?
On 1 August 2010 08:27, eyal edri <ey...@gmail.com> wrote:
> Hi,
>
> i'm trying to run an execution of the exec plugin in a pom.
> the build is the default profile:
>
> * <plugin>*
> * <groupId>org.codehaus.mojo</groupId>*
> * <artifactId>exec-maven-plugin</artifactId>*
> * <executions>*
> * <execution>*
> * <id>open-tarball</id>*
> * <phase>validate</phase>*
> * <goals>*
> * <goal>exec</goal>*
> * </goals>*
> * </execution>*
> * </executions>*
> * <configuration>*
> * <executable>tar</executable>*
> * <arguments>*
> * <argument>-zxvf</argument>*
> * <argument>src/main/tar/${tar-ver}.tar.gz</argument>*
> * <argument>-C</argument>*
> * <argument>src/main/tar/</argument>*
> * </arguments>*
> * </configuration>*
> * </plugin>*
>
> i also have an execution in the pom parent:
>
> *<profile>*
> * <id>rpm-local</id>*
> * <build>*
> * <plugins>*
> * <plugin>*
> * <groupId>org.codehaus.mojo</groupId>*
> * <artifactId>exec-maven-plugin</artifactId>*
> * <executions>*
> * <execution>*
> * <id>build-local-yum-repo</id>*
> * <phase>deploy</phase>*
> * <goals>*
> * <goal>exec</goal>*
> * </goals>*
> * </execution>*
> * </executions>*
> * <configuration>*
> * <executable>ssh</executable>*
> * <arguments>*
> * <argument>${localYumRepo}</argument>*
> * <argument>cd /rpm-home/;make</argument>*
> * </arguments>*
> * </configuration>*
> * </plugin>*
> * </plugins>*
> * </build>*
> * </profile>*
>
> the pom overrides the execution on the parent pom, although its in a
> different profile and have a diff ID.
>
> anyone knows how to overcome this?
>
> thanks,
>
>
> --
> Eyal Edri
>