ANT编译错误:包org.openqa.selenium不存在 [英] ANT compilation error : package org.openqa.selenium does not exist

查看:3334
本文介绍了ANT编译错误:包org.openqa.selenium不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="FreesunPortal" basedir="." default="compile">

    <!-- ===============Initialize property============================ -->

    <property name="ws.home" value="${basedir}"/>
    <property name="ws.jars" value="E:\Automation\Jar files\Jars"/>
    <property name="test.dest" value="${ws.home}/build"/>
    <property name="test.src" value="${ws.home}/src"/>
    <property name="ng.result" value="test-output" />
    <property name="src.dir" location="src" />
    <property name="build.dir" location="bin" />

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

    <target name="setClassPath" unless="test.classpath">
        <path id="classpath_jars">
            <fileset dir="${ws.jars}" includes="*.jar"/>

            <pathelement path="${class.path}" />

        </path>
        <pathconvert pathsep=":" property="test.classpath" refid="classpath_jars" />
    </target>

    <target name="init" depends="setClassPath">
       <condition property="ANT"
           value="${env.ANT_HOME}/bin/ant.bat"
           else="${env.ANT_HOME}/bin/ant">
           <os family="windows" />
       </condition>
   </target>


    <target name="clean">
       <delete dir="${test.dest}"/>
    </target>

    <!--compile-->
    <target name="compile" >

        <delete includeemptydirs="true">
                 <fileset dir="${test.dest}" includes ="**//**"/>

        </delete>
        <mkdir dir="${test.dest}"/>

        <path id="compile.classpath">
                <fileset dir="E:\Automation\Jar files\Jars">
                   <include name="**/*.jar"/>
                </fileset>
            </path>

        <echo message="compiling.........."/>
        <javac 
            debug="true"  
            destdir="${test.dest}" 
            srcdir="${test.src}" 
            classpath="${test.classpath}" 
        >

        </javac>    
    </target>
    <target name="run" depends="compile"> 

        <testng classpathref="${test.classpath}:${test.dest}">
            <xmlfileset dir="${ws.home}" includes="testng.xml"/>
        </testng>
    </target>   
</project>

控制台输出:

