Maven and subversion
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 goa开发者_运维技巧l org.apache.maven.plugins
What could be going on?
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.
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.
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
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
精彩评论