maven scm:签入错误

maven scm:签入错误,maven,maven-plugin,maven-scm,Maven,Maven Plugin,Maven Scm,我的maven脚本生成了一个简洁的“错误1”,对于如何从巨大的输出中提取根本原因,我有点不知所措。 你能帮我找出这个错误的根本原因吗 以下是我使用的命令: mvn scm:checkin -Dmessage="check in" error 1. List item [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-scm-plugin:1.5:checkin' with basic configurator --> [D

我的maven脚本生成了一个简洁的“
错误1
”,对于如何从巨大的输出中提取根本原因,我有点不知所措。
你能帮我找出这个错误的根本原因吗

以下是我使用的命令:

mvn scm:checkin -Dmessage="check in" 
error 1. 
List item [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-scm-plugin:1.5:checkin' with basic configurator --> [DEBUG] (f)

basedir = E:\workspace\mtest [DEBUG] (f) 
connectionType = developerConnection [DEBUG] (s) 
connectionUrl = scm:svn:https://192.168.10.44/svn/FTMobileAdNetwork/trunk/personal/xuhuiw/mvntest/mtest/ 
[DEBUG] (f) developerConnectionUrl = scm:svn:https://192.168.10.44/svn/FTMobileAdNetwork/trunk/personal/xuhuiw/mvntest/mtest/ 
[DEBUG] (s) includes = src/*,pom.xml 
[DEBUG] (f) message = check in my mtest [DEBUG] (f) password = wangxuhui [DEBUG] (f) pushChanges = true 
[DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter@2d0479 
[DEBUG] (f) username = xuhuiw 
[DEBUG] (s) workingDirectory = E:\workspace\mtest [DEBUG] -- end configuration -- 
[INFO] Executing: cmd.exe /X /C "svn --username xuhuiw --password ***** --no-auth-cache --non-interactive commit --file C:\Users\xuhuiw\AppData\Local\Temp\maven-scm-2074558159.commit --targets C:\Users\xuhuiw\AppData\Local\Temp\maven-scm-5719724778329125171-targets" 
[INFO] Working directory: E:\workspace\mtest 
[ERROR] Provider message: 
[ERROR] The svn command failed. 
[ERROR] Command output: 
[ERROR] svn: 'E:\workspace\mtest' is not a working copy 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.5:checkin (default-cli) on project mtest: Command failed.The svn command failed. -> 
[Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.5:checkin (default-cli) on project mtest: Command failed.
The svn command failed. at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at 
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at 
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at 
org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at 
org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at 
org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at 
java.lang.reflect.Method.invoke(Method.java:597) at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: 
org.apache.maven.plugin.MojoExecutionException: Command failed.The svn command failed. at 
org.apache.maven.scm.plugin.AbstractScmMojo.checkResult(AbstractScmMojo.java:439) at 
org.apache.maven.scm.plugin.CheckinMojo.execute(CheckinMojo.java:83) at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 
... 19 more 
[ERROR] 
[ERROR] 
这是我的
pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
  <modelVersion>4.0.0</modelVersion> 
  <groupId>com.ftad.common.mtest</groupId> 
  <artifactId>mtest</artifactId> 
  <version>1.0-SNAPSHOT</version> 
  <packaging>jar</packaging> 
  <name>mtest</name> <url>http://maven.apache.org</url> 
  <organization> 
    <name>众合广告</name> 
  </organization> 
  <properties> 
    <project.build.sourceEncoding>UTF-</project.build.sourceEncoding> </properties> 
    <scm> 
      <connection>scm:svn:https://192.168.10.44/svn/FTMobileAdNetwork/trunk/personal/xuhuiw/mvntest/mtest/</connection>
      <developerConnection>scm:svn:https://192.168.10.44/svn/FTMobileAdNetwork/trunk/personal/xuhuiw/mvntest/mtest/</developerConnection> 
    </scm> 
    <dependencies> 
      <dependency> 
        <groupId>junit</groupId> 
        <artifactId>junit</artifactId> 
        <version>4.7</version> 
      </dependency> 
    </dependencies> 
    <build> 
      <pluginManagement> 
         <plugins> 
           <plugin> 
             <groupId>org.apache.maven.plugins</groupId> 
             <artifactId>maven-scm-plugin</artifactId> 
             <version>1.5</version> 
             <configuration> 
               <password>wangxuhui</password> 
               <username>xuhuiw</username> 
               <basedir>./</basedir> 
               <exportDirectory>target</exportDirectory> 
               <includes>src/*,pom.xml</includes> 
               <workingDirectory>./</workingDirectory> 
             </configuration> 
             <executions> 
               <execution> 
                 <id>pref-scm</id> 
                 <configuration> 
                    <includes>src/*,pom.xml</includes>
                    <checkoutDirectory>./</checkoutDirectory> 
                 </configuration> 
                 <goals> 
                   <goal>checkin</goal> 
                   <goal>checkout</goal> 
                   <goal>update</goal> 
                   <goal>add</goal> 
                   <goal>validate</goal> 
                 </goals> 
               </execution>
             </executions> 
           </plugin> 
         </plugins> 
       </pluginManagement> 
     </build> 
   <distributionManagement> 
     <site> 
       <id>apache.website</id> 
         <url>scp://people.apache.org/www/maven.apache.org/scm/maven-scm-plugin</url> 
     </site> 
     <repository> 
       <id>releases</id>
       <url>http://192.168.10.6:8081/nexus/content/repositories/releases</url> 
     </repository>
     <snapshotRepository> 
       <id>snapshots</id> 
       <url>http://192.168.10.6:8081/nexus/content/repositories/snapshots</url> 
     </snapshotRepository> 
  </distributionManagement> 
</project>

4.0.0 
com.ftad.common.mtest
mtest
1.0-快照
罐子
mtesthttp://maven.apache.org 
众合广告 
UTF-
scm:svn:https://192.168.10.44/svn/FTMobileAdNetwork/trunk/personal/xuhuiw/mvntest/mtest/
scm:svn:https://192.168.10.44/svn/FTMobileAdNetwork/trunk/personal/xuhuiw/mvntest/mtest/ 
朱尼特
朱尼特
4.7
org.apache.maven.plugins
maven scm插件
1.5
王旭辉
徐汇
./ 
目标
src/*,pom.xml
./ 
预处理scm
src/*,pom.xml
./ 
签到
结账
更新
添加
验证
apache.com
scp://people.apache.org/www/maven.apache.org/scm/maven-scm-plugin 
释放
http://192.168.10.6:8081/nexus/content/repositories/releases 
快照
http://192.168.10.6:8081/nexus/content/repositories/snapshots 
重要的部分是:

svn: 'E:\workspace\mtest' is not a working copy

因此,请确保您的Maven任务在SVN工作副本中执行。

执行scm:checkin的目录需要是一个SVN工作目录,这意味着您应该在该目录中有一个“.SVN”,其中包含正确的内容(.SVN是包含已下载原始文件的SVN admin目录)

检查.svn目录是否存在或是否为空(我发现在签出执行配置中使用“includes=*”时,maven会清除.svn目录),这导致后续的scm:checkin失败。在您的例子中,因为您使用的是“includes=src/*,pom.xml”,所以您的.svn目录可能根本不存在

要解决这个问题,您可以先在maven scm插件中定义签出执行(不使用includes),然后为添加/检查定义单独的执行。这里有一个pom.xml来执行scm:checkout、curl下载,然后是scm:checkin

根据编辑帮助尝试添加您的帖子。分开:我的问题是什么(纯文本),堆栈跟踪是什么(缩进4个空格),POM是什么(缩进4个空格)。@mliebelt:同意。我试图在里面添加一些问题的假象;)注意:最新的博客()提到:“对网站的新更改正在进行中。例如,不再有重复的标题,也不再有“此处代码。您修复。”问题将被允许。“这是一个非常接近的问题。如何确保我的工作目录复制到svn目录,我使用maven创建项目,你需要做什么do@user958420我对Maven scm任务了解不够,但由于basedir基于当前目录“.”,请尝试从SVN工作树执行Maven repo。我的SVN树---trunk---personal---xuhuiw---mvntest---mtest