0

How can I configure Maven SCM plugin for ignoring errors during scm checkout? (Errors like "Permission denied" or other). I know about configuration property <failOnError>false</failOnError> in other plugins, but this plugin does not have such option (or I didn't find it in documentation).

Here is my pom.xml section:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9.5</version>
<executions>
    <execution>
        <phase>validate</phase>
        <goals>
            <goal>checkout</goal>
        </goals>
    </execution>
</executions>
<configuration>
    <failOnError>false</failOnError> <!-- It does not work! :( -->
</configuration>

  • I don't think you can ignore SCM failures. – GauravJ Apr 05 '17 at 08:58
  • It's so sad. But how I can checkout scm when user has access rights on repository, and just skip it when it is not? – Valentyn Tymku Apr 05 '17 at 09:03
  • What would you build if you can't check out the resources ? It should just fail. – GauravJ Apr 05 '17 at 09:04
  • It is some additional resources besides main project. And only private users can clone those private git repository and works with them. All other users shouldn't be accepted to access on it. – Valentyn Tymku Apr 05 '17 at 09:09
  • You can put that plugin inside a profile block, and ask people with permissions to access those repos to enable the profile always on their `settings.xml`... Or enable the profile from a command line parameter. – Augusto Apr 05 '17 at 09:36
  • I did solved my problem by using `exec-maven-plugin` and it `successCodes` property instead of `maven-scm-plugin`. Thanks all. – Valentyn Tymku Apr 05 '17 at 12:41

0 Answers0