Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-ASCII characters in POM configuration cause generated MANIFEST to contain garbled chararcters #6

Open
rgross-hardt opened this issue Dec 3, 2014 · 1 comment

Comments

@rgross-hardt
Copy link

If the POM contains non-ASCII characters in the archive configuration of the maven-jar-plugin, m2e generates a MANIFEST with garbled characters. I just reproduced this effect with a freshly unpacked eclipse 4.4 SR1 distribution, a fresh workspace and a fresh project on a Windows 7 64 Bit machine.

The relevant part of the POM was:

<project>
<modelVersion>4.0.0</modelVersion>
<groupId>manifestenc</groupId>
<artifactId>manifestenc</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>manifestenc</name>
<description>Test: ÄÖÜ âêô €</description>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<archive>
<manifestEntries>
<Implementation-Title>${project.description}
</Implementation-Title>
<other-test>Something beyond ASCII: äöüß áéâê</other-test>
<test-counter>3</test-counter>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
<pluginManagement>
... (enable org.sonatype.m2e.mavenarchiver.jararchiverconfigurator via
lifecycle mapping) ...
</pluginManagement>
</build>
</project>

The resulting manifest was:

Manifest-Version: 1.0
Implementation-Title: Test: ᅢトᅢヨᅢワ ᅢ깱ᅢᄡ ¬ツᆲ
other-test: Something beyond ASCII: ᅢ내쌔태゚ ᅢ개래깱
Build-Jdk: 1.7.0_51
Built-By: rgross-hardt
Created-By: Maven Integration for Eclipse
test-counter: 3

The bug does not occur, when the maven CLI is used:

Manifest-Version: 1.0
Implementation-Title: Test: ÄÖÜ âêô €
Built-By: rgross-hardt
Build-Jdk: 1.7.0_51
other-test: Something beyond ASCII: äöüß áéâê
Created-By: Apache Maven 3.1.1
test-counter: 3
Archiver-Version: Plexus Archiver

I think the problem has been around since eclipse 3.7 (where I first noticed strange characters in an about dialog derived from MANIFEST attributes), but is definitely also in eclipse 4.3.

I tried to reproduce the problem with a new unit test based on the unit tests in org.sonatype.m2e.mavenarchiver.tests, but the generated MANIFEST were OK. So I opened a new issue on https://bugs.eclipse.org/bugs/show_bug.cgi?id=454059, but they sent me here.

@fbricon
Copy link
Contributor

fbricon commented Feb 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants