【问题标题】:Pom.xml file has a red X over it in EclipsePom.xml 文件在 Eclipse 中有一个红色的 X
【发布时间】:2021-02-20 20:07:02
【问题描述】:

我的项目 pom.xml 上有一个红色的 X,当我进入“问题”选项卡时,Eclipse 显示错误消息。

问题选项卡提供以下消息:

生命周期配置未涵盖插件执行:com.lazerycode.selenium:driver-binary-downloader-maven-plugin:1.0.18:selenium(执行:默认,阶段:测试编译)

如何删除 pom.xml 上的红色 X? Java版本是1.8

Screenshot of the error message

<profiles>
    <profile>
        <id>selenium-tests</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>com.lazerycode.selenium</groupId>
                    <artifactId>driver-binary-downloader-maven-plugin</artifactId>
                    <version>${driver-binary-downloader-maven-plugin.version}</version>
                    <configuration>
                        <rootStandaloneServerDirectory>${project.basedir}/ServerExes/selenium_standalone_binaries</rootStandaloneServerDirectory>
                        <downloadedZipFileDirectory>${project.basedir}/ServerExes/selenium_standalone_zips</downloadedZipFileDirectory>
                        <customRepositoryMap>${project.basedir}/TestData/RepositoryMap.xml</customRepositoryMap>
                        <overwriteFilesThatExist>${overwrite.binaries}</overwriteFilesThatExist>
                        <onlyGetDriversForHostOperatingSystem>true</onlyGetDriversForHostOperatingSystem>
                        <fileDownloadRetryAttempts>${retry.attempts}</fileDownloadRetryAttempts>
                        <fileDownloadReadTimeout>${read.timeout}</fileDownloadReadTimeout>
                        <operatingSystems>
                            <windows>true</windows>
                            <linux>true</linux>
                            <mac>true</mac>
                        </operatingSystems>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>selenium</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>


                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire-plugin.version}</version>
                    <configuration>
                        <suiteXmlFiles>
                            <!-- TestNG suite XML files -->
                            <!-- <file>testNg_UI_Verification.xml</file> -->
                            <!-- <file></file> -->
                            <file>${testNGFileName}</file>
                        </suiteXmlFiles>
                        <properties>
                            <property>
                                <name>suitethreadpoolsize</name>
                                <value>2</value>
                            </property>
                        </properties>
                        <systemPropertyVariables>
                            <proxyEnabled>${proxyEnabled}</proxyEnabled>
                            <proxyHost>${proxyHost}</proxyHost>
                            <proxyPort>${proxyPort}</proxyPort>
                            <phantomjs.binary.path>${phantomjs.binary.path}</phantomjs.binary.path>
                            <webdriver.chrome.driver>${webdriver.chrome.driver}</webdriver.chrome.driver>
                            <webdriver.ie.driver>${webdriver.ie.driver}</webdriver.ie.driver>
                            <webdriver.opera.driver>${webdriver.opera.driver}</webdriver.opera.driver>
                            <webdriver.gecko.driver>${webdriver.gecko.driver}</webdriver.gecko.driver>
                            <webdriver.edge.driver>${webdriver.edge.driver}</webdriver.edge.driver>
                        </systemPropertyVariables>
                        
                        <additionalClasspathElements>
                           <additionalClasspathElement>${project.basedir}/db_queries/ojdbc14.jar</additionalClasspathElement>
                        </additionalClasspathElements>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

【问题讨论】:

标签: java maven selenium-webdriver pom.xml


【解决方案1】:

如果尽管出现错误,您仍可以执行项目,那么您可以使用“将目标硒标记为在 Eclipse 首选项中被忽略”。

【讨论】:

  • 这确实消除了错误,所以竖起大拇指。但没有回答为什么首先会出现错误。
猜你喜欢
  • 2015-07-12
  • 1970-01-01
  • 2018-06-08
  • 1970-01-01
  • 2013-03-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多