gpt4 book ai didi

java - 在 IntelliJ IDEA 中执行的 Maven Selenium WebDriver 项目中出现编码警告

转载 作者:行者123 更新时间:2023-11-30 08:12:02 25 4
gpt4 key购买 nike

我在 IntelliJ IDEA 14.0.2 中有一个 Maven Selenium WebDriver 项目。我的pom.xml文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MasteringSeleniumTestingTools</groupId>
<artifactId>Chapter3</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

当我作为测试命令运行项目时,出现一些警告,如下所示:

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!<br>
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

最佳答案

https://maven.apache.org/general.html#encoding-warning

<project>
...
<properties>
<project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
</properties>

...

UTF-8 也有效。

关于java - 在 IntelliJ IDEA 中执行的 Maven Selenium WebDriver 项目中出现编码警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30258628/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com