diff --git a/maven-plugin-plugin/pom.xml b/maven-plugin-plugin/pom.xml index c52dcfe..50424ac 100644 --- a/maven-plugin-plugin/pom.xml +++ b/maven-plugin-plugin/pom.xml @@ -273,8 +273,8 @@ true ${project.build.directory}/it - setup.bsh - verify.bsh + setup + verify ${project.build.directory}/local-repo src/it/settings.xml diff --git a/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml b/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml new file mode 100644 index 0000000..b9e8530 --- /dev/null +++ b/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml @@ -0,0 +1,66 @@ + + + + + + 4.0.0 + + org.apache.maven.its.plugin + latin-1 + 1.0 + maven-plugin + + Latin-1 + + Test that source files using Latin-1 are properly parsed. + + + + ISO-8859-1 + + + + + org.apache.maven + maven-plugin-api + 2.0 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + + org.apache.maven.plugins + maven-resources-plugin + 2.2 + + + org.apache.maven.plugins + maven-plugin-plugin + @project.version@ + + + + diff --git a/maven-plugin-plugin/src/it/source-encoding/latin-1/src/main/java/test/MyMojo.java b/maven-plugin-plugin/src/it/source-encoding/latin-1/src/main/java/test/MyMojo.java new file mode 100644 index 0000000..e02a10d --- /dev/null +++ b/maven-plugin-plugin/src/it/source-encoding/latin-1/src/main/java/test/MyMojo.java @@ -0,0 +1,20 @@ +package test; + +// NOTE: This source file is by design encoded using ISO-8859-1! + +import org.apache.maven.plugin.AbstractMojo; + +/** + * TEST-CHARS: + * + * @goal test + */ +public class MyMojo + extends AbstractMojo +{ + + public void execute() + { + } + +} diff --git a/maven-plugin-plugin/src/it/source-encoding/pom.xml b/maven-plugin-plugin/src/it/source-encoding/pom.xml new file mode 100644 index 0000000..4b58ca5 --- /dev/null +++ b/maven-plugin-plugin/src/it/source-encoding/pom.xml @@ -0,0 +1,39 @@ + + + + + + 4.0.0 + + org.apache.maven.its.plugin + aggregator + 1.0 + pom + + Aggregator + + Test that the character encoding of source files is respected by the metadata extractor. + + + + utf-8 + latin-1 + + diff --git a/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml b/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml new file mode 100644 index 0000000..4e29ebc --- /dev/null +++ b/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml @@ -0,0 +1,66 @@ + + + + + + 4.0.0 + + org.apache.maven.its.plugin + utf-8 + 1.0 + maven-plugin + + UTF-8 + + Test that source files using UTF-8 are properly parsed. + + + + UTF-8 + + + + + org.apache.maven + maven-plugin-api + 2.0 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + + org.apache.maven.plugins + maven-resources-plugin + 2.2 + + + org.apache.maven.plugins + maven-plugin-plugin + @project.version@ + + + + diff --git a/maven-plugin-plugin/src/it/source-encoding/utf-8/src/main/java/test/MyMojo.java b/maven-plugin-plugin/src/it/source-encoding/utf-8/src/main/java/test/MyMojo.java new file mode 100644 index 0000000..814a3bd --- /dev/null +++ b/maven-plugin-plugin/src/it/source-encoding/utf-8/src/main/java/test/MyMojo.java @@ -0,0 +1,20 @@ +package test; + +// NOTE: This source file is by design encoded using UTF-8! + +import org.apache.maven.plugin.AbstractMojo; + +/** + * TEST-CHARS: ßıΣЯא€ + * + * @goal test + */ +public class MyMojo + extends AbstractMojo +{ + + public void execute() + { + } + +} diff --git a/maven-plugin-plugin/src/it/source-encoding/verify.groovy b/maven-plugin-plugin/src/it/source-encoding/verify.groovy new file mode 100644 index 0000000..cd2391b --- /dev/null +++ b/maven-plugin-plugin/src/it/source-encoding/verify.groovy @@ -0,0 +1,13 @@ +def latin1File = new File(basedir, 'latin-1/target/classes/META-INF/maven/plugin.xml') +assert latin1File.exists() +def latin1Chars = new XmlParser().parse(latin1File).mojos.mojo.description.text() +println latin1Chars +assert "TEST-CHARS: \u00C4\u00D6\u00DC\u00E4\u00F6\u00FC\u00DF".equals( latin1Chars ) + +def utf8File = new File(basedir, 'utf-8/target/classes/META-INF/maven/plugin.xml') +assert utf8File.exists() +def utf8Chars = new XmlParser().parse(utf8File).mojos.mojo.description.text() +println utf8Chars +assert "TEST-CHARS: \u00DF\u0131\u03A3\u042F\u05D0\u20AC".equals( utf8Chars ) + +return true;