0
votes

I want to update local project from remote SVN with Maven (without to have SVN command installed) I`m trying to use alternate scm provider in maven-scm-publish-plugin following the example plugin config looks like:

   <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>1.1</version>
          <configuration>
            <providerImplementations>
              <svn>javasvn</svn>
            </providerImplementations>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
              <artifactId>maven-scm-provider-svnjava</artifactId>
              <version>2.0.6</version>
            </dependency>
            <dependency>
              <groupId>org.tmatesoft.svnkit</groupId>
              <artifactId>svnkit</artifactId>
              <version>1.7.11</version>
            </dependency>
          </dependencies>
        </plugin>

source: http://maven.apache.org/plugins/maven-scm-publish-plugin/various-tips.html

But after execute mvn scm:update it`s have in Maven log

[INFO] --- maven-scm-plugin:1.9.5:update (default-cli) @ testscm ---

[INFO] Executing: /bin/sh -c cd /home/stanimir/ProjectSvnTest && svn --non-interactive update /home/stanimir/ProjectSvnTest

and error: svn not found - I know.. it is not installed on system. I want to use svnkit instead but how this plugin to use javasvn?

1
Why are you trying to configure maven-scm-publish-plugin ? Why are trying to download a repository from SVN ? Are you talking about a Maven repository which is committed into SVN ?khmarbaise
This pom.xml is committed to existing SVN repository. My goal is to update the project using mvn scm:updatesytolk
What about simply using svn upd? Why so compilcated via Maven?khmarbaise
The problem is that there is only Maven on the system installed and svn update will fail with the same error svn not found there is not svn cli installed on the server and I cannot change this :)sytolk

1 Answers

1
votes

I have run the wrong Maven plugin from command line mvn scm:update (without configuration) instead of mvn scm-publish:update Finally I have success with maven-scm-plugin:

<plugin>
                <artifactId>maven-scm-plugin</artifactId>
                <version>1.9.5</version>
                <configuration>
                    <providerImplementations>
                        <svn>javasvn</svn>
                    </providerImplementations>
                    <connectionUrl>scm:svn:https://..</connectionUrl>
                    <username>user</username>
                    <password>XXX</password>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                        <artifactId>maven-scm-provider-svnjava</artifactId>
                        <version>2.0.6</version>
                    </dependency>
                    <dependency>
                        <groupId>org.tmatesoft.svnkit</groupId>
                        <artifactId>svnkit</artifactId>
                        <version>1.7.11</version>
                    </dependency>
                </dependencies>
            </plugin>

To clone SVN repository: mvn -Djsse.enableSNIExtension=false scm:checkout

To update it: mvn scm:update

[INFO] --- maven-scm-plugin:1.9.5:checkout (default-cli) @ testscm ---

[INFO] Change the default 'svn' provider implementation to 'javasvn'.