4
POM 파일에서 다음 설정이 있습니다. 그러나 'SVN 파일 잠김'메시지와 함께 빌드 스크립트가 실패합니다. 조건부 체크 아웃을 수행하는 다른 방법이 있습니다. 프로젝트가 이미 체크 아웃 된 경우 프로젝트가 아닌 경우에만 업데이트하고 싶습니다. 체크 아웃하면 코드를 확인해야하며 업데이트하지 않아야합니다. 미리 감사드립니다.조건부 체크 아웃을위한 Maven 또는 SVN에서의 업데이트 설정?
<!-- Initial check out of (will not do anything if directory already there) -->
<execution>
<id>check-out-project</id>
<phase>generate-sources</phase>
<goals>
<goal>checkout</goal>
</goals>
<configuration>
<checkoutDirectory>${project.build.directory}/project</checkoutDirectory>
<connectionUrl>scm:svn:http://XX:XX/svn/repos/${XX}</connectionUrl>
<username>${svn.username}</username>
<password>${svn.password}</password>
<skipCheckoutIfExists>true</skipCheckoutIfExists>
</configuration>
</execution>
<!-- Update project (if directory was already there) -->
<execution>
<id>update-project</id>
<phase>generate-sources</phase>
<goals>
<goal>update</goal>
</goals>
<configuration>
<basedir>${project.build.directory}/project</basedir>
<connectionUrl>scm:svn:http://XXX:XXX/svn/repos/${project}</connectionUrl>
<username>${svn.username}</username>
<password>${svn.password}</password>
<revisionKey>project.revision</revisionKey>
</configuration>
</execution>
오류 로그 받는다는을 실행 한 후이 실행 한 후
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xxxxxx.and.xxxxxx 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-xxxxxx-xxxxxx) @ xxxxxx.and.
xxxxxx ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-sat) @ xxxxxx.and.xxxxxx ---
[INFO]
[INFO] --- maven-scm-plugin:1.4:checkout (check-out-xxxxxx) @ xxxxxx.and.xxxxxx --
-
[INFO] Removing x:\xxxx\xxxx\target\xxxxxx
[INFO] Executing: cmd.exe /X /C "svn --username xxxx --password ***** --no-aut
h-cache --non-interactive checkout http://xxxx:xxx/svn/repos/xxxx/xxx x:\
projects\xxxx\target\xxxxxx"
[INFO] Working directory: x:\xxxx\xxxx\target
[INFO]
[INFO] --- maven-scm-plugin:1.4:update (update-xxxxxx) @ xxxxxx.and.xxxxxx ---
[INFO] Executing: cmd.exe /X /C "svn --username xxxx --password ***** --no-aut
h-cache --non-interactive update x:\xxxx\xxx\target\xxxxxx"
[INFO] Working directory: x:\xxx\xxx\target\xxxxxx
[INFO] Svn command failed due to some locks in working copy. We try to run a 'sv
n cleanup'.
[INFO] Executing: cmd.exe /X /C "svn"
[INFO] Working directory: x:\xxx\xxxx\target\xxxxxx
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: Working copy 'x:\xxxx\xxxx\target\xxxxxx' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
Type 'svn help' for usage.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8:03.303s
[INFO] Finished at: Thu Apr 28 17:24:50 BST 2011
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.4:upd
ate (update-xxxxxx) on project xxxxxx.and.xxxxxx: Command failed.The svn command f
ailed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
maven log aft의 관련 부분을 게시 할 수 있습니까? 내가 mvn -e을 실행 중입니까? –
Raghuram
로그 메시지를 추가했습니다. – MAAN
작업 복사본의 일부 잠금 때문에'[INFO] Svn 명령이 실패했습니다. 우리는 ' n cleanup'을 실행하려고합니다. 작업 복사본이 다른 클라이언트와 같은 paralllel에 액세스 한 것처럼 보입니다. – khmarbaise