[ 
https://jira.codehaus.org/browse/MASSEMBLY-748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=361696#comment-361696
 ] 

Hannes Kogler edited comment on MASSEMBLY-748 at 1/23/15 5:27 AM:
------------------------------------------------------------------

Exactly this is what I am complaining. If you configure "archiverConfig" for 
the same plugin execution you use on extraction of a zip file you just get a 
plugin Exception (justl ike described in the main description of the issue you 
get the error: *org.codehaus.plexus.archiver.dir.DirectoryArchiver: Cannot find 
'encoding' in class org.codehaus.plexus.archiver.dir.DirectoryArchiver* ) 
Meaning, the same plugin configuration, with the only difference that one time 
I use an assembly descriptor that defines to pack the zip file, and one time 
using an assembly-descriptor to unpack the file, results one time in a well 
packed zip file an another time on unpacking in a hard plugin error.

If I am able to produce a zip file using the <achiverConfig> with a special 
encoding like CP850,
[<archiverConfig>
  <encoding>CP850</encoding>
</archiverConfig>]
then I assume I can also extract it (however this works, I don't know the ZIP 
format specification or implementation exactly) using the same encoding to 
provide a consistent way of getting the files as they are correctly 
displayed/zipped in the compressed file. (without losing any char 
informations). So the maven-assembly-plugin needs to support any way to 
decompress zip files with alternative encodings of the source file's zipEntries 
to be consistent.

And yes, those contraints would be ok. Because since umlauts are a typical 
german language part, I can assume that the target OS system, where those files 
will be viewed and handled will be CP850 compatible. If I get some zip files 
with russian chars in the file names of zipEntries I cannot expect that on my 
german OS system they will be displayed in a correct way, if I don't specify an 
alternative encoding to handle such files.


was (Author: ntshko):
Exactly this is what I am complaining. If you configure "archiverConfig" for 
the same plugin execution you use on extraction of a zip file you just get a 
plugin Exception (justl ike described in the main description of the issue you 
get the error: *org.codehaus.plexus.archiver.dir.DirectoryArchiver: Cannot find 
'encoding' in class org.codehaus.plexus.archiver.dir.DirectoryArchiver* ) 
Meaning, the same plugin configuration, with the only difference that one time 
I use an assembly descriptor that defines to pack the zip file, and one time 
using an assembly-descriptor to unpack the file, results one time in a well 
packed zip file an another time on unpacking in a hard plugin error.

If I am able to produce a zip file using the <achiverConfig> with a special 
encoding like CP850, then I assume I can also extract it (however this works, I 
don't know the ZIP format specification or implementation exactly) using the 
same encoding to provide a consistent way of getting the files as they are 
correctly displayed/zipped in the compressed file. (without losing any char 
informations). So the maven-assembly-plugin needs to support any way to 
decompress zip files with alternative encodings of the source file's zipEntries 
to be consistent.

And yes, those contraints would be ok. Because since umlauts are a typical 
german language part, I can assume that the target OS system, where those files 
will be viewed and handled will be CP850 compatible. If I get some zip files 
with russian chars in the file names of zipEntries I cannot expect that on my 
german OS system they will be displayed in a correct way, if I don't specify an 
alternative encoding to handle such files.

> problem to extract zip files including file names with umlauts
> --------------------------------------------------------------
>
>                 Key: MASSEMBLY-748
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-748
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>          Components: maven-archiver
>    Affects Versions: 2.5.3
>         Environment: 
>            Reporter: Hannes Kogler
>            Assignee: Kristian Rosenvold
>             Fix For: 2.5.4
>
>         Attachments: encoding_problem_on_zip_extract.7z
>
>
> Like in an other issue reported, you need to explicitly set the code page 
> CP850 to create zip packages hosting file names with correct umlauts their 
> names. (by using the following configuration)
> <archiverConfig>
>   <encoding>CP850</encoding>
> </archiverConfig>
> After all this solution is not 100% useful, because if you extract this file 
> with the obiously correct umlauts in the zip, wrong chars for all umlauts 
> reappear.
> It's strange, because if you unzip this zip file with all other zip tools 
> (7zip, Windows native zip support aso.) the extraction works fine.
> Only using the maven-assembly-plugin the umlauts get corrupted.
> (a try to set the archiverConfig with the CP850 also for the extracting 
> execution process of the assembly plugin just results in a bad error calling
> Failed to configure archiver:
>  " org.codehaus.plexus.archiver.dir.DirectoryArchiver: Cannot find 'encoding' 
> in class org.codehaus.plexus.archiver.dir.DirectoryArchiver " )



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to