ANT构建FTP命令失败,由于未解决的依赖奥罗 [英] ANT FTP build command fails due to unresolved oro dependency
问题描述
我想用FTP标签在我的ANT命令从FTP位置接收文件。要启用此我复制雅加达口 - 2.0.8.jar
和 Apache的公地net.jar
在我ANT的lib文件夹。在运行命令我收到以下错误: java.lang.Error:未解决的编译
问题:
I want to use FTP tag in my ANT command to receive files from FTP location. To enable this I copied jakarta-oro-2.0.8.jar
and apache-commons-net.jar
in the lib folder of my ANT. While running the command I get following error: java.lang.Error: Unresolved compilation
problems:
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
Pattern cannot be resolved to a type
MatchResult cannot be resolved to a type
PatternMatcher cannot be resolved to a type
_matcher_ cannot be resolved
Perl5Matcher cannot be resolved to a type
pattern cannot be resolved
Perl5Compiler cannot be resolved to a type
MalformedPatternException cannot be resolved to a type
result cannot be resolved or is not a field
_matcher_ cannot be resolved
pattern cannot be resolved or is not a field
result cannot be resolved or is not a field
_matcher_ cannot be resolved
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
at org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl.<init>(RegexFTPFileEntryParserImpl.java:19)
at org.apache.commons.net.ftp.parser.ConfigurableFTPFileEntryParserImpl.<init>(ConfigurableFTPFileEntryParserImpl.java:57)
at org.apache.commons.net.ftp.parser.UnixFTPEntryParser.<init>(UnixFTPEntryParser.java:136)
at org.apache.commons.net.ftp.parser.UnixFTPEntryParser.<init>(UnixFTPEntryParser.java:119)
at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createUnixFTPEntryParser(DefaultFTPFileEntryParserFactory.java:169)
at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:94)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2359)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2142)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2188)
at org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.forceRemoteSensitivityCheck(FTP.java:695)
at org.apache.tools.ant.taskdefs.optional.net.FTP$FTPDirectoryScanner.scan(FTP.java:372)
at org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles(FTP.java:1738)
at org.apache.tools.ant.taskdefs.optional.net.FTP.transferFiles(FTP.java:1850)
at org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2539)
为什么蚂蚁无法导入破产管理署依赖?
Why Ant fails to import the ORO dependency?
推荐答案
ANT 1.6.5是一个很老的版本的Ant。下面的例子与ANT 1.9.0进行测试:
ANT 1.6.5 is a very old version of ANT. The following example was tested with ANT 1.9.0:
<project name="demo" default="build">
<target name="bootstrap">
<mkdir dir="${user.home}/.ant/lib"/>
<get dest="${user.home}/.ant/lib/commons-net.jar" src="http://search.maven.org/remotecontent?filepath=commons-net/commons-net/3.3/commons-net-3.3.jar"/>
<get dest="${user.home}/.ant/lib/oro.jar" src="http://search.maven.org/remotecontent?filepath=oro/oro/2.0.8/oro-2.0.8.jar"/>
</target>
<target name="build">
<ftp server="ftp.apache.org" userid="anonymous" password="me@myorg.com">
<fileset dir="htdocs/manual"/>
</ftp>
</target>
</project>
在引导目标安装缺少的FTP任务的依赖性进入下一运行时间ANT将使用位置。
The bootstrap target installs the missing ftp task dependencies into a location that ANT will use, next time it runs.
这篇关于ANT构建FTP命令失败,由于未解决的依赖奥罗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!