Reputation: 3628
I want to skip a plugin execution when I run the command 'mvn deploy'. Say in below example, I DON'T want to execute the 'properties-maven-plugin' in 'mvn deploy'
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${session.executionRootDirectory}/xxxx.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<tagNameFormat>@{artifactId}/@{artifactId}-@{version}</tagNameFormat>
</configuration>
</plugin>
<plugins>
Upvotes: 0
Views: 372
Reputation: 4223
Your plugin is bound to prepare-package
phase, so I think you can not avoid it execution when deploying.
But, it is possible to create a profile that contains that plugin, such way you activate (command line, Jenkins configuration, ...) the profile when you want to run the plugin.
This way you can control whether to run it, but it is not an answer to your question, because this way you can not avoid the plugin execution on deploy.
Upvotes: 1