在Eclipse中通过build.xml导入工程报Specified buildfile does not contain a javac task

问题描述:

在Eclipse中通过build.xml导入工程报Specified buildfile does not contain a javac task

解决方式:

加入javac task

<javac srcdir="src" destdir="bin" />

 

完整build.xml如下:

<project name="demo_book" default="all" basedir=".">

    <target name="all">
        <ant dir="printer"/>
        <ant dir="simple_filesystem"/>
        <ant dir="evictor_filesystem"/>
        <ant dir="map_filesystem"/>
        <ant dir="lifecycle"/>
    </target>

    <target name="clean">
        <ant dir="printer" target="clean"/>
        <ant dir="simple_filesystem" target="clean"/>
        <ant dir="lifecycle" target="clean"/>
        <ant dir="evictor_filesystem" target="clean"/>
        <ant dir="map_filesystem" target="clean"/>
    </target>
<javac srcdir="src" destdir="bin" />
</project>

 

你可能感兴趣的:(build.xml)