Search code examples
maven-3maven-plugin

Maven - Skip the goal execution by passing parameter


I'm using this maven plugin:

<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>

I want to be able to pass in a parameter to skip the execution of the specified goal. (e.g. mvm install -skipGemPlugin=true) How do I do that?


Solution

  • I ended up creating a separate profile to run tomcat and skips the goal execution:

    <profile>
        <id>foo</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>de.saumya.mojo</groupId>
                        <artifactId>gem-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>compassProcessSource</id>
                                    <phase>none</phase>
                                </execution>
                            </executions>
                            ...