maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Ernst <johannes.er...@gmail.com>
Subject use of exec in multiple phases
Date Wed, 13 May 2015 21:17:26 GMT
I’d like to invoke exec-maven-plugin with different arguments during different phases of
the build, and I’m failing. I hope somebody can help me.

This is what works:

parent pom: (invokes a code generator)

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.4.0</version>
                    <executions>
                        <execution>
                            <id>generate-sources</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>exec</goal>
                            </goals>
                            <configuration>
                                <executable>code-generator-executable</executable>
                                ….

project pom:

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
            </plugin>
            ….

Now I’d like to also invoke exec just prior to surefire running tests, but only in the project
pom (not in other projects that use the same parent). So I want to attach it to

                            <phase>process-tests-classes</phase>

and for argument’s sake, let’s say I simply want it to invoke “echo ‘I succeeded in
attaching another exec’”

Where would I declare what?

Thanks,



Johannes.

P.S. I haven’t gotten any responses to two previous questions on this list this month; I
hope this one will fare better.


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


Mime
View raw message