最近在看pentaho-ce-5.1的源代码,用ant进行编辑的时候总是出错
1
|
Trying to override old definition of task javac Error
|
修改以前的内容
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?
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
>
|
修改以后的内容
1
2
3
|
<
presetdef
name
=
"my.javac"
>
<
javac
includeantruntime
=
"false"
/>
</
presetdef
>
|
看到了,主要是将javac改成了my.javac
本文转自sucre03 51CTO博客,原文链接:http://blog.51cto.com/sucre/1408196,如需转载请自行联系原作者