You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sergio Oliveira <se...@gmail.com> on 2010/08/10 06:38:46 UTC

release:perform ignore profile for its goals

I change goals from release:perform to install instead of the default
deploy.

But maven ignores my profile 'release' for phase 'install'. It works when I
call mvn install -P release. But not when I call mvn release:perform -P
release.

It gives the beautiful: Profile with id: 'release' has not been activated.

Any ideas why maven makes it so trivial?

            <plugin>

<artifactId>maven-release-plugin</artifactId>

<version>2.0</version>

<configuration>

<tagBase>svn://saoj-la.dyndns.org/webapp-test/tags</tagBase>

<connectionUrl>scm:svn:svn://saoj-la.dyndns.org/webapp
-test/trunk</connectionUrl>

<goals>install</goals>

</configuration>

</plugin>



        </plugins>

        <finalName>HelloWebApp</finalName>

    </build>

    <profiles>



    <profile>

    <id>release</id>

    <activation>

    <property>

    <name>performRelease</name>

    <value>true</value>

    </property>

    </activation>

    <build>

    <plugins>

                    <plugin>

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

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

                        <executions>

                            <execution>

                                <phase>install</phase>

                                <goals>

                                    <goal>exec</goal>

                                </goals>

                                <configuration>



            <executable>/bin/sh</executable>

  <arguments>

    <argument>run2.sh</argument>

  </arguments>

                                </configuration>

                            </execution>

                        </executions>

                    </plugin>


    </plugins>

    </build>

    </profile>

Re: release:perform ignore profile for its goals

Posted by Sergio Oliveira <se...@gmail.com>.
Perhaps there is a bug on Mac. I do what you say and get this:

[INFO] [INFO] Scanning for projects...
[INFO] [WARNING]
[INFO] Profile with id: 'release' has not been activated.
[INFO]


pom.xml:



            <plugin>

<artifactId>maven-release-plugin</artifactId>

<version>2.0</version>

<configuration>

<tagBase>svn://saoj-la.dyndns.org/webapp-test/tags</tagBase>

<connectionUrl>scm:svn:svn://saoj-la.dyndns.org/webapp
-test/trunk</connectionUrl>

<goals>install</goals>

<releaseProfiles>release</releaseProfiles>

</configuration>

</plugin>



        </plugins>

        <finalName>HelloWebApp</finalName>

    </build>

    <profiles>



    <profile>

    <id>release</id>

    <build>

    <plugins>


 <plugin>

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

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

        <executions>

          <execution>

          <phase>install</phase>

            <goals>

              <goal>exec</goal>

            </goals>

          </execution>

        </executions>

        <configuration>

          <executable>/bin/sh</executable>

          <arguments>

            <argument>run1.sh</argument>

          </arguments>

        </configuration>

      </plugin>

On Tue, Aug 10, 2010 at 10:12 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> Nope.
>
> bind the execution to the install phase in a profile and then use *
>
> http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#releaseProfilesto
> activate the profile on release perform
> *
>
> On 10 August 2010 16:07, Sergio Oliveira <se...@gmail.com> wrote:
>
> > Problem is NOT switching 'deploy' to 'install'. A <goals>install</goals>
> > will do it.
> >
> > Problem IS cascading an exec:exec after release:perform. You can try and
> > you
> > will see that's NOT possible. Probably something related to the fact that
> > release:perform forks another maven process. Even mvn release:perform
> > exec:exec does not work.
> >
> > Depending on the profile, I would like to release:perform to generate a
> war
> > from SVN tag and exec:exec to deploy remotely using a shell script. The
> > profile will determine which deploy shell script will be executed. The
> one
> > for QA or the one for PRODUCTION.
> >
> > My workaround so far for this maven annoyance is to force the user to
> call
> > twice:
> >
> > mvn release:perform
> >
> > mvn exec:exec -P qa
> >
> > It would have been much better to be able to do:
> >
> > mvn release:perform -P qa
> >
> > But that is IMPOSSIBLE with maven.
> >
> > -Sergio
> >
> > On Tue, Aug 10, 2010 at 1:50 AM, Stephen Connolly <
> > stephen.alan.connolly@gmail.com> wrote:
> >
> > > Have a look at *
> > >
> > >
> >
> http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#releaseProfiles
> > > *
> > >
> > > 2010/8/10 Martin Schayna <ma...@abra.eu>
> > >
> > > > I am using this configuration for firing goal 'install' instead of
> > > 'deploy'
> > > > in 'release:perform':
> > > >
> > > > <build>
> > > >  ...
> > > > <plugins>
> > > >    ...
> > > >
> > > > <plugin>
> > > > <artifactId>maven-release-plugin</artifactId>
> > > > <version>2.0-beta-9</version>
> > > > <configuration>
> > > > <autoVersionSubmodules>true</autoVersionSubmodules>
> > > > <goals>install</goals>
> > > > <useReleaseProfile>false</useReleaseProfile>
> > > > </configuration>
> > > > </plugin>
> > > > </plugins>
> > > > </build>
> > > >
> > > > M.
> > > >
> > > >
> > > >
> > > > On 08/10/2010 06:38 AM, Sergio Oliveira wrote:
> > > >
> > > >> I change goals from release:perform to install instead of the
> default
> > > >> deploy.
> > > >>
> > > >> But maven ignores my profile 'release' for phase 'install'. It works
> > > when
> > > >> I
> > > >> call mvn install -P release. But not when I call mvn release:perform
> > -P
> > > >> release.
> > > >>
> > > >> It gives the beautiful: Profile with id: 'release' has not been
> > > activated.
> > > >>
> > > >> Any ideas why maven makes it so trivial?
> > > >>
> > > >>
> > > >>
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> >
>

