Calling SVN commands from a java program

I want to invoke SVN (update, commit) commands from a java program. any help?

SVN: turtle SVN Environment: the java program will run on the jBoss server.

+7
source share
6 answers

It really is a very bad idea to use the SVN GUI client from the application server. Although TortoiseSVN may be a script , it is still a graphical application, and an unexpected situation may cause a dialog on your server (and some tasks can always open a dialog).

This is much better than using the Java implementation of SVN, for example SvnKit - then you can work with a good Java API and your question becomes debatable.

+8
source

Of course, there are several libraries that do this work. Personally, I would either go with SVNKit , or using Maven SCM (the latter is less powerful, but more portable).

+5
source

It is probably easiest to use SVNKit , which is Java's own implementation of SVN, if you can get the version according to your -line command, if you need to split working copies between them.

This is licensed under copy-left-ish, but as long as you use the code on your own server and don't distribute it, this should be fine (but IANAL, etc.).

+4
source

You can use SVNKit , a java library for interacting with SVN workspaces. It is used by IntelliJ and Eclipse plugins to support SVN.

+2
source

Quick Google Search http://svnkit.com/

+2
source

If you do this at work and are not working on an open source project, I would move away from SVNKit. They call themselves open source, but will charge you if you use SVNKit for commercial purposes .

Another good option is Apache Maven SCM (source code manager). Documents are a little unstable, but it is really open source. Here is a link to their page with some SVN examples .

0
source

All Articles