特殊:Badtitle/NS100:SubversionAndJavahl
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/SubversionAndJavahl }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/af | • {{#if: UbuntuHelp:SubversionAndJavahl|Afrikaans| [[::SubversionAndJavahl/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/ar | • {{#if: UbuntuHelp:SubversionAndJavahl|العربية| [[::SubversionAndJavahl/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/az | • {{#if: UbuntuHelp:SubversionAndJavahl|azərbaycanca| [[::SubversionAndJavahl/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/bcc | • {{#if: UbuntuHelp:SubversionAndJavahl|جهلسری بلوچی| [[::SubversionAndJavahl/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/bg | • {{#if: UbuntuHelp:SubversionAndJavahl|български| [[::SubversionAndJavahl/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/br | • {{#if: UbuntuHelp:SubversionAndJavahl|brezhoneg| [[::SubversionAndJavahl/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/ca | • {{#if: UbuntuHelp:SubversionAndJavahl|català| [[::SubversionAndJavahl/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/cs | • {{#if: UbuntuHelp:SubversionAndJavahl|čeština| [[::SubversionAndJavahl/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/de | • {{#if: UbuntuHelp:SubversionAndJavahl|Deutsch| [[::SubversionAndJavahl/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/el | • {{#if: UbuntuHelp:SubversionAndJavahl|Ελληνικά| [[::SubversionAndJavahl/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/es | • {{#if: UbuntuHelp:SubversionAndJavahl|español| [[::SubversionAndJavahl/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/fa | • {{#if: UbuntuHelp:SubversionAndJavahl|فارسی| [[::SubversionAndJavahl/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/fi | • {{#if: UbuntuHelp:SubversionAndJavahl|suomi| [[::SubversionAndJavahl/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/fr | • {{#if: UbuntuHelp:SubversionAndJavahl|français| [[::SubversionAndJavahl/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/gu | • {{#if: UbuntuHelp:SubversionAndJavahl|ગુજરાતી| [[::SubversionAndJavahl/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/he | • {{#if: UbuntuHelp:SubversionAndJavahl|עברית| [[::SubversionAndJavahl/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/hu | • {{#if: UbuntuHelp:SubversionAndJavahl|magyar| [[::SubversionAndJavahl/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/id | • {{#if: UbuntuHelp:SubversionAndJavahl|Bahasa Indonesia| [[::SubversionAndJavahl/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/it | • {{#if: UbuntuHelp:SubversionAndJavahl|italiano| [[::SubversionAndJavahl/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/ja | • {{#if: UbuntuHelp:SubversionAndJavahl|日本語| [[::SubversionAndJavahl/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/ko | • {{#if: UbuntuHelp:SubversionAndJavahl|한국어| [[::SubversionAndJavahl/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/ksh | • {{#if: UbuntuHelp:SubversionAndJavahl|Ripoarisch| [[::SubversionAndJavahl/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/mr | • {{#if: UbuntuHelp:SubversionAndJavahl|मराठी| [[::SubversionAndJavahl/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/ms | • {{#if: UbuntuHelp:SubversionAndJavahl|Bahasa Melayu| [[::SubversionAndJavahl/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/nl | • {{#if: UbuntuHelp:SubversionAndJavahl|Nederlands| [[::SubversionAndJavahl/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/no | • {{#if: UbuntuHelp:SubversionAndJavahl|norsk| [[::SubversionAndJavahl/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/oc | • {{#if: UbuntuHelp:SubversionAndJavahl|occitan| [[::SubversionAndJavahl/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/pl | • {{#if: UbuntuHelp:SubversionAndJavahl|polski| [[::SubversionAndJavahl/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/pt | • {{#if: UbuntuHelp:SubversionAndJavahl|português| [[::SubversionAndJavahl/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/ro | • {{#if: UbuntuHelp:SubversionAndJavahl|română| [[::SubversionAndJavahl/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/ru | • {{#if: UbuntuHelp:SubversionAndJavahl|русский| [[::SubversionAndJavahl/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/si | • {{#if: UbuntuHelp:SubversionAndJavahl|සිංහල| [[::SubversionAndJavahl/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/sq | • {{#if: UbuntuHelp:SubversionAndJavahl|shqip| [[::SubversionAndJavahl/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/sr | • {{#if: UbuntuHelp:SubversionAndJavahl|српски / srpski| [[::SubversionAndJavahl/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/sv | • {{#if: UbuntuHelp:SubversionAndJavahl|svenska| [[::SubversionAndJavahl/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/th | • {{#if: UbuntuHelp:SubversionAndJavahl|ไทย| [[::SubversionAndJavahl/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/tr | • {{#if: UbuntuHelp:SubversionAndJavahl|Türkçe| [[::SubversionAndJavahl/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/vi | • {{#if: UbuntuHelp:SubversionAndJavahl|Tiếng Việt| [[::SubversionAndJavahl/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/yue | • {{#if: UbuntuHelp:SubversionAndJavahl|粵語| [[::SubversionAndJavahl/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/zh | • {{#if: UbuntuHelp:SubversionAndJavahl|中文| [[::SubversionAndJavahl/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/zh-hans | • {{#if: UbuntuHelp:SubversionAndJavahl|中文(简体)| [[::SubversionAndJavahl/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SubversionAndJavahl | UbuntuHelp:SubversionAndJavahl | {{#if: | :}}SubversionAndJavahl}}/zh-hant | • {{#if: UbuntuHelp:SubversionAndJavahl|中文(繁體)| [[::SubversionAndJavahl/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:SubversionAndJavahl|:SubversionAndJavahl|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :SubversionAndJavahl/zh | | {{#ifexist: SubversionAndJavahl/zh | | {{#ifeq: {{#titleparts:SubversionAndJavahl|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:SubversionAndJavahl|1|-1|}} | zh | | }}
Subversion and Javahl
Javahl is the subversion <-> java library. This installation method doesn't work, but here is my output. I hope somebody will be able to complete it and make it work. I tried to follow the first part of this Howto install SvnUp, but javac doesn't find the sources. I have Java 1.5 installed. Anyone ?
- Go in your build directory, I use ~/builds
- download subversion sources :
apt-get source subversion
- extract the sources :
tar xzf subversion_1.0.9.orig.tar.gz
- go in the folder and extract again :
tar zxvf subversion_1.0.9.tar.gz
- go in the folder and run :
./autogen.sh
- run :
./configure --prefix=/usr
- run :
make
- go in subfolder :
subversion/bindings/java/javahl
- run again :
./autogen.sh
- run (not sure if it's right) :
./configure --prefix=/usr --with-jdk=/usr/lib/j2sdk1.5-sun
- run :
make
This is where it doesn't work, here is the output :
Making all in src make[1]: Entering directory `/home/zimba/builds/subversion-1.0.9/subversion-1.0.9/subversion/bindings/java/javahl/src' CLASSPATH=../cls:./../cls:$CLASSPATH /usr/lib/j2sdk1.5-sun/bin/javac -d ../cls javac: no source files Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath <path> Specify where to find user class files -cp <path> Specify where to find user class files -sourcepath <path> Specify where to find input source files -bootclasspath <path> Override location of bootstrap class files -extdirs <dirs> Override location of installed extensions -endorseddirs <dirs> Override location of endorsed standards path -d <directory> Specify where to place generated class files -encoding <encoding> Specify character encoding used by source files -source <release> Provide source compatibility with specified release -target <release> Generate class files for specific VM version -version Version information -help Print a synopsis of standard options -X Print a synopsis of nonstandard options -J<flag> Pass <flag> directly to the runtime system make[1]: *** [class.stamp] Error 2 make[1]: Leaving directory `/home/zimba/builds/subversion-1.0.9/subversion-1.0.9/subversion/bindings/java/javahl/src' make: *** [all-recursive] Error 1
How I did it
Okay, this is NOT Ubuntu Linux (I'm using debian unstable) so forgive me if this doesn't work for you. Here are the steps I used:
- Go into your build directory.
apt-get build-dep subversion
get the packages you need to build subversionapt-get source subversion
get the sourcescd subversion-1.0.9/
cd into the directory (apt-get should have created this for you)dpkg-buildpackage
build the package... this takes a LONG TIME, since they have so many tests to verify the build worked correctlycd build-tree/subversion-1.0.9/subversion/bindings/java/javahl
This is where the javahl bindings are./autogen.sh
I used automake-1.8! apt-get that if you want your build to be as close to mine as possible!./configure --prefix=/usr/local/svnjavahl --with-jdk=/usr/lib/j2sdk1.5-sun
You can obviously specify your own prefix and jdk. I specified that one because I don't like locally-installed libraries intermingling with the debian-installed libraries.make
Build it.make install
Install it.
(Note that I installed it to a non-standard location. If you want to use the library from that location, you need to add /usr/local/svnjavahl/lib to your LD_LIBRARY_PATH environment variable.) I can confirm that this version works by running a small test program. I can NOT, however, get it to work in eclipse. When I try, I get this error (once for each project that uses subversion):
Unhandled event loop exception Reason: ctNative
So, for now I'm just leaving the Subclipse plugin to use the command line. It's slow, but at least it actually does something.
If I understand well, the problem you've got is because Subclipse is built against some particular version of javahl and subversion (see http://subclipse.tigris.org/) Current version should work better with subversion 1.1+ Thanks a lot for your help, I hope we'll soon have something working well.
Hmm, I managed to build a subversion 1.1.1 w/ javahl library (using the packages out of debian 'experimental') but I still got the same problem. Sad. Thanks for the tip on that, though, but it seems like I'm having bigger problems. From EmilWilmanski Mon Dec 13 11:29:57 +0000 2004 From: Emil Wilmanski Date: Mon, 13 Dec 2004 11:29:57 +0000 Subject: I done it... Message-ID: <[email protected]> Big thanx for your article... I need javahl to eclipse plugin... How I do this: We nead new version of subversion (1.1.1 from experimental source) edit subversion-1.1.1/debian/rules line 39 add "--enable-javahl" (to add configure option to confflags, dont forget "\" at the end of prev. line) compile all using dpkg-buildpackage after it cd subversion-1.1.1/build-tree/subversion-1.1.1 make javahl I do this without problems... in subversion-1.1.1/subversion/bindings/java/javahl/native/.lib we have javahl libs :) From DagSverreSeljebotn Tue Jan 11 08:36:12 +0000 2005 From: Dag Sverre Seljebotn Date: Tue, 11 Jan 2005 08:36:12 +0000 Subject: Native Java Message-ID: <20050111083612+0000@https://www.ubuntulinux.org> I've had success with the Pure Java Subversion Client - http://tmate.org/svn/ Some small glitches, to import a project through the svn view do: - Right-click, import it. - It will (may?) fail. Go back to svn view, find the rep that was now opened for that project, and reenter login information. - It will now succed, but a manual refresh of the project might be necesarry for any files to appear. Then reopen the project to hide the .svn-folders...
working subversion with javahl
From MaciejFreudenheim Sun Mar 13 02:03:35 +0000 2005
From: Maciej Freudenheim
Date: Sun, 13 Mar 2005 02:03:35 +0000
Subject: Everything works (using native javahl)!
Message-ID: <20050313020335+0000@https://www.ubuntulinux.org>
OK, everything works now perfectly, here is what I did:
1. apt-get source subversion
2. cd subversion-1.1.1
3. edit debian/rules (f.e.: gedit debian/rules
)
AND change:
ENABLE_JAVAHL=no
to:
ENABLE_JAVAHL=yes
at the beginning of the file. ALSO search string "with-jdk" which is somewhere below, and make sure it points to your JDK. In my situation, it is:
confflags += --enable-javahl --without-jikes --with-jdk=/usr/lib/sun-j2sdk1.5.0
4. sudo dpkg-buildpackage
If it stops complaining about missing dependencies just install them with sudo apt-get install and relaunch dpkg-buildpackage :)
It takes long time to finish.
5. cd debian/libsvn-javahl/usr/
6. sudo cp -a * /usr
I know, it's ugly way, but i haven't time to study how to build proper deb package
7. sudo ldconfig
8. launch eclipse with: $PATH_TO_YOUR_ECLIPSE_DIRECTORY/eclipse -vmargs -Djava.library.path=/usr/lib
It's important to set that java.library.path property to /usr/lib, without it Eclipse wouldn't find libsvnjavahl*.so we just installed into /usr/lib 9. install subversion plugin in Eclipse normally, like described in the beginning of that Wiki page
10. restart eclipse: everything should work, you should be able to chose javahl in preferences->team->svn :)
From JojoPaderes Mon May 9 03:51:33 +0100 2005 From: Jojo Paderes Date: Mon, 09 May 2005 03:51:33 +0100 Subject: Problem compiling Subversion with Javahl Message-ID: <20050509035133+0100@https://www.ubuntulinux.org> Thanks Maciej for the nice article! I'm following the steps for compiling Subversion with Javahl support but got stuck at step #4 which is building the Debian package using dpkg-buildpackage command. I encountered an error while building the package using dpkg-buildpackage command:
checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking how to run the C++ preprocessor... /lib/cpp configure: error: C++ preprocessor "/lib/cpp" fails sanity check See `config.log' for more details. make: *** [debian/stamp-configure] Error 1
To solve the error C++ preprocessor "/lib/cpp" fails sanity check
while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages
gcc cpp g++
(see InstallingSoftware).
From KrzysztofLangner Fri May 13 22:15:43 +0100 2005 From: Krzysztof Langner Date: Fri, 13 May 2005 22:15:43 +0100 Subject: javahl and JavaSVN Message-ID: <[email protected]> Instead of using javahl It is possible to install JavaSVN from http://tmate.org/svn/. (JavaSVN is a pure java Subversion (SVN) client library). On my computer I have installed:
- Unbuntu 5.04
- JDK 1.5.0_3
- Eclipse 3.0.2
- subversion package
- subclipse plugin
- JavaSVN plugin
and Subversion works fine for me.