Re: release:perform ignore profile for its goals

Posted by Stephen Connolly <st...@gmail.com>.
Nope.

bind the execution to the install phase in a profile and then use *
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#releaseProfilesto
activate the profile on release perform
*

On 10 August 2010 16:07, Sergio Oliveira <se...@gmail.com> wrote:

> Problem is NOT switching 'deploy' to 'install'. A <goals>install</goals>
> will do it.
>
> Problem IS cascading an exec:exec after release:perform. You can try and
> you
> will see that's NOT possible. Probably something related to the fact that
> release:perform forks another maven process. Even mvn release:perform
> exec:exec does not work.
>
> Depending on the profile, I would like to release:perform to generate a war
> from SVN tag and exec:exec to deploy remotely using a shell script. The
> profile will determine which deploy shell script will be executed. The one
> for QA or the one for PRODUCTION.
>
> My workaround so far for this maven annoyance is to force the user to call
> twice:
>
> mvn release:perform
>
> mvn exec:exec -P qa
>
> It would have been much better to be able to do:
>
> mvn release:perform -P qa
>
> But that is IMPOSSIBLE with maven.
>
> -Sergio
>
> On Tue, Aug 10, 2010 at 1:50 AM, Stephen Connolly <
> stephen.alan.connolly@gmail.com> wrote:
>
> > Have a look at *
> >
> >
> http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#releaseProfiles
> > *
> >
> > 2010/8/10 Martin Schayna <ma...@abra.eu>
> >
> > > I am using this configuration for firing goal 'install' instead of
> > 'deploy'
> > > in 'release:perform':
> > >
> > > <build>
> > >  ...
> > > <plugins>
> > >    ...
> > >
> > > <plugin>
> > > <artifactId>maven-release-plugin</artifactId>
> > > <version>2.0-beta-9</version>
> > > <configuration>
> > > <autoVersionSubmodules>true</autoVersionSubmodules>
> > > <goals>install</goals>
> > > <useReleaseProfile>false</useReleaseProfile>
> > > </configuration>
> > > </plugin>
> > > </plugins>
> > > </build>
> > >
> > > M.
> > >
> > >
> > >
> > > On 08/10/2010 06:38 AM, Sergio Oliveira wrote:
> > >
> > >> I change goals from release:perform to install instead of the default
> > >> deploy.
> > >>
> > >> But maven ignores my profile 'release' for phase 'install'. It works
> > when
> > >> I
> > >> call mvn install -P release. But not when I call mvn release:perform
> -P
> > >> release.
> > >>
> > >> It gives the beautiful: Profile with id: 'release' has not been
> > activated.
> > >>
> > >> Any ideas why maven makes it so trivial?
> > >>
> > >>
> > >>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: release:perform ignore profile for its goals

Posted by Sergio Oliveira <se...@gmail.com>.
Problem is NOT switching 'deploy' to 'install'. A <goals>install</goals>
will do it.

Problem IS cascading an exec:exec after release:perform. You can try and you
will see that's NOT possible. Probably something related to the fact that
release:perform forks another maven process. Even mvn release:perform
exec:exec does not work.

Depending on the profile, I would like to release:perform to generate a war
from SVN tag and exec:exec to deploy remotely using a shell script. The
profile will determine which deploy shell script will be executed. The one
for QA or the one for PRODUCTION.

My workaround so far for this maven annoyance is to force the user to call
twice:

mvn release:perform

mvn exec:exec -P qa

It would have been much better to be able to do:

mvn release:perform -P qa

But that is IMPOSSIBLE with maven.

-Sergio

