Improve Maven build robustness

* UURIFactoryTest.java
    specify stirng literal with escape-encoding, rather than as raw UTF-8
* **/pom.xml
    include 'project.build.sourceEncoding' property to suppress platform-encoding warnings
    (unfortunately, neither this nor similar 'maven.compile.encoding' property actually casues maven build to interpret Java source as UTF-8)
This commit is contained in:
gojomo
2009-12-02 01:34:40 +00:00
parent aa3bfc7f4c
commit ed2061560e
6 changed files with 26 additions and 7 deletions
+5 -2
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<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/maven-v4_0_0.xsd">
<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/maven-v4_0_0.xsd">
<parent>
<groupId>org.archive</groupId>
<artifactId>heritrix</artifactId>
@@ -327,5 +327,8 @@
</configuration>
</plugin>
</plugins>
</build>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
@@ -905,6 +905,11 @@ public class UURIFactoryTest extends TestCase {
String puny2 = "http://www.xn--plse-gra.dk/";
assertEquals("encoding of " + idn2, puny2, UURIFactory
.getInstance(idn2).toString());
// http://例子.測試
String idn3 = "http://\u4F8B\u5B50.\u6E2C\u8A66";
String puny3 = "http://xn--fsqu00a.xn--g6w251d/";
assertEquals("encoding of " + idn3, puny3, UURIFactory
.getInstance(idn3).toString());
}
public void testNewLineInURL() throws URIException {
+5 -2
View File
@@ -133,5 +133,8 @@
</plugin>
</plugins>
</build>
</project>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
+4 -1
View File
@@ -146,5 +146,8 @@
</configuration>
</plugin>
</plugins>
</build>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
+4 -1
View File
@@ -79,5 +79,8 @@ be used in applications other than Heritrix, however.
</configuration>
</plugin>
</plugins>
</build>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
+3 -1
View File
@@ -363,5 +363,7 @@ Heritrix is the Internet Archive's open-source, extensible, web-scale,
</plugin>
</plugins>
</reporting>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>