Maven 和颠覆

发布于 10-21 13:03 字数 1109 浏览 3 评论 0原文

我正在做 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

好多鱼好多余2024-10-28 13:03:15

正如其他人提到的,您的网址不正确。您有ssh+svn://file:///。它应该是 svn://ssh+svn://http://https://< /code> 或 file:///

但是,我注意到您的存储库似乎位于共享驱动器(驱动器 E:)上。如果不止一个人使用此 Subversion 存储库,您不应使用 file:// 协议。事实上,如果没有必要,我从来不会使用它。使用 svnserve 启动 SVN 服务器非常简单。

查看 VisualSVN 服务器。它是一个商业产品,但有免费版本。它将设置一个 Apache httpd 服务器,并为您提供一种配置该服务器的方法,包括设置用户帐户。然后,每个人都可以使用 http:// 访问存储库。

问题是,使用 file:/// 协议意味着存储库必须由组中的每个人读取/写入。这意味着任何人都可以直接操作存储库,而无需通过前端。另外,您最终可能会遇到多人尝试同时创建修订版,这可能会完全搞乱您的整个存储库。

如果驱动器 E: 是共享驱动器,请勿使用 file:///。相反,请转到该驱动器所在的 Windows 计算机,然后运行 ​​svnserveVisualSVN Server。您可以尝试自己安装 Apache httpd,但这在 Unix 上是一个棘手的建议,在 Windows 上则非常困难。

As others have mentioned, you have a bad URL. You have ssh+svn://file:///. It should either be svn://, ssh+svn://, http://, https://, or file:///.

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 using svnserve.

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 either svnserve or VisualSVN Server. You can try installing Apache httpd yourself, but it's a tricky proposition on Unix, and very difficult on Windows.

浊酒尽余欢2024-10-28 13:03:15

嗯,只是一个猜测,但它可能会失败,因为你使用本地 SVN 服务器。其实我想知道你为什么要这么做?

尝试在 Web 服务器上安装 SVN 存储库。

hmm, just a guess but it probably failed because you use a local SVN server. Actually, I'm wondering why you do that?

Try to install your SVN repo on a web server instead.

清晨说晚安2024-10-28 13:03:15

为什么需要 svn+ssh 协议来连接到本地存储库 (file:///)?您可以尝试删除 svn+ssh 并查看是否有效。请参阅

scm:svn:file://[hostname]/path_to_repository

Why would you need an svn+ssh protocol to connect to a local repository (file:///)? Can you try removing svn+ssh and see if that works. Refer to this.

scm:svn:file://[hostname]/path_to_repository
要走干脆点2024-10-28 13:03:15

您应该删除 svn+ssh 并仅保留文件,这是要使用的协议,因为您访问本地存储库“文件”协议就足够了。

scm:svn:file:///E:/my-app-repos/trunk

::

检查此链接: http://maven.apache.org/scm/plugins/usage .html

You should remove svn+ssh and keep only file, this is the protocol to use, since you are accessing to local repository "file" protocol is enough.

scm:svn:file:///E:/my-app-repos/trunk

::

Check this link: http://maven.apache.org/scm/plugins/usage.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文