Buildfile: E:\Automation\PowerElectronicsWorkShop\FreesunPortal\build.xml
Trying to override old definition of task javac
compile:
    [mkdir] Created dir: E:\Automation\PowerElectronicsWorkShop\FreesunPortal\build
     [echo] compiling..........
    [javac] Compiling 5 source files to E:\Automation\PowerElectronicsWorkShop\FreesunPortal\build
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\addPlantTestRun\PlantTest.java:5: error: package org.testng.annotations does not exist
    [javac] import org.testng.annotations.Test;
    [javac]                              ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:6: error: package org.openqa.selenium does not exist
    [javac] import org.openqa.selenium.Alert;
    [javac]                           ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:7: error: package org.openqa.selenium does not exist
    [javac] import org.openqa.selenium.By;
    [javac]                           ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:8: error: package org.openqa.selenium.support.ui does not exist
    [javac] import org.openqa.selenium.support.ui.ExpectedConditions;
    [javac]                                      ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:9: error: package org.openqa.selenium.support.ui does not exist
    [javac] import org.openqa.selenium.support.ui.Select;
    [javac]                                      ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:10: error: package org.openqa.selenium.support.ui does not exist
    [javac] import org.openqa.selenium.support.ui.WebDriverWait;
    [javac]                                      ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:11: error: package org.testng does not exist
    [javac] import org.testng.Assert;
    [javac]                  ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\businessLogicLib\AddPlantLib.java:3: error: package org.openqa.selenium does not exist
    [javac] import org.openqa.selenium.By;
    [javac]                           ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\businessLogicLib\AddPlantLib.java:4: error: package org.openqa.selenium.support does not exist
    [javac] import org.openqa.selenium.support.PageFactory;
    [javac]                                   ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\businessLogicLib\AddPlantLib.java:8: error: package org.testng does not exist
    [javac] import org.testng.Assert;
    [javac]                  ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:3: error: package org.openqa.selenium does not exist
    [javac] import org.openqa.selenium.WebElement;
    [javac]                           ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:4: error: package org.openqa.selenium.support does not exist
    [javac] import org.openqa.selenium.support.FindBy;
    [javac]                                   ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:10: error: cannot find symbol
    [javac]     private WebElement userNameEdt;
    [javac]             ^
    [javac]   symbol:   class WebElement
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:13: error: cannot find symbol
    [javac]     private WebElement passwordEdt;
    [javac]             ^
    [javac]   symbol:   class WebElement
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:16: error: cannot find symbol
    [javac]     private WebElement loginButton;
    [javac]             ^
    [javac]   symbol:   class WebElement
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:19: error: cannot find symbol
    [javac]     private WebElement logo;
    [javac]             ^
    [javac]   symbol:   class WebElement
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:21: error: cannot find symbol
    [javac]     public WebElement getUserNameEdt() {
    [javac]            ^
    [javac]   symbol:   class WebElement
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:25: error: cannot find symbol
    [javac]     public WebElement getPasswordEdt() {
    [javac]            ^
    [javac]   symbol:   class WebElement
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:29: error: cannot find symbol
    [javac]     public WebElement getLoginButton() {
    [javac]            ^
    [javac]   symbol:   class WebElement
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:33: error: cannot find symbol
    [javac]     public WebElement getLogo() {
    [javac]            ^
    [javac]   symbol:   class WebElement
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\DriverLib.java:3: error: package org.openqa.selenium.firefox does not exist
    [javac] import org.openqa.selenium.firefox.FirefoxDriver;
    [javac]                                   ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\DriverLib.java:4: error: package org.openqa.selenium does not exist
    [javac] import org.openqa.selenium.WebDriver;
    [javac]                           ^
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\DriverLib.java:9: error: cannot find symbol
    [javac] public static WebDriver driver = new FirefoxDriver();
    [javac]               ^
    [javac]   symbol:   class WebDriver
    [javac]   location: class DriverLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\addPlantTestRun\PlantTest.java:20: error: cannot find symbol
    [javac]     @Test
    [javac]      ^
    [javac]   symbol:   class Test
    [javac]   location: class PlantTest
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:9: error: cannot find symbol
    [javac]     @FindBy(id = "username")
    [javac]      ^
    [javac]   symbol:   class FindBy
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:12: error: cannot find symbol
    [javac]     @FindBy(id = "password")
    [javac]      ^
    [javac]   symbol:   class FindBy
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:15: error: cannot find symbol
    [javac]     @FindBy(id = "go")
    [javac]      ^
    [javac]   symbol:   class FindBy
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\pagefactory\LoginPage.java:18: error: cannot find symbol
    [javac]     @FindBy(id = "img-logo")
    [javac]      ^
    [javac]   symbol:   class FindBy
    [javac]   location: class LoginPage
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:26: error: cannot find symbol
    [javac]         WebDriverWait wait = new WebDriverWait(DriverLib.driver, 20);
    [javac]         ^
    [javac]   symbol:   class WebDriverWait
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:26: error: cannot find symbol
    [javac]         WebDriverWait wait = new WebDriverWait(DriverLib.driver, 20);
    [javac]                                  ^
    [javac]   symbol:   class WebDriverWait
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:27: error: cannot find symbol
    [javac]         wait.until(ExpectedConditions.presenceOfElementLocated(By.linkText(linkName)));
    [javac]                                                                ^
    [javac]   symbol:   variable By
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:27: error: cannot find symbol
    [javac]         wait.until(ExpectedConditions.presenceOfElementLocated(By.linkText(linkName)));
    [javac]                    ^
    [javac]   symbol:   variable ExpectedConditions
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:33: error: cannot find symbol
    [javac]         WebDriverWait wait = new WebDriverWait(DriverLib.driver, 20);
    [javac]         ^
    [javac]   symbol:   class WebDriverWait
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:33: error: cannot find symbol
    [javac]         WebDriverWait wait = new WebDriverWait(DriverLib.driver, 20);
    [javac]                                  ^
    [javac]   symbol:   class WebDriverWait
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:34: error: cannot find symbol
    [javac]         wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(xpath)));
    [javac]                                                                ^
    [javac]   symbol:   variable By
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:34: error: cannot find symbol
    [javac]         wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(xpath)));
    [javac]                    ^
    [javac]   symbol:   variable ExpectedConditions
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:40: error: cannot find symbol
    [javac]         WebDriverWait wait = new WebDriverWait(DriverLib.driver, 20);
    [javac]         ^
    [javac]   symbol:   class WebDriverWait
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:40: error: cannot find symbol
    [javac]         WebDriverWait wait = new WebDriverWait(DriverLib.driver, 20);
    [javac]                                  ^
    [javac]   symbol:   class WebDriverWait
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:41: error: cannot find symbol
    [javac]         wait.until(ExpectedConditions.presenceOfElementLocated(By.id(id)));
    [javac]                                                                ^
    [javac]   symbol:   variable By
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:41: error: cannot find symbol
    [javac]         wait.until(ExpectedConditions.presenceOfElementLocated(By.id(id)));
    [javac]                    ^
    [javac]   symbol:   variable ExpectedConditions
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:47: error: cannot find symbol
    [javac]         WebDriverWait wait = new WebDriverWait(DriverLib.driver, 20);
    [javac]         ^
    [javac]   symbol:   class WebDriverWait
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:47: error: cannot find symbol
    [javac]         WebDriverWait wait = new WebDriverWait(DriverLib.driver, 20);
    [javac]                                  ^
    [javac]   symbol:   class WebDriverWait
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:48: error: cannot find symbol
    [javac]         wait.until(ExpectedConditions.presenceOfElementLocated(By.name(wbName)));
    [javac]                                                                ^
    [javac]   symbol:   variable By
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:48: error: cannot find symbol
    [javac]         wait.until(ExpectedConditions.presenceOfElementLocated(By.name(wbName)));
    [javac]                    ^
    [javac]   symbol:   variable ExpectedConditions
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:56: error: cannot find symbol
    [javac]         String actPage = DriverLib.driver.findElement(By.xpath(textXpath)).getText();
    [javac]                                                       ^
    [javac]   symbol:   variable By
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:91: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]         ^
    [javac]   symbol:   class Select
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:91: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]                          ^
    [javac]   symbol:   class Select
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:91: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]                                                              ^
    [javac]   symbol:   variable By
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:98: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]         ^
    [javac]   symbol:   class Select
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:98: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]                          ^
    [javac]   symbol:   class Select
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:98: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]                                                              ^
    [javac]   symbol:   variable By
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:105: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]         ^
    [javac]   symbol:   class Select
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:105: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]                          ^
    [javac]   symbol:   class Select
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:105: error: cannot find symbol
    [javac]         Select sel = new Select(DriverLib.driver.findElement(By.id(selIdName)));
    [javac]                                                              ^
    [javac]   symbol:   variable By
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:112: error: cannot find symbol
    [javac]         Alert alert = DriverLib.driver.switchTo().alert();
    [javac]         ^
    [javac]   symbol:   class Alert
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:119: error: cannot find symbol
    [javac]         Alert alert = DriverLib.driver.switchTo().alert();
    [javac]         ^
    [javac]   symbol:   class Alert
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\CommonUtilLib.java:127: error: cannot find symbol
    [javac]         Assert.assertEquals(actText, expText, message);
    [javac]         ^
    [javac]   symbol:   variable Assert
    [javac]   location: class CommonUtilLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\businessLogicLib\AddPlantLib.java:17: error: cannot find symbol
    [javac]     LoginPage login = PageFactory.initElements(DriverLib.driver, LoginPage.class);
    [javac]                       ^
    [javac]   symbol:   variable PageFactory
    [javac]   location: class AddPlantLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\businessLogicLib\AddPlantLib.java:40: error: cannot find symbol
    [javac]         String actText = DriverLib.driver.findElement(By.xpath("//h3[text()='Last Faults']")).getText();
    [javac]                                                       ^
    [javac]   symbol:   variable By
    [javac]   location: class AddPlantLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\businessLogicLib\AddPlantLib.java:42: error: cannot find symbol
    [javac]         Assert.assertEquals(actText, expText, "page is not verified");
    [javac]         ^
    [javac]   symbol:   variable Assert
    [javac]   location: class AddPlantLib
    [javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\genericfunctionLib\DriverLib.java:9: error: cannot find symbol
    [javac] public static WebDriver driver = new FirefoxDriver();
    [javac]                                      ^
    [javac]   symbol:   class FirefoxDriver
    [javac]   location: class DriverLib
    [javac] 61 errors

BUILD FAILED
E:\Automation\PowerElectronicsWorkShop\FreesunPortal\build.xml:62: Compile failed; see the compiler error output for details.

Total time: 1 second

请帮助球员。

推荐答案

这是一个编译错误,由的javac发出任务。

This is a compile error, issued by the javac task.

[javac] E:\Automation\PowerElectronicsWorkShop\FreesunPortal\src\com\freesunPortal\addPlantTestRun\PlantTest.java:5: error: package org.testng.annotations does not exist
[javac] import org.testng.annotations.Test;

意味着你的类路径中缺少的 testng.jar

我建议简化您的类路径管理。声明在顶部的路径

I suggest simplifying your classpath management. Declare the paths at the top

<path id="compile.path">
  <fileset dir="${compile.lib.dir}" includes="*.jar"/>
  <pathelement location="${classes.dir}"/>
</path>

<path id="test.path">
  <path refid="compile.path"/>
  <fileset dir="${test.lib.dir}" includes="*.jar"/>
</path>

<path id="runtime.path">
  <path refid="test.path"/>
  <fileset dir="${test.lib.dir}" includes="*.jar"/>
</path>

然后用它们作为支持它们的各项任务引用:

Then use them as references on the various tasks that support them:

<javac ... classpathref="${compile.path}"/>

<junit printsummary="yes" haltonfailure="yes">
  <classpath>
    <path refid="test.path"/>
  </classpath>

<java ... classpathref="${runtime.path}"/>

我希望这可以帮助你解决问题。

I hope this helps you to troubleshoot the problem.

这篇关于ANT编译错误:包org.openqa.selenium不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