0

このエラーと警告を修正するのを手伝ってください:

41: 警告: 'includeantruntime' が設定されていませんでした。デフォルトは build.sysclasspath=last です。繰り返し可能なビルドの場合は false に設定

79: 変換の適用中にエラーが発生しました: javax.xml.transform.TransformerException: java.lang.RuntimeException: 安全な処理機能が true に設定されている場合、拡張要素 'redirect' の使用は許可されません。

合計時間: 31 秒

これは私のbuild.xmlです

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
          Any modifications will be overwritten.
          To include a user specific buildfile here, simply create one in the same
          directory with the processing instruction <?eclipse.ant.import?>
          as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="Login">
<property environment="env"/>
<property name="ECLIPSE_HOME" value="../../../../opt/eclipse"/>
<property name="junit.output.dir" value="junit"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<path id="Login.classpath">
    <pathelement location="bin"/>
    <pathelement location="../../Downloads/JAR/junit-4.10.jar"/>
    <pathelement location="../../Downloads/JAR/poi-3.2-FINAL.jar"/>
    <pathelement location="../../Downloads/JAR/selenium-java-2.21.0.jar"/>
    <pathelement location="../../Downloads/JAR/selenium-java-2.21.0.zip"/>
    <pathelement location="../../Downloads/JAR/selenium-java-2.21.0-srcs.jar"/>
    <pathelement location="../../Downloads/JAR/selenium-server-standalone-2.21.0.jar"/>
    <pathelement location="../../Downloads/JAR/testng-6.5.1.zip"/>
</path>
<target name="init">
    <mkdir dir="bin"/>
    <copy includeemptydirs="false" todir="bin">
        <fileset dir="src">
            <exclude name="**/*.launch"/>
            <exclude name="**/*.java"/>
        </fileset>
    </copy>
</target>
<target name="clean">
    <delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
    <echo message="${ant.project.name}: ${ant.file}"/>
    <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">

        <src path="src"/>
        <classpath refid="Login.classpath"/>
    </javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
<target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
    <copy todir="${ant.library.dir}">
        <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
    </copy>
    <unzip dest="${ant.library.dir}">
        <patternset includes="jdtCompilerAdapter.jar"/>
        <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
    </unzip>
</target>
<target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
    <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
    <antcall target="build"/>
</target>
<target name="login.testLogin">
    <mkdir dir="${junit.output.dir}"/>
    <junit fork="yes" printsummary="withOutAndErr">
        <formatter type="xml"/>
        <test name="login" todir="${junit.output.dir}"/>
        <classpath refid="Login.classpath"/>
    </junit>
</target>
<target name="login">
    <mkdir dir="${junit.output.dir}"/>
    <junit fork="yes" printsummary="withOutAndErr">
        <formatter type="xml"/>
        <test name="login" todir="${junit.output.dir}"/>
        <classpath refid="Login.classpath"/>
    </junit>
</target>

<target name="junitreport">
    <junitreport todir="${junit.output.dir}">
        <fileset dir="${junit.output.dir}">
            <include name="TEST-*.xml"/>
        </fileset>
        <report format="frames" todir="${junit.output.dir}"/>
    </junitreport>
</target>

<target name="compile">
    <mkdir dir="${classes.dir}"/>
    <javac srcdir="${src.dir}" destdir="${classes.dir}" includeantruntime="false">
        <classpath>
            <path id="application" location="${jar.dir}/${ant.project.name}.jar"/>
            <path id="junit" location="${lib.dir}/junit-4.9b2.jar"/>
        </classpath>
    </javac>
</target>
</project>
4

2 に答える 2

3

警告については、includeantruntime を javac ターゲットに追加してください。詳細については、以下のリンクをたどってください。 ant 警告: 「'includeantruntime' が設定されていません」

于 2012-06-07T20:55:52.800 に答える
1

Ant のバージョンは何ですか?

このリンクは1.8.3での修正について話しています

于 2012-06-06T11:08:38.243 に答える