[高手请进、顶者有分]eclipse+ant:有关导入build.xml文件时报错的问题

qq_net 2006-03-11 11:24:46

我在网上下载了一CMS系统,利用eclipse导入build.xml时,报“Currently only supports creating a project from a single javac declaration ”,安装myeclipse之后,重新导入build.xml文件,仍报同样的错
...全文
301 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_net 2006-03-11
  • 打赏
  • 举报
回复
</batchtest>
</junit>
</target>
<target name="junit-present" unless="Junit.present" depends="init">
<echo>================================= WARNING ================================</echo>
<echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
<echo>==========================================================================</echo>
</target>
<target name="compile-tests" if="Junit.present" depends="junit-present,compile">
<mkdir dir="${testclassesdir}">
</mkdir>
<javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
<src>
<pathelement location="${basedir}/src/test">
</pathelement>
</src>
<classpath>
<path refid="build.classpath">
</path>
<pathelement path="${classesdir}">
</pathelement>
</classpath>
</javac>
</target>
<target name="javadoc" description="o Generate javadoc" depends="get-deps">
<mkdir dir="${javadocdir}">
</mkdir>
<tstamp>
<format pattern="1993-yyyy" property="year">
</format>
</tstamp>
<property name="copyright" value="Copyright &copy; Obinary Ltd. All Rights Reserved.">
</property>
<property name="title" value="magnolia 2.1.3 API">
</property>
<javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="${basedir}/src/main" packagenames="info.magnolia.*">
<classpath>
<path refid="build.classpath">
</path>
</classpath>
</javadoc>
</target>
<target name="get-dep-log4j.jar" description="o Download the dependency : log4j.jar" unless="log4j.jar" depends="init,setProxy,noProxy,get-custom-dep-log4j.jar">
<mkdir dir="${libdir}/log4j/jars/">
</mkdir>
<get dest="${libdir}/log4j/jars/log4j-1.2.9.jar" usetimestamp="true" ignoreerrors="true" src="http://magnolia.sourceforge.net/repository/log4j/jars/log4j-1.2.9.jar">
</get>
<get dest="${libdir}/log4j/jars/log4j-1.2.9.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//log4j/jars/log4j-1.2.9.jar">
</get>
</target>
<target name="get-custom-dep-log4j.jar" if="log4j.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/log4j/jars/">
</mkdir>
<get dest="${libdir}/log4j/jars/log4j-1.2.9.jar" usetimestamp="true" ignoreerrors="true" src="${log4j.jar}">
</get>
</target>
<target name="get-dep-concurrent.jar" description="o Download the dependency : concurrent.jar" unless="concurrent.jar" depends="init,setProxy,noProxy,get-custom-dep-concurrent.jar">
<mkdir dir="${libdir}/concurrent/jars/">
</mkdir>
<get dest="${libdir}/concurrent/jars/concurrent-1.3.4.jar" usetimestamp="true" ignoreerrors="true" src="http://magnolia.sourceforge.net/repository/concurrent/jars/concurrent-1.3.4.jar">
</get>
<get dest="${libdir}/concurrent/jars/concurrent-1.3.4.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//concurrent/jars/concurrent-1.3.4.jar">
</get>
</target>
<target name="get-custom-dep-concurrent.jar" if="concurrent.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/concurrent/jars/">
</mkdir>
<get dest="${libdir}/concurrent/jars/concurrent-1.3.4.jar" usetimestamp="true" ignoreerrors="true" src="${concurrent.jar}">
</get>
</target>
<target name="get-dep-junit.jar" description="o Download the dependency : junit.jar" unless="junit.jar" depends="init,setProxy,noProxy,get-custom-dep-junit.jar">
<mkdir dir="${libdir}/junit/jars/">
</mkdir>
<get dest="${libdir}/junit/jars/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://magnolia.sourceforge.net/repository/junit/jars/junit-3.8.1.jar">
</get>
<get dest="${libdir}/junit/jars/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//junit/jars/junit-3.8.1.jar">
</get>
</target>
<target name="get-custom-dep-junit.jar" if="junit.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/junit/jars/">
</mkdir>
<get dest="${libdir}/junit/jars/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="${junit.jar}">
</get>
</target>
<target name="get-dep-commons-httpclient.jar" description="o Download the dependency : commons-httpclient.jar" unless="commons-httpclient.jar" depends="init,setProxy,noProxy,get-custom-dep-commons-httpclient.jar">
<mkdir dir="${libdir}/commons-httpclient/jars/">
</mkdir>
<get dest="${libdir}/commons-httpclient/jars/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://magnolia.sourceforge.net/repository/commons-httpclient/jars/commons-httpclient-2.0.2.jar">
</get>
<get dest="${libdir}/commons-httpclient/jars/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//commons-httpclient/jars/commons-httpclient-2.0.2.jar">
</get>
</target>
<target name="get-custom-dep-commons-httpclient.jar" if="commons-httpclient.jar" depends="init,setProxy,noProxy">
<mkdir dir="${libdir}/commons-httpclient/jars/">
</mkdir>
<get dest="${libdir}/commons-httpclient/jars/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="${commons-httpclient.jar}">
</get>
</target>
<target name="get-dep-commons-collections.jar" description="o Download the dependency : commons-collections.jar" unless="commons-collections.jar" depends="init,setProxy,noProxy,get-custom-dep-commons-collections.jar">
<mkdir dir="${libdir}/commons-collections/jars/">
qq_net 2006-03-11
  • 打赏
  • 举报
