7

当我尝试在 net beans IDE 上构建我的 maven 应用程序时,出现此错误,请帮助我。

Checking for local modifications: skipped.
Executing: cmd.exe /X /C "svn --non-interactive update D:\server"
Working directory: D:\server
Provider message:
The svn command failed.
Command output:
'svn' is not recognized as an internal or external command,
operable program or batch file.

------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.070s
Finished at: Mon Dec 17 19:24:19 IST 2012
Final Memory: 15M/175M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.1:create (default) on project red5-server: Couldn't update project. Error! -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
4

2 回答 2

13

我看到你正在执行这一行:

cmd.exe /X /C "svn --non-interactive update D:\server

这意味着在 %PATH% 变量中设置的任何目录中都没有svn.batsvn找到。

你的 Windows 系统上安装了 Subversion 吗?如果您使用了 Subversion 的 CollabNet 版本,它应该会自动更新您的 PATH 以C:\Program Files\Subversion\bin在您的 %PATH% 变量中包含或类似的内容。如果没有,请打开系统控制面板,转到高级选项卡,然后单击设置环境变量。找到PATH环境变量,添加svn.exe程序所在的目录。

如果您尚未安装 Subversion,请从 CollabNet、SlikSVN 或 Wandisco 安装它。

于 2012-12-17T14:43:51.837 回答
10

您也许应该使用javasvn提供程序。这样,您的构建/发布将不依赖于 SVN 客户端的本地安装和设置环境变量。

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.2.2</version>
        <dependencies>
            <dependency>    
                <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                <artifactId>maven-scm-provider-svnjava</artifactId>
                <version>1.6</version>
            </dependency>
        </dependencies>
        <configuration>
            <providerImplementations>
                <svn>javasvn</svn>
            </providerImplementations>
            <goals>deploy</goals>
            <tagBase>https://svn.somedomain/project/tags</tagBase>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <tagNameFormat>project-@{project.version}</tagNameFormat>
        </configuration>
</plugin>
于 2013-04-03T10:57:02.417 回答