Unfortunately this is not trivial. See my profile below. It is activated but
exec is never executed. Any idea why? (sorry for the bad formatting)
<profile>
<!-- Profile used when the release plugin executes. -->
<id>execmyson</id>
<activation>
<property>
<!-- This property is automatically defined by the Maven release
plugin when executing
a release. Thus this profile will be automatically enabled when
releasing -->
<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>
</execution>
</executions>
<configuration>
<executable>/bin/sh</executable>
<arguments>
<argument>run.sh</argument>
</arguments>
</configuration>
</plugin></plugins>
</build>
</profile>
On Mon, Aug 9, 2010 at 7:27 PM, Kalle Korhonen
<[email protected]>wrote:
> Put the exec plugin configuration in a profile, <phase>deploy</phase>
> is the configuration you are looking for. See
>
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
>
> Kalle
>
>
> On Mon, Aug 9, 2010 at 7:20 PM, Sergio Oliveira
> <[email protected]> wrote:
> > I am trying the approach below, but can you tell me how I execute
> exec:exec
> > inside a profile? Thanks! It is probably a silly question, so if you want
> to
> > give me the answer and also advise on where I should have looked for it I
> > would appreciate your help.
> >
> >
> > <profile>
> >
> > <!-- Profile used when the release plugin executes. -->
> >
> > <id>execmyson</id>
> >
> > <activation>
> >
> > <property>
> >
> > <!-- This property is automatically defined by the Maven release
> > plugin when executing
> >
> > a release. Thus this profile will be automatically enabled when
> > releasing -->
> >
> > <name>performRelease</name>
> >
> > <value>true</value>
> >
> > </property>
> >
> > </activation>
> >
> > <build>
> >
> > <defaultGoal>exec:exec</defaultGoal>
> >
> > </build>
> >
> > </profile>
> >
> > On Mon, Aug 9, 2010 at 6:56 PM, Kalle Korhonen
> > <[email protected]>wrote:
> >
> >> No, you bind exec:exec to deploy phase, or profile or however you want
> >> to set it up and skip the normal deploy.
> >>
> >> Kalle
> >>
> >>
> >> On Mon, Aug 9, 2010 at 6:22 PM, Sergio Oliveira
> >> <[email protected]> wrote:
> >> > I added:
> >> >
> >> > <goals>install exec:exec</goals>
> >> >
> >> > But release:perform does not like exec:exec. :-(
> >> >
> >> > [INFO] [INFO]
> >> >
> ------------------------------------------------------------------------
> >> > [INFO] [INFO] One or more required plugin parameters are
> invalid/missing
> >> for
> >> > 'exec:exec'
> >> > [INFO]
> >> > [INFO] [0] Inside the definition for plugin 'exec-maven-plugin'
> specify
> >> the
> >> > following:
> >> > [INFO]
> >> > [INFO] <configuration>
> >> > [INFO] ...
> >> > [INFO] <executable>VALUE</executable>
> >> > [INFO] </configuration>
> >> > [INFO]
> >> > [INFO] -OR-
> >> > [INFO]
> >> > [INFO] on the command line, specify: '-Dexec.executable=VALUE'
> >> > [INFO]
> >> >
> >> >
> >> >
> >> >
> >> > On Mon, Aug 9, 2010 at 5:51 PM, Wendy Smoak <[email protected]> wrote:
> >> >
> >> >> On Mon, Aug 9, 2010 at 8:34 PM, Sergio Oliveira
> >> >> <[email protected]> wrote:
> >> >> > I am using the maven release plugin. Problem is simple: I don't
> want
> >> to
> >> >> do a
> >> >> > deploy (copy the war somewhere) on release:perform. I actually want
> to
> >> >> > execute a shell script that will do the deploy for me. So I have
> two
> >> >> things
> >> >> > to accomplish:
> >> >> >
> >> >> > 1 - Somehow disable the default "deploy" goal from release:perform
> (i
> >> >> want
> >> >> > to build the war, but I don't want to copy it anywhere)
> >> >> >
> >> >> > 2 - Somehow make release:perform call the exec:exec plugin to
> execute
> >> a
> >> >> > shell script that copy my war to my server farm
> >> >>
> >> >> Have you looked at the docs for the release plugin? You can
> >> >> reconfigure the goals it executes for both prepare and perform. See
> >> >>
> http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
> >> >> -> goals. You might want "install exec:exec" there.
> >> >>
> >> >> You could also use the "skip" parameter of the deploy plugin to stop
> >> >> it from deploying to the Maven repo.
> >> >>
> >> >> --
> >> >> Wendy
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: [email protected]
> >> >> For additional commands, e-mail: [email protected]
> >> >>
> >> >>
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>