2012-11-20 17 views
0

這些問題有相同的問題,但svnAnt任務Ubuntu的失敗,並不能找到javahl,svnkit也不是命令行SVN客戶端

Cannot find javahl, svnkit nor command line svn client although I have command line svn

Cannot find javahl, svnkit nor command line svn client

我使用還沒有提供一個解決方案,我

的Ubuntu 12.10

螞蟻1.8.2

svnAnt 1.3.1

SVN版本1.6

我下載使用apt-get安裝

svnclient

libsvn-java的

我已經設置

JAVA_HOME

ANT_HOME

我加ANT_HOME/bin添加到路徑 我還添加了/ usr/lib目錄/ x86_64的-Linux的GNU/JNI /的路徑,這似乎並沒有被這些地方所使用的庫/常是。

如果我運行命令行螞蟻它失敗:

$ ant compile 
Buildfile: /home/build.xml 

init: 

export: 
    [svn] Missing 'javahl' dependencies on the classpath ! 

BUILD FAILED 
/home/build.xml:28: Cannot find javahl, svnkit nor command line svn client 

Total time: 0 seconds 

如果我添加javahl="false" svnkit="true"屬性,它失敗

$ ant compile 
Buildfile: /home/build.xml 

init: 

export: 
    [svn] Deprecated attribute 'javahl'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead. 
    [svn] Deprecated attribute 'svnkit'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead. 
    [svn] svn: authentication cancelled 
    [svn] svn: authentication cancelled 
    [svn] <Export> failed. 

BUILD FAILED 
/home/build.xml:28:  Can't export 

Total time: 0 seconds 

如果我添加用戶名和密碼的任務SVN標籤它失敗(我使用SVN + SSH和公私密鑰認證正常):

$ ant compile 
Buildfile: /home/build.xml 
username:> 
password:> 

init: 

export: 
    [svn] Deprecated attribute 'javahl'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead. 
    [svn] Deprecated attribute 'svnkit'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead. 
    [svn] Deprecated attribute 'username'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead. 
    [svn] Deprecated attribute 'password'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead. 

BUILD FAILED 
/home/build.xml:34: java.lang.NoClassDefFoundError: com/trilead/ssh2/ServerHostKeyVerifier 
at org.tmatesoft.svn.core.internal.io.svn.SVNSSHConnector.open(SVNSSHConnector.java:89) 
at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.open(SVNConnection.java:74) 
at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.openConnection(SVNRepositoryImpl.java:1242) 
at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getLatestRevision(SVNRepositoryImpl.java:168) 
at org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:482) 
at org.tmatesoft.svn.core.wc.SVNBasicClient.getLocations(SVNBasicClient.java:876) 
at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:534) 
at org.tmatesoft.svn.core.wc.SVNUpdateClient.doExport(SVNUpdateClient.java:1038) 
at org.tmatesoft.svn.core.javahl.SVNClientImpl.doExport(SVNClientImpl.java:898) 
at org.tmatesoft.svn.core.javahl.SVNClientImpl.doExport(SVNClientImpl.java:889) 
at org.tmatesoft.svn.core.javahl.SVNClientImpl.doExport(SVNClientImpl.java:885) 
at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.doExport(AbstractJhlClientAdapter.java:897) 
at org.tigris.subversion.svnant.commands.Export.execute(Unknown Source) 
at org.tigris.subversion.svnant.commands.SvnCommand.executeCommand(Unknown Source) 
at org.tigris.subversion.svnant.SvnTask.executeImpl(Unknown Source) 
at org.tigris.subversion.svnant.SvnTask.execute(Unknown Source) 
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
at org.apache.tools.ant.Task.perform(Task.java:348) 
at org.apache.tools.ant.Target.execute(Target.java:390) 
at org.apache.tools.ant.Target.performTasks(Target.java:411) 
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) 
at org.apache.tools.ant.Project.executeTarget(Project.java:1368) 
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 
at org.apache.tools.ant.Project.executeTargets(Project.java:1251) 
at org.apache.tools.ant.Main.runBuild(Main.java:809) 
at org.apache.tools.ant.Main.startAnt(Main.java:217) 
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) 
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) 
Caused by: java.lang.ClassNotFoundException: com.trilead.ssh2.ServerHostKeyVerifier 
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) 
... 33 more 

Total time: 18 seconds 

回答

0

你做安裝命令行客戶端svnclient),但你沒有告訴螞蟻使用它:

javahl="false" svnkit="false" 

兩個需要被設置爲false,使用命令行客戶端。來自reference

javahl Set to "false" to use command line client interface instead of JNI JavaHL binding. 
     Deprecated. This attribute won't work with SVNANT 1.3.2+ . Use refid for svnSetting instead. 
     Default: true 

svnkit Set to "false" to use command line client interface instead of SVNKit binding. 
     Deprecated. This attribute won't work with SVNANT 1.3.2+ . Use refid for svnSetting instead. 
     Default: false 
相關問題