java - 包 org.apache.commons.io 不存在错误

标签 java ant lucene

我正在使用 ant 编译器编译 .java 文件。我收到以下错误 “包 org.apache.commons.io 不存在错误”

我下载了 apache Commons IO 二进制文件并将 .jar 文件粘贴到 "C:\Program Files\Java\jdk1.7.0_51\lib\missioncontrol\plugins "

任何帮助。我是否需要修改构建 xml 文件的类路径?

<target name="compile" description="Compile source code">
<mkdir dir="${build.dir}/classes"/>
 <javac includeantruntime="false"
    srcdir="src"
       destdir="${build.dir}/classes"
       classpathref="classpath"
       encoding="UTF8"
       debug="on"
       deprecation="on">
  <include name="**/*.java"/>
  <exclude name="**/NutchExample.java"/>
 </javac>

 <copy todir="${build.dir}/classes/lia/tools">
   <fileset dir="src/lia/tools" excludes="**/*.java"/>
 </copy>
</target>

最佳答案

我遇到了同样的问题然后意识到 commons-io 的版本低于我需要的版本 (2.4)....我需要覆盖下面已经管理的版本以获得正确的版本:

<dependency>
     <groupId>commons-io</groupId>
     <artifactId>commons-io</artifactId>
     <version>2.4</version>
 </dependency>

关于java - 包 org.apache.commons.io 不存在错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21673618/

相关文章:

java - Wildfly XA-数据源 - galera 集群

java - 如何在通过特征文件中的标记后运行方法?

java - 使用 int 调用 setProperty 但 getProperty 返回 Long on google app engine persistent storage

java - ant - 更新任务 : regenerate only outdated files

programming-languages - Apache Ant 作为编程语言

java - 在 android 中关闭应用程序时,Java 类的实例不会变为 null

java - 如何在 Android 中使用 JarJar 来更改外部 jar 的包名?

android - 丹麦语字母无法在 Android TextView 上正确显示

sql-server - 使用 Lucene 作为 Dbms

apache - Elasticsearch 查询上下文与过滤上下文