首页 > 解决方案 > 我正在尝试构建一个 ant 项目,但我的构建编译失败了

问题描述

我在eclipse中正确地将它指向jdk并检查了全局条目然后我也收到错误:-

    [javac]   childRolesMap=record.childRolesData.get("Roles").toArray(new Map[0]);                                                                             
    [javac]   required: Map<String,Object>[]
    [javac]   found:    Map[]
BUILD FAILED
C:\ABC\ABCConnector\build.xml:37: Compile failed; see the compiler error output for details.

这是我的 build.xml 片段,它在单击编译失败的链接时重定向,它指向我给出源和目标值的行。

  <target name="compile">
    <mkdir dir="classes"/>
   <!-- <property file="../build.properties"/> -->
    <javac destdir="classes" srcdir="src" classpathref="classpath" debug="on" nowarn="on"
        includeantruntime="false" target="1.8" source="1.8">
      <compilerarg value="-Xlint"/>
      <compilerarg value="-Xlint:-path"/>
    </javac>

如果您对如何解决此问题有任何想法,请告诉我。

标签: javaeclipseant

解决方案


推荐阅读