在Eclipse中,Pom.xml文件上方有一个红色的X

问题描述

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

“问题”选项卡显示以下消息:

生命周期配置未涵盖插件执行:com.lazerycode.selenium:driver-binary-downloader-maven-plugin:1.0.18:selenium(执行:认值,阶段:test-compile)

如何通过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>

解决方法

如果尽管有错误您仍可以执行项目,则可以使用“在Eclipse偏好设置中将目标硒标记为忽略”。