在maven-scm-publish-plugin中使用备用scm提供程序

时间:2017-02-28 12:52:22

标签: java maven svn maven-scm-plugin

我想用Maven从远程SVN更新本地项目(没有安装SVN命令) 我试图在maven-scm-publish-plugin中使用备用scm提供程序,示例插件配置如下:

df <- df %>% dplyr:: select(starts_with("ABC"))

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

但是在执行 <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> 后,它在Maven日志中

  

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

     

[INFO]执行:/ bin / sh -c cd / home / stanimir / ProjectSvnTest&amp;&amp; svn - 非交互式更新/ home / stanimir / ProjectSvnTest

和错误:mvn scm:update - 我知道..它没有安装在系统上。我想使用svnkit但是这个插件如何使用javasvn?

1 个答案:

答案 0 :(得分:1)

我从命令行mvn scm:update(没有配置)而不是mvn scm-publish:update运行了错误的Maven插件 最后,我使用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>

要克隆SVN存储库:mvn -Djsse.enableSNIExtension=false scm:checkout

要更新它:mvn scm:update

  

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

     

[INFO]将默认的'svn'提供程序实现更改为'javasvn'。