are you sure it only needs to run once?

remember that prepare runs from $(pwd) while perform runs from
$(pwd)/target/checkout so if it is doing things like generating source code,
or such, you might actually need to run it twice.

otherwise put it it a profile that is only activated for release:prepare or
release:perform as suggested by Benson

-Stephen

On 14 September 2010 11:58, C. Benson Manica <[email protected]> wrote:

> (Asking this question again in a different form, since I feel like there
> *has* to be an answer...)
>
> I have a Maven project that invokes exec-maven in the prepare-package
> phase,
> as below, so that its work is done for package creation.  That all works
> fine, deployment also works fine, but my issue is that exec-maven is
> invoked
> both during release:prepare and release:perform.  This execution takes a
> long time, so invoking it twice is really not at all desirable.  How can I
> configure the release plugin so that it doesn't cause this execution to be
> invoked twice during the release process?
>
>        <plugins>
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>exec-maven-plugin</artifactId>
>                <version>1.1.1</version>
>                <executions>
>                    <execution>
>                        <id>Foo</id>
>                        <phase>prepare-package</phase>
>                        <goals>
>                            <goal>exec</goal>
>                        </goals>
>                        <configuration>
>
> <executable>${env.JAVA_HOME}/bin/java</executable>
>                             ...
>                        </configuration>
>                    </execution>
>                </executions>
>            </plugin>
>        </plugins>
>
>
> --
> C. Benson Manica
> [email protected]
>

Reply via email to