回复
<pathelement location="${libdir}/mockrunner/jars/mockrunner-0.3.1.jar">
</pathelement>
<pathelement location="${libdir}/maven-taglib/plugins/maven-taglib-plugin-1.4.1.jar">
</pathelement>
<pathelement location="${libdir}/maven/plugins/maven-war-plugin-1.7-UNOFFICIAL-1.jar">
</pathelement>
<pathelement location="${libdir}/maven/plugins/maven-eclipse-plugin-1.10-UNOFFICIAL-3.jar">
</pathelement>
</path>
<target name="init" description="o Initializes some properties">
<mkdir dir="${libdir}">
</mkdir>
<condition property="noget">
<equals arg2="only" arg1="${build.sysclasspath}">
</equals>
</condition>
<!--Test if JUNIT is present in ANT classpath-->
<available property="Junit.present" classname="junit.framework.Test">
</available>
<!--Test if user defined a proxy-->
<condition property="useProxy">
<and>
<isset property="proxy.host">
</isset>
<not>
<equals trim="true" arg2="" arg1="${proxy.host}">
</equals>
</not>
</and>
</condition>
</target>
<target name="compile" description="o Compile the code" depends="get-deps">
<mkdir dir="${classesdir}">
</mkdir>
<javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
<src>
<pathelement location="${basedir}/src/main">
</pathelement>
</src>
<classpath refid="build.classpath">
</classpath>
</javac>
<copy todir="${classesdir}">
<fileset dir="${basedir}/src/main">
<exclude name="**/*.java">
</exclude>
</fileset>
</copy>
<copy todir="${classesdir}">
<fileset dir="${basedir}/src/resources">
</fileset>
</copy>
</target>
<target name="jar" description="o Create the jar" depends="compile,test">
<jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
</jar>
</target>
<target name="clean" description="o Clean up the generated directories">
<delete dir="${defaulttargetdir}">
</delete>
<delete dir="${distdir}">
</delete>
</target>
<target name="dist" description="o Create a distribution" depends="jar, javadoc">
<mkdir dir="dist">
</mkdir>
<copy todir="dist">
<fileset dir="${defaulttargetdir}" includes="*.jar">
</fileset>
<fileset dir="${basedir}" includes="LICENSE*, README*">
</fileset>
</copy>
</target>
<target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
<fail message="There were test failures.">
</fail>
</target>
<target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
<mkdir dir="${testreportdir}">
</mkdir>
<junit dir="${basedir}" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
<sysproperty key="basedir" value=".">
</sysproperty>
<formatter type="xml">
</formatter>
<formatter usefile="false" type="plain">
</formatter>
<classpath>
<path refid="build.classpath">
</path>
<pathelement path="${testclassesdir}">
</pathelement>
<pathelement path="${classesdir}">
</pathelement>
</classpath>
<batchtest todir="${testreportdir}">
<fileset dir="${basedir}/src/test">
<include name="**/*Test.java">
</include>
</fileset>
qq_net 2006-03-11
  • 打赏
  • 举报
回复
以下为build.xml文件:
<?xml version="1.0" encoding="UTF-8"?>

