vendredi 28 juillet 2017

How to include plugin in maven for test build only?

I want to add the plugin in the maven project. I want it to be added to build only when I build the project for testing purpose.

I found that <scope> can be used for dependency as shown below

<dependency>
  <groupId>ch.qos.logback</groupId>
  <artifactId>logback</artifactId>
  <version>0.5</version>
  <scope>test</scope>
</dependency>

As you can see here <scope>test</scope>is used.

I want similar thing for plugin. For example this is my plugin code snipplet

   <build>
        <plugins>
            <plugin>
                <groupId>org.jibx</groupId>
                <artifactId>jibx-maven-plugin</artifactId>
                <version>1.2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>bind</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Aucun commentaire:

Enregistrer un commentaire