Я не могу заставить ни FTP, ни MySQL Task работать на Ant 1.8.2
на Mac OSX 10.7
.
Я перепробовал все, что нашел на этом сайте, и все, что нашел через Google.
Кажется, мне нужен драйвер JDCB
для задачи MySQL
, но я не понимаю, как его установить или куда его поставить.
Для задачи FTP нужна библиотека ant commons, которую я скопировал в папку lib моей установки ant.
Библиотека загружается, как говорит режим диагностики, но она не работает.
build.xml
<?xml version="1.0" encoding="UTF-8"?> <project name="Testjob" default="build"> <target name="build" depends="sql,ftp"/>
<property name="sql.driver" value="com.mysql.jdbc.Driver"/> <property name="sql.url" value="jdbc:mysql://xxx.de"/> <property name="sql.user" value="xxx"/> <property name="sql.pass" value="xxx"/>
<target name="sql">
<sql driver="${sql.driver}"
url="${sql.url}"
userid="${sql.user}"
password="${sql.pass}" >
<transaction src="client.sql"/>
<transaction src="project.sql"/>
</sql> </target>
<target name="ftp" description="FTP">
<ftp server="ftp.xxx.de"
remotedir="incoming"
userid="xxx"
password="xxx"
depends="yes">
<fileset dir="*"/>
</ftp> </target> </project>
FTP-Error
BUILD FAILED
/Users/Shared/Jenkins/Home/jobs/Testjob/workspace/build.xml:25: Problem: failed to create task or type ftp
Cause: the class org.apache.tools.ant.taskdefs.optional.net.FTP was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/share/ant/lib
-/var/root/.ant/lib
-a directory added on the command line with the -lib argument
Do not panic, this is a common problem.
The commonest cause is a missing JAR.
This is not a bug; it is a configuration problem
SQL-Error
BUILD FAILED
/Users/Shared/Jenkins/Home/jobs/Testjob/workspace/build.xml:19: Class Not Found: JDBC driver com.mysql.jdbc.Driver could not be loaded
Диагностика
------- Ant diagnostics report -------Apache Ant(TM) version 1.8.2 compiled on December 20 2010
------------------------------------------- Implementation Version
------------------------------------------- core tasks : 1.8.2 in file:/Users/alexanderfeil/apache-ant/lib/ant.jar
------------------------------------------- ANT PROPERTIES
------------------------------------------- ant.version: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 ant.java.version:
1.6 Is this the Apache Harmony VM? no Is this the Kaffe VM? no Is this gij/gcj? no ant.core.lib: /Users/alexanderfeil/apache-ant/lib/ant.jar
ant.home: /Users/alexanderfeil/apache-ant
------------------------------------------- ANT_HOME/lib jar listing
------------------------------------------- ant.home: /Users/alexanderfeil/apache-ant ant-antlr.jar (5748 bytes)
ant-apache-bcel.jar (8746 bytes) ant-apache-bsf.jar (3931 bytes)
ant-apache-log4j.jar (3059 bytes) ant-apache-oro.jar (39638 bytes)
ant-apache-regexp.jar (3761 bytes) ant-apache-resolver.jar (4084
bytes) ant-apache-xalan2.jar (2295 bytes) ant-commons-logging.jar
(3913 bytes) ant-commons-net-1.8.2.jar (85511 bytes)
ant-commons-net.jar (85511 bytes) ant-jai.jar (22265 bytes)
ant-javamail.jar (7960 bytes) ant-jdepend.jar (8222 bytes) ant-jmf.jar
(6739 bytes) ant-jsch.jar (40175 bytes) ant-junit.jar (102220 bytes)
ant-junit4.jar (7120 bytes) ant-launcher.jar (12322 bytes)
ant-netrexx.jar (10392 bytes) ant-swing.jar (7555 bytes)
ant-testutil.jar (15201 bytes) ant.jar (1933743 bytes)
------------------------------------------- USER_HOME/.ant/lib jar listing
------------------------------------------- user.home: /Users/alexanderfeil ant-commons-net-1.8.2.jar (85511 bytes)
------------------------------------------- Tasks availability
------------------------------------------- sshexec : Missing dependency com.jcraft.jsch.Logger wlrun : Not Available (the
implementation class is not present) scp : Missing dependency
com.jcraft.jsch.Logger stlist : Not Available (the implementation
class is not present) sshsession : Missing dependency
com.jcraft.jsch.Logger starteam : Not Available (the implementation
class is not present) stlabel : Not Available (the implementation
class is not present) jdepend : Missing dependency
jdepend.xmlui.JDepend stcheckin : Not Available (the implementation
class is not present) stcheckout : Not Available (the implementation
class is not present) ejbc : Not Available (the implementation class
is not present) wlstop : Not Available (the implementation class is
not present) ddcreator : Not Available (the implementation class is
not present) A task being missing/unavailable should only matter if
you are trying to use it
------------------------------------------- org.apache.env.Which diagnostics
------------------------------------------- Not available. Download it at http://xml.apache.org/commons/
------------------------------------------- XML Parser information
------------------------------------------- XML Parser : com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl XML Parser
Location: unknown Namespace-aware parser :
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
Namespace-aware parser Location: unknown
------------------------------------------- XSLT Processor information
------------------------------------------- XSLT Processor : com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl XSLT
Processor Location: unknown
------------------------------------------- System properties
------------------------------------------- java.runtime.name : Java(TM) SE Runtime Environment sun.boot.library.path :
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries
java.vm.version : 20.4-b02-402 awt.nativeDoubleBuffering : true
ant.library.dir : /Users/alexanderfeil/apache-ant/lib gopherProxySet :
false mrj.build : 11M3527 java.vm.vendor : Apple Inc. java.vendor.url
: http://www.apple.com/ path.separator : : java.vm.name : Java
HotSpot(TM) 64-Bit Server VM file.encoding.pkg : sun.io user.country :
US sun.java.launcher : SUN_STANDARD sun.os.patch.level : unknown
java.vm.specification.name : Java Virtual Machine Specification
user.dir : /Users/alexanderfeil/apache-ant java.runtime.version :
1.6.0_29-b11-402-11M3527 java.awt.graphicsenv : apple.awt.CGraphicsEnvironment java.endorsed.dirs :
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/endorsed
os.arch : x86_64 java.io.tmpdir :
/var/folders/l7/64z3f7sd77j9g_b7gwfbrqqh0000gn/T/ line.separator :
java.vm.specification.vendor : Sun Microsystems Inc. os.name : Mac OS
X ant.home : /Users/alexanderfeil/apache-ant sun.jnu.encoding :
MacRoman java.library.path :
.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
java.specification.name : Java Platform API Specification
java.class.version : 50.0 sun.management.compiler : HotSpot 64-Bit
Tiered Compilers os.version : 10.7.2 http.nonProxyHosts :
local|*.local|169.254/16|*.169.254/16 user.home : /Users/alexanderfeil
user.timezone : Europe/Berlin java.awt.printerjob :
apple.awt.CPrinterJob java.specification.version : 1.6 file.encoding :
MacRoman user.name : alexanderfeil java.class.path :
/Users/alexanderfeil/apache-ant/lib/ant-launcher.jar:/Users/alexanderfeil/.ant/lib/ant-commons-net-1.8.2.jar:/Users/alexanderfeil/apache-ant/lib/ant-antlr.jar:/Users/alexanderfeil/apache-ant/lib/ant-apache-bcel.jar:/Users/alexanderfeil/apache-ant/lib/ant-apache-bsf.jar:/Users/alexanderfeil/apache-ant/lib/ant-apache-log4j.jar:/Users/alexanderfeil/apache-ant/lib/ant-apache-oro.jar:/Users/alexanderfeil/apache-ant/lib/ant-apache-regexp.jar:/Users/alexanderfeil/apache-ant/lib/ant-apache-resolver.jar:/Users/alexanderfeil/apache-ant/lib/ant-apache-xalan2.jar:/Users/alexanderfeil/apache-ant/lib/ant-commons-logging.jar:/Users/alexanderfeil/apache-ant/lib/ant-commons-net-1.8.2.jar:/Users/alexanderfeil/apache-ant/lib/ant-commons-net.jar:/Users/alexanderfeil/apache-ant/lib/ant-jai.jar:/Users/alexanderfeil/apache-ant/lib/ant-javamail.jar:/Users/alexanderfeil/apache-ant/lib/ant-jdepend.jar:/Users/alexanderfeil/apache-ant/lib/ant-jmf.jar:/Users/alexanderfeil/apache-ant/lib/ant-jsch.jar:/Users/alexanderfeil/apache-ant/lib/ant-junit.jar:/Users/alexanderfeil/apache-ant/lib/ant-junit4.jar:/Users/alexanderfeil/apache-ant/lib/ant-launcher.jar:/Users/alexanderfeil/apache-ant/lib/ant-netrexx.jar:/Users/alexanderfeil/apache-ant/lib/ant-swing.jar:/Users/alexanderfeil/apache-ant/lib/ant-testutil.jar:/Users/alexanderfeil/apache-ant/lib/ant.jar
java.vm.specification.version : 1.0 sun.arch.data.model : 64 java.home
: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
sun.java.command : org.apache.tools.ant.launch.Launcher -cp
-diagnostics java.specification.vendor : Sun Microsystems Inc. user.language : en awt.toolkit : apple.awt.CToolkit java.vm.info :
mixed mode java.version : 1.6.0_29 java.ext.dirs :
/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext
sun.boot.class.path :
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/sunrsasign.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar
java.vendor : Apple Inc. file.separator : / java.vendor.url.bug :
http://bugreport.apple.com/ sun.cpu.endian : little
sun.io.unicode.encoding : UnicodeLittle mrj.version :
1070.1.6.0_29-402 socksNonProxyHosts : local|*.local|169.254/16|*.169.254/16 jikes.class.path :
:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/alt-rt.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/alt-string.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/charsets.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/dt.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/jconsole.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/management-agent.jar:/System/Library/Frameworks/JavaVM.framework/Home/../Classes/ui.jar
ftp.nonProxyHosts : local|*.local|169.254/16|*.169.254/16
sun.cpu.isalist :
------------------------------------------- Temp dir
------------------------------------------- Temp dir is /var/folders/l7/64z3f7sd77j9g_b7gwfbrqqh0000gn/T/ Temp dir is
writeable Temp dir alignment with system clock is -377 ms
------------------------------------------- Locale information
------------------------------------------- Timezone Central European Time offset=3600000
------------------------------------------- Proxy information
------------------------------------------- http.nonProxyHosts = "local|*.local|169.254/16|*.169.254/16" ftp.nonProxyHosts =
"local|*.local|169.254/16|*.169.254/16" Java1.5+ proxy settings:
Direct connection