<!--build.xml generated by maven from project.xml version 2.1.3
on date October 20 2005, time 1741-->
<project default="jar" name="magnolia" basedir=".">
<!--Load local and user build preferences-->
<property file="build.properties">
</property>
<property file="${user.home}/build.properties">
</property>
<!--Build properties-->
<property name="defaulttargetdir" value="${basedir}/target">
</property>
<property name="libdir" value="${user.home}/.maven/repository">
</property>
<property name="classesdir" value="${basedir}/target/classes">
</property>
<property name="testclassesdir" value="${basedir}/target/test-classes">
</property>
<property name="testreportdir" value="${basedir}/target/test-reports">
</property>
<property name="distdir" value="${basedir}/dist">
</property>
<property name="javadocdir" value="${basedir}/dist/docs/api">
</property>
<property name="final.name" value="magnolia-2.1.3">
</property>
<property name="proxy.host" value="">
</property>
<property name="proxy.port" value="">
</property>
<property name="proxy.username" value="">
</property>
<property name="proxy.password" value="">
</property>
<path id="build.classpath">
<pathelement location="${libdir}/log4j/jars/log4j-1.2.9.jar">
</pathelement>
<pathelement location="${libdir}/concurrent/jars/concurrent-1.3.4.jar">
</pathelement>
<pathelement location="${libdir}/junit/jars/junit-3.8.1.jar">
</pathelement>
<pathelement location="${libdir}/commons-httpclient/jars/commons-httpclient-2.0.2.jar">
</pathelement>
<pathelement location="${libdir}/commons-collections/jars/commons-collections-3.1.jar">
</pathelement>
<pathelement location="${libdir}/commons-codec/jars/commons-codec-1.3.jar">
</pathelement>
<pathelement location="${libdir}/jdom/jars/jdom-1.0.jar">
</pathelement>
<pathelement location="${libdir}/lucene/jars/lucene-1.4.3.jar">
</pathelement>
<pathelement location="${libdir}/excalibur-sourceresolve/jars/excalibur-sourceresolve-20020820.jar">
</pathelement>
<pathelement location="${libdir}/jstl/jars/jstl-1.1.2.jar">
</pathelement>
<pathelement location="${libdir}/taglibs/jars/standard-1.1.2.jar">
</pathelement>
<pathelement location="${libdir}/geronimo-spec/jars/geronimo-spec-servlet-2.4-rc4.jar">
</pathelement>
<pathelement location="${libdir}/geronimo-spec/jars/geronimo-spec-jsp-2.0-rc4.jar">
</pathelement>
<pathelement location="${libdir}/geronimo-spec/jars/geronimo-spec-jta-1.0.1B-rc4.jar">
</pathelement>
<pathelement location="${libdir}/javax.mail/jars/mail-1.3.1.jar">
</pathelement>
<pathelement location="${libdir}/javax.activation/jars/activation-1.0.2.jar">
</pathelement>
<pathelement location="${libdir}/jsr170/jars/jcr-1.0.jar">
</pathelement>
<pathelement location="${libdir}/commons-lang/jars/commons-lang-2.1.jar">
</pathelement>
<pathelement location="${libdir}/commons-logging/jars/commons-logging-1.0.4.jar">
</pathelement>
<pathelement location="${libdir}/xerces/jars/xercesImpl-2.6.2.jar">
</pathelement>
<pathelement location="${libdir}/slide/jars/webdavlib-2.0.jar">
</pathelement>
<pathelement location="${libdir}/servlets.com/jars/cos-05Nov2002.jar">
</pathelement>
<pathelement location="${libdir}/jug/jars/jug-1.1.2.jar">
</pathelement>
<pathelement location="${libdir}/org.apache.jackrabbit/jars/jackrabbit-1.0-20051017.140921.jar">
</pathelement>
<pathelement location="${libdir}/org.apache.jackrabbit/jars/jackrabbit-bdb-1.0-20050928.220303-1.jar">
</pathelement>
<pathelement location="${libdir}/berkeleydb/jars/je-1.7.1.jar">
</pathelement>
<pathelement location="${libdir}/httpunit/jars/httpunit-1.6.jar">
</pathelement>
<pathelement location="${libdir}/nekohtml/jars/nekohtml-0.9.1.jar">
</pathelement>
<pathelement location="${libdir}/rhino/jars/js-1.5R4.1.jar">
</pathelement>
<pathelement location="${libdir}/tomcat/jars/jasper-compiler-5.5.9.jar">
</pathelement>
<pathelement location="${libdir}/tomcat/jars/jasper-runtime-5.5.9.jar">
</pathelement>
<pathelement location="${libdir}/commons-el/jars/commons-el-1.0.jar">
</pathelement>

58,454

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