码迷,mamicode.com
首页 > 编程语言 > 详细

Trying to override old definition of task javac Error

时间:2014-05-08 11:08:05      阅读:415      评论:0      收藏:0      [点我收藏+]

标签:ant

最近在看pentaho-ce-5.1的源代码,用ant进行编辑的时候总是出错

Trying to override old definition of task javac Error

修改以前的内容

<?xml version="1.0" ?>
<project name="HelloWorld" default="compress">
    <presetdef name="javac">
            <javac includeantruntime="false" />
    </presetdef>
    <target name="init">
        <mkdir dir="build/classes" />
        <mkdir dir="dist" />
    </target>
    <target name="compile" depends="init">
        <javac srcdir="src" destdir="build/classes"/>
    </target> 
    <target name="compress" depends="compile">
            <jar destfile="dist/sample.jar" basedir="build/classes" />
    </target>
    <target name="execute" depends="compile">
        <java classname="src" classpath="build/classes" />
    </target>
    <target name="clean">
    </target>
</project>

修改以后的内容

<presetdef name="my.javac">
            <javac includeantruntime="false" />
    </presetdef>

看到了,主要是将javac改成了my.javac

本文出自 “乔磊的博客 学习 进步” 博客,请务必保留此出处http://sucre.blog.51cto.com/1084905/1408196

Trying to override old definition of task javac Error,布布扣,bubuko.com

Trying to override old definition of task javac Error

标签:ant

原文地址:http://sucre.blog.51cto.com/1084905/1408196

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!