- 论坛徽章:
- 0
|
今早用ant 1.5.1编译nutch,刚执行就报错退出,提示说:
- /nutch-0.7.2/nutch-0.7.2/build.xml:20: Unexpected element "dirname"
复制代码
build.xml如下:
- <?xml version="1.0"?>
- <project name="Nutch" default="compile">
- <!-- Load all the default properties, and any the user wants -->
- <!-- to contribute (without having to type -D or edit this file -->
- <property file="${user.home}/build.properties" />
- <property file="${basedir}/build.properties" />
- <property file="${basedir}/default.properties" />
-
- <!-- the normal classpath -->
- <path id="classpath">
- <pathelement location="${build.classes}"/>
- <fileset dir="${lib.dir}">
- <include name="*.jar" />
- </fileset>
- </path>
- <!-- the unit test classpath -->
- <dirname property="plugins.classpath.dir" file="${build.plugins}"/>
- <path id="test.classpath">
- <pathelement location="${test.build.classes}" />
- <pathelement location="${conf.dir}"/>
- <pathelement location="${test.src.dir}"/>
- <pathelement location="${plugins.classpath.dir}"/>
- <path refid="classpath"/>
- </path>
- <!-- xmlcatalog definition for xslt task -->
- <xmlcatalog id="docDTDs">
- <dtd publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
- location="${xmlcatalog.dir}/xhtml1-transitional.dtd"/>
- </xmlcatalog>
- <!-- ====================================================== -->
- <!-- Stuff needed by all targets -->
- <!-- ====================================================== -->
- <target name="init">
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.classes}"/>
- <mkdir dir="${test.build.dir}"/>
- <mkdir dir="${test.build.classes}"/>
- <touch datetime="01/25/1971 2:00 pm">
- <fileset dir="${conf.dir}" includes="**/*.template"/>
- </touch>
- <copy todir="${conf.dir}" verbose="true">
- <fileset dir="${conf.dir}" includes="**/*.template"/>
- <mapper type="glob" from="*.template" to="*"/>
- </copy>
- </target>
复制代码
我查了一些build.XML的格式,但是都没有提到dirname这个变量。
望高手指点一下。谢谢! |
|