Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
与Maven SCM插件一起使用的svn-settings.xml的格式是什么?_Svn_Maven 2_Maven Scm - Fatal编程技术网

与Maven SCM插件一起使用的svn-settings.xml的格式是什么?

与Maven SCM插件一起使用的svn-settings.xml的格式是什么?,svn,maven-2,maven-scm,Svn,Maven 2,Maven Scm,我正在尝试外部化我的用户名和密码,但似乎svn settings.xml的格式不正确。我在网上找不到任何资源,除了这篇文章和下面给出的错误 在我的pom.xml中,我得到了 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-plugin</artifactId> <version>1.4</ver

我正在尝试外部化我的用户名和密码,但似乎svn settings.xml的格式不正确。我在网上找不到任何资源,除了这篇文章和下面给出的错误

在我的pom.xml中,我得到了

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-scm-plugin</artifactId>
    <version>1.4</version>
    <executions>
        <execution>
            ...
            <configuration>
                <connectionUrl>scm:svn:http://my_hostname/im-tools-repos/trunk</connectionUrl>
                <checkoutDirectory>${project.build.directory}/checkout/im-tools</checkoutDirectory>
            </configuration>
         </execution>              
     </executions>
  </plugin>
<svn-settings>
   <user>my_uid</user>
   <password>my_pwd</password>
 </svn-settings>

org.apache.maven.plugins
maven scm插件
1.4
...
scm:svn:http://my_hostname/im-tools-repos/trunk
${project.build.directory}/checkout/im工具
在C:\Documents and Settings\my_uid.scm\svn-Settings.xml中,我得到了

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-scm-plugin</artifactId>
    <version>1.4</version>
    <executions>
        <execution>
            ...
            <configuration>
                <connectionUrl>scm:svn:http://my_hostname/im-tools-repos/trunk</connectionUrl>
                <checkoutDirectory>${project.build.directory}/checkout/im-tools</checkoutDirectory>
            </configuration>
         </execution>              
     </executions>
  </plugin>
<svn-settings>
   <user>my_uid</user>
   <password>my_pwd</password>
 </svn-settings>

我的液体
我的朋友
当我运行Maven时,它会失败,并显示以下消息:

C:\Documents and Settings\my_uid\.scm\svn-settings.xml isn't well formed. SKIPPED.Unrecognised tag: 'user' (position: START_TAG seen <svn-settings>\r\n\t<user>... @2:7)
[INFO] Executing: cmd.exe /X /C "svn --non-interactive checkout http://my_hostname/im-tools-repos/trunk C:\test\bamboo\agent\target\checkout\im-tools"
[INFO] Working directory: C:\test\bamboo\agent\target\checkout
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: OPTIONS of 'http://my_hostname/im-tools-repos/trunk': authorization failed: Could not authenticate to server: rejected Basic challenge (http://my_hostname)
C:\Documents and Settings\my\u uid\.scm\svn-Settings.xml格式不正确。跳过。无法识别的标记:“用户”(位置:已看到开始标记\r\n\t..@2:7)
[信息]正在执行:cmd.exe/X/C“svn--非交互式签出http://my_hostname/im-tools-repos/trunk C:\test\bambol\agent\target\checkout\im工具”
[信息]工作目录:C:\test\bambol\agent\target\checkout
[错误]提供程序消息:
[错误]svn命令失败。
[错误]命令输出:
[错误]svn:的选项'http://my_hostname/im-tools-repos/trunk“:授权失败:无法对服务器进行身份验证:拒绝了基本质询(http://my_hostname)

那么,我应该使用什么来代替

根据maven SCM集成,svn-settings.xml文件似乎只允许以下参数:

  • 配置目录
  • useCygwinPath
  • 西格温山路
  • 使用非交互式
如果不想将密码放入pom.xml中,可以将其作为命令行参数传递

在pom.xml中:

<connectionUrl>scm:svn:http://my_username@my_hostname/im-tools-repos/trunk</connectionUrl>

你说得对。这意味着我链接的问题的答案毕竟是错误的。这个变量名
密码
正确吗?这是scm插件使用的默认名称吗?我现在尝试通过命令行设置我的svn身份验证信息。是的,用户名和密码用于设置用户凭据。您可以在此处找到scm插件参数: