Maven 和颠覆
我正在做 Maven 和 Subversion 方面的工作。
我创建了一个 Maven 项目。现在我想将它指向我的存储库(由 TortoiseSVN 创建)。我在 关于 Maven 和 Subversion 的教程中读到 我应该更改 pom.xml
文件。按照这些说明,我添加了一个 scm
标记,如下所示:
<scm>
<connection>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</connection>
<developerConnection>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</developerConnection>
<url>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</url>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>svn+ssh://file:///E:/my-app-reposs</tagBase>
</configuration>
</plugin>
</plugins>
</build>
但是,当我尝试 mvn release:prepare
时,我收到一个错误:
fail to execute goal org.apache.maven.plugins
可能会发生什么在?
I am doing work on Maven and Subversion.
I have created a maven project. Now I want to point it to my repository (created by TortoiseSVN). I read in a tutorial on Maven and Subversion that I should change the pom.xml
file. Following these instructions, I have added an scm
tag, like this:
<scm>
<connection>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</connection>
<developerConnection>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</developerConnection>
<url>scm:svn:svn+ssh://file:///E:/my-app-repos/trunk</url>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>svn+ssh://file:///E:/my-app-reposs</tagBase>
</configuration>
</plugin>
</plugins>
</build>
But then, when I a try to mvn release:prepare
, I get an error:
fail to execute goal org.apache.maven.plugins
What could be going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
发布评论
评论(4)
要走干脆点2024-10-28 13:03:15
您应该删除 svn+ssh 并仅保留文件,这是要使用的协议,因为您访问本地存储库“文件”协议就足够了。
scm:svn:file:///E:/my-app-repos/trunk
::
~没有更多了~
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
正如其他人提到的,您的网址不正确。您有
ssh+svn://file:///
。它应该是svn://
、ssh+svn://
、http://
、https://< /code> 或
file:///
。但是,我注意到您的存储库似乎位于共享驱动器(驱动器 E:)上。如果不止一个人使用此 Subversion 存储库,您不应使用
file://
协议。事实上,如果没有必要,我从来不会使用它。使用 svnserve 启动 SVN 服务器非常简单。查看 VisualSVN 服务器。它是一个商业产品,但有免费版本。它将设置一个 Apache httpd 服务器,并为您提供一种配置该服务器的方法,包括设置用户帐户。然后,每个人都可以使用
http://
访问存储库。问题是,使用
file:///
协议意味着存储库必须由组中的每个人读取/写入。这意味着任何人都可以直接操作存储库,而无需通过前端。另外,您最终可能会遇到多人尝试同时创建修订版,这可能会完全搞乱您的整个存储库。如果驱动器 E: 是共享驱动器,请勿使用
file:///
。相反,请转到该驱动器所在的 Windows 计算机,然后运行 svnserve
或VisualSVN Server
。您可以尝试自己安装 Apache httpd,但这在 Unix 上是一个棘手的建议,在 Windows 上则非常困难。As others have mentioned, you have a bad URL. You have
ssh+svn://file:///
. It should either besvn://
,ssh+svn://
,http://
,https://
, orfile:///
.However, I noticed that it appears your repository is on a shared drive (drive E:). If more than one person is using this Subversion repository, you should not be using the
file://
protocol. In fact, I never use it if I don't have to. It's easy enough to start an SVN server usingsvnserve
.Take a look at VisualSVN Server. It's a commercial product, but there's a free version. It will setup an Apache httpd server and give you a way of configuring that server including setting up user accounts. Then, everyone can access the repository using
http://
.The problem is that using the
file:///
protocol means that the repository has to be read/writeable by everyone in your group. That means anyone can directly manipulate the repository without going through the front end. Plus, you can end up with multiple people attempting to create a revision at the same time, and that can totally mess up your entire repository.If Drive E: is a shared drive, don't use
file:///
. Instead, go to the Windows machine where this drive is located, and run eithersvnserve
orVisualSVN Server
. You can try installing Apache httpd yourself, but it's a tricky proposition on Unix, and very difficult on Windows.