On Tue, Aug 10, 2010 at 1:50 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> Have a look at *
>
> http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#releaseProfiles
> *
>
> 2010/8/10 Martin Schayna <ma...@abra.eu>
>
> > I am using this configuration for firing goal 'install' instead of
> 'deploy'
> > in 'release:perform':
> >
> > <build>
> >  ...
> > <plugins>
> >    ...
> >
> > <plugin>
> > <artifactId>maven-release-plugin</artifactId>
> > <version>2.0-beta-9</version>
> > <configuration>
> > <autoVersionSubmodules>true</autoVersionSubmodules>
> > <goals>install</goals>
> > <useReleaseProfile>false</useReleaseProfile>
> > </configuration>
> > </plugin>
> > </plugins>
> > </build>
> >
> > M.
> >
> >
> >
> > On 08/10/2010 06:38 AM, Sergio Oliveira wrote:
> >
> >> I change goals from release:perform to install instead of the default
> >> deploy.
> >>
> >> But maven ignores my profile 'release' for phase 'install'. It works
> when
> >> I
> >> call mvn install -P release. But not when I call mvn release:perform -P
> >> release.
> >>
> >> It gives the beautiful: Profile with id: 'release' has not been
> activated.
> >>
> >> Any ideas why maven makes it so trivial?
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: release:perform ignore profile for its goals

Posted by Stephen Connolly <st...@gmail.com>.
Have a look at *
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#releaseProfiles
*

2010/8/10 Martin Schayna <ma...@abra.eu>

> I am using this configuration for firing goal 'install' instead of 'deploy'
> in 'release:perform':
>
> <build>
>  ...
> <plugins>
>    ...
>
> <plugin>
> <artifactId>maven-release-plugin</artifactId>
> <version>2.0-beta-9</version>
> <configuration>
> <autoVersionSubmodules>true</autoVersionSubmodules>
> <goals>install</goals>
> <useReleaseProfile>false</useReleaseProfile>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> M.
>
>
>
> On 08/10/2010 06:38 AM, Sergio Oliveira wrote:
>
>> I change goals from release:perform to install instead of the default
>> deploy.
>>
>> But maven ignores my profile 'release' for phase 'install'. It works when
>> I
>> call mvn install -P release. But not when I call mvn release:perform -P
>> release.
>>
>> It gives the beautiful: Profile with id: 'release' has not been activated.
>>
>> Any ideas why maven makes it so trivial?
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: release:perform ignore profile for its goals

Posted by Martin Schayna <ma...@abra.eu>.
I am using this configuration for firing goal 'install' instead of 
'deploy' in 'release:perform':

<build>
   ...
<plugins>
     ...
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-9</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<goals>install</goals>
<useReleaseProfile>false</useReleaseProfile>
</configuration>
</plugin>
</plugins>
</build>

M.


On 08/10/2010 06:38 AM, Sergio Oliveira wrote:
> I change goals from release:perform to install instead of the default
> deploy.
>
> But maven ignores my profile 'release' for phase 'install'. It works when I
> call mvn install -P release. But not when I call mvn release:perform -P
> release.
>
> It gives the beautiful: Profile with id: 'release' has not been activated.
>
> Any ideas why maven makes it so trivial?
>
>    

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


Re: release:perform ignore profile for its goals

Posted by Stephen Connolly <st...@gmail.com>.
have a look at the releaseProfiles configuration parameter of
release:perform

On 10 August 2010 05:38, Sergio Oliveira <se...@gmail.com> wrote:

> I change goals from release:perform to install instead of the default
> deploy.
>
> But maven ignores my profile 'release' for phase 'install'. It works when I
> call mvn install -P release. But not when I call mvn release:perform -P
> release.
>
> It gives the beautiful: Profile with id: 'release' has not been activated.
>
> Any ideas why maven makes it so trivial?
>
>            <plugin>
>
> <artifactId>maven-release-plugin</artifactId>
>
> <version>2.0</version>
>
> <configuration>
>
> <tagBase>svn://saoj-la.dyndns.org/webapp-test/tags</tagBase>
>
> <connectionUrl>scm:svn:svn://saoj-la.dyndns.org/webapp
> -test/trunk</connectionUrl>
>
> <goals>install</goals>
>
> </configuration>
>
> </plugin>
>
>
>
>        </plugins>
>
>        <finalName>HelloWebApp</finalName>
>
>    </build>
>
>    <profiles>
>
>
>
>    <profile>
>
>    <id>release</id>
>
>    <activation>
>
>    <property>
>
>    <name>performRelease</name>
>
>    <value>true</value>
>
>    </property>
>
>    </activation>
>
>    <build>
>
>    <plugins>
>
>                    <plugin>
>
>                        <groupId>org.codehaus.mojo</groupId>
>
>                        <artifactId>exec-maven-plugin</artifactId>
>
>                        <executions>
>
>                            <execution>
>
>                                <phase>install</phase>
>
>                                <goals>
>
>                                    <goal>exec</goal>
>
>                                </goals>
>
>                                <configuration>
>
>
>
>            <executable>/bin/sh</executable>
>
>  <arguments>
>
>    <argument>run2.sh</argument>
>
>  </arguments>
>
>                                </configuration>
>
>                            </execution>
>
>                        </executions>
>
>                    </plugin>
>
>
>    </plugins>
>
>    </build>
>
>    </profile>
>