0

I have this script I need to run before site phase to fix an issue (http://jira.codehaus.org/browse/MSITE-640).

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.3</version>
    <inherited>false</inherited>
    <executions>
        <execution>
            <id>workaround-MSITE-640</id>
            <!--it should be 'site' but maven doesn't pick up there-->
            <phase>validate</phase>
            <goals>
                <goal>exec</goal>
            </goals>
            <configuration>
                <failWithEmptyArgument>false</failWithEmptyArgument>
                <workingDirectory>${project.basedir}</workingDirectory>
                <executable>./workaround-MSITE-640.sh</executable>
                <arguments>
                    <argument>${settings.localRepository}</argument>
                </arguments>
            </configuration>
        </execution>
    </executions>
</plugin>

But I can't seem to run it on that phase. I tried to put it under reporting -> plugins but it can't have configuration there.

It is idempotent, so no problem in running it more than once, but would be nice if I could tie it to the correct phase.

Thanks

vlfig
  • 365
  • 1
  • 13
  • 1
    Did you try `pre-site` instead of `validate`? pre-site is part of the site lifecycle, while validate is part of build; perhaps using phases in the same lifecycle will help. – user944849 Sep 26 '14 at 15:47
  • how are you running the `mvn` command? – Daniel Kaplan Sep 26 '14 at 16:36
  • Well, this is embarassing, it works now. 'pre-site' is indeed the correct phase. @tieTYT Command was '$ mvn site'. – vlfig Sep 29 '14 at 12:47

0 Answers0