Re: maven-resources-plugin file-encoding

2010-11-02 Thread Jörg Hohwiller

Hi Roland,

On 01.11.2010 18:03, Asmann, Roland wrote:

configure Maven to already fail the build on
Windows or have it configured so that it works on Linux? I want the
behavior of the two builds to be the same -- as it should be!



I suppose the difference comes from the different default encodings of the OS 
(check your locale settings on Linux, e.g. LC_ALL).


However to be OS-independant please use

properties
project.build.sourceEncodingUTF-8/project.build.sourceEncoding
/properties

http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding

Regards
  Jörg

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-02 Thread Asmann, Roland
Hi,

As I've written in another reply in this thread, I have set 
'project.build.sourceEncoding', but it isn't working!

Roland


On 02-11-10 18:52, Jörg Hohwiller wrote:
 Hi Roland,

 On 01.11.2010 18:03, Asmann, Roland wrote:
   configure Maven to already fail the build on
   Windows or have it configured so that it works on Linux? I want the
   behavior of the two builds to be the same -- as it should be!
  

 I suppose the difference comes from the different default encodings of
 the OS
 (check your locale settings on Linux, e.g. LC_ALL).

 However to be OS-independant please use

 properties
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
 /properties

 http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding

 Regards
 Jörg

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: maven-resources-plugin file-encoding

2010-11-02 Thread Martin Gainty

any luck replacing CP-1252 encoding with ISO-8859-1 ?

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
 

 From: roland.asm...@adesso.at
 To: users@maven.apache.org
 Date: Tue, 2 Nov 2010 19:03:28 +0100
 Subject: Re: maven-resources-plugin  file-encoding
 
 Hi,
 
 As I've written in another reply in this thread, I have set 
 'project.build.sourceEncoding', but it isn't working!
 
 Roland
 
 
 On 02-11-10 18:52, Jörg Hohwiller wrote:
  Hi Roland,
 
  On 01.11.2010 18:03, Asmann, Roland wrote:
   configure Maven to already fail the build on
   Windows or have it configured so that it works on Linux? I want the
   behavior of the two builds to be the same -- as it should be!
  
 
  I suppose the difference comes from the different default encodings of
  the OS
  (check your locale settings on Linux, e.g. LC_ALL).
 
  However to be OS-independant please use
 
  properties
  project.build.sourceEncodingUTF-8/project.build.sourceEncoding
  /properties
 
  http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding
 
  Regards
  Jörg
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 -- 
 Roland Asmann
 Senior Software Engineer
 
 adesso Austria GmbH
 Floridotower 26. Stock T +43 1 2198790-27
 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
 A-1210 Wien M +43 664 88657566
 E roland.asm...@adesso.at
 W www.adesso.at
 
 -
  business. people. technology. 
 -
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
  

Re: maven-resources-plugin file-encoding

2010-11-02 Thread Asmann, Roland
How do you mean?

I have already told our developers to please switch to UTF-8 (as they 
should've been doing in the first place), but just in case they forget, 
I want to have Maven complain on their Windows-machines. I don't see how 
switching to ISO-8859-1 helps in this case?

Roland


On 02-11-10 19:11, Martin Gainty wrote:

 any luck replacing CP-1252 encoding with ISO-8859-1 ?

 Martin
 __
 Verzicht und Vertraulichkeitanmerkung

 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
 unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.
 Diese Nachricht dient lediglich dem Austausch von Informationen und
 entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten
 Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt
 uebernehmen.


   From: roland.asm...@adesso.at
   To: users@maven.apache.org
   Date: Tue, 2 Nov 2010 19:03:28 +0100
   Subject: Re: maven-resources-plugin  file-encoding
  
   Hi,
  
   As I've written in another reply in this thread, I have set
   'project.build.sourceEncoding', but it isn't working!
  
   Roland
  
  
   On 02-11-10 18:52, Jörg Hohwiller wrote:
Hi Roland,
   
On 01.11.2010 18:03, Asmann, Roland wrote:
 configure Maven to already fail the build on
 Windows or have it configured so that it works on Linux? I want the
 behavior of the two builds to be the same -- as it should be!

   
I suppose the difference comes from the different default encodings of
the OS
(check your locale settings on Linux, e.g. LC_ALL).
   
However to be OS-independant please use
   
properties
project.build.sourceEncodingUTF-8/project.build.sourceEncoding
/properties
   
   
 http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding
   
Regards
Jörg
   
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
   
  
   --
   Roland Asmann
   Senior Software Engineer
  
   adesso Austria GmbH
   Floridotower 26. Stock T +43 1 2198790-27
   Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
   A-1210 Wien M +43 664 88657566
   E roland.asm...@adesso.at
   W www.adesso.at
  
   -
business. people. technology. 
   -
  
   -
   To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-02 Thread Jörg Hohwiller

Hi Roland,

sorry. My mail client was out of sync. When I wrote the mail, no response to 
your post was visible to me.


In this case it sounds like something very special.
You can check...

... if you have any specific profiles in your POM that are OS dependent but I 
doubt that it is related


... if you have the exact same JVM version on both systems (maybe on linux you
even have a different JVM implementation underhood, depending on your distro)

... if there is some effect by the VCS client that you use to checkout the 
sources on linux or windows. You can probably check with a hex-editor or

get both versions on an usb-stick and diff them.

Just some toughts but after all I am clue-less.

Regards
  Jörg

On 02.11.2010 19:03, Asmann, Roland wrote:

Hi,

As I've written in another reply in this thread, I have set
'project.build.sourceEncoding', but it isn't working!

Roland


On 02-11-10 18:52, Jörg Hohwiller wrote:

Hi Roland,

On 01.11.2010 18:03, Asmann, Roland wrote:
configure Maven to already fail the build on
Windows or have it configured so that it works on Linux? I want the
behavior of the two builds to be the same -- as it should be!
  

I suppose the difference comes from the different default encodings of
the OS
(check your locale settings on Linux, e.g. LC_ALL).

However to be OS-independant please use

properties
project.build.sourceEncodingUTF-8/project.build.sourceEncoding
/properties

http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding

Regards
Jörg

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-02 Thread Asmann, Roland
Hmmm... Those last two are worth a shot... I'll try that tomorrow when I 
have access to the build-server again.

There's no profiles in this project, so that can't be it.

Roland


On 02-11-10 19:16, Jörg Hohwiller wrote:
 Hi Roland,

 sorry. My mail client was out of sync. When I wrote the mail, no response to
 your post was visible to me.

 In this case it sounds like something very special.
 You can check...

 ... if you have any specific profiles in your POM that are OS dependent
 but I
 doubt that it is related

 ... if you have the exact same JVM version on both systems (maybe on
 linux you
 even have a different JVM implementation underhood, depending on your
 distro)

 ... if there is some effect by the VCS client that you use to checkout the
 sources on linux or windows. You can probably check with a hex-editor or
 get both versions on an usb-stick and diff them.

 Just some toughts but after all I am clue-less.

 Regards
 Jörg

 On 02.11.2010 19:03, Asmann, Roland wrote:
   Hi,
  
   As I've written in another reply in this thread, I have set
   'project.build.sourceEncoding', but it isn't working!
  
   Roland
  
  
   On 02-11-10 18:52, Jörg Hohwiller wrote:
   Hi Roland,
  
   On 01.11.2010 18:03, Asmann, Roland wrote:
configure Maven to already fail the build on
Windows or have it configured so that it works on Linux? I want the
behavior of the two builds to be the same -- as it should be!
   
  
   I suppose the difference comes from the different default encodings of
   the OS
   (check your locale settings on Linux, e.g. LC_ALL).
  
   However to be OS-independant please use
  
   properties
   project.build.sourceEncodingUTF-8/project.build.sourceEncoding
   /properties
  
  
 http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding
  
   Regards
   Jörg
  
   -
   To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
  


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-02 Thread Jörg Schaible
Jörg Hohwiller wrote:

 Hi Roland,
 
 sorry. My mail client was out of sync. When I wrote the mail, no response
 to your post was visible to me.
 
 In this case it sounds like something very special.
 You can check...
 
 ... if you have any specific profiles in your POM that are OS dependent
 but I doubt that it is related
 
 ... if you have the exact same JVM version on both systems (maybe on linux
 you even have a different JVM implementation underhood, depending on your
 distro)
 
 ... if there is some effect by the VCS client that you use to checkout the
 sources on linux or windows. You can probably check with a hex-editor or
 get both versions on an usb-stick and diff them.

This would have been my guess also. If you process a Cp1252 encoded file on 
Windows as UTF-8, this might simply lead to an garbled character. On Linux 
you have nowaday normally UTF-8 as system encoding and Cp1252 decoded as 
UTF-8 might result in an invalid UTF-8 character if processed as UTF-8 
again.

- Jörg



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-02 Thread Asmann, Roland
Ha! Indeed, the output file on Windows contains garbled characters!

Great, so I know that the output is sh*t, but how to let Maven cry out 
so those darn stubborn developers finally get the point?

Roland


On 02-11-10 19:22, Jörg Schaible wrote:
 Jörg Hohwiller wrote:

   Hi Roland,
  
   sorry. My mail client was out of sync. When I wrote the mail, no response
   to your post was visible to me.
  
   In this case it sounds like something very special.
   You can check...
  
   ... if you have any specific profiles in your POM that are OS dependent
   but I doubt that it is related
  
   ... if you have the exact same JVM version on both systems (maybe on
 linux
   you even have a different JVM implementation underhood, depending on your
   distro)
  
   ... if there is some effect by the VCS client that you use to
 checkout the
   sources on linux or windows. You can probably check with a hex-editor or
   get both versions on an usb-stick and diff them.

 This would have been my guess also. If you process a Cp1252 encoded file on
 Windows as UTF-8, this might simply lead to an garbled character. On Linux
 you have nowaday normally UTF-8 as system encoding and Cp1252 decoded as
 UTF-8 might result in an invalid UTF-8 character if processed as UTF-8
 again.

 - Jörg



 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-


Re: maven-resources-plugin file-encoding

2010-11-02 Thread Jörg Schaible
Hi Roland,

Asmann, Roland wrote:

 Ha! Indeed, the output file on Windows contains garbled characters!
 
 Great, so I know that the output is sh*t, but how to let Maven cry out
 so those darn stubborn developers finally get the point?

use the verifier plugin to ensure that the generated file actually contain 
the umlaut (try to use a \u0XXX notation in the contains tag).

- Jörg


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-02 Thread Asmann, Roland
Hi Jörg,

That plugin is tuned for single files, right? That would mean I'd have 
to have all developers include the plugin with its configuration in 
their POMs... I'd rather have a solution in a parent-POM (we use a 
company-wide master)...

Also, if there is at least one correct Umlaut in there, it will probably 
say the file is correct as well, right?

So, in all, it's a nice workaround, but still not an actual solution... :-(

Roland


On 02-11-10 19:53, Jörg Schaible wrote:
 Hi Roland,

 Asmann, Roland wrote:

   Ha! Indeed, the output file on Windows contains garbled characters!
  
   Great, so I know that the output is sh*t, but how to let Maven cry out
   so those darn stubborn developers finally get the point?

 use the verifier plugin to ensure that the generated file actually contain
 the umlaut (try to use a \u0XXX notation in the contains tag).

 - Jörg


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-


Re: maven-resources-plugin file-encoding

2010-11-02 Thread Jörg Schaible
Hi Roland,

Asmann, Roland wrote:

 Hi Jörg,
 
 That plugin is tuned for single files, right? That would mean I'd have
 to have all developers include the plugin with its configuration in
 their POMs... I'd rather have a solution in a parent-POM (we use a
 company-wide master)...
 
 Also, if there is at least one correct Umlaut in there, it will probably
 say the file is correct as well, right?
 
 So, in all, it's a nice workaround, but still not an actual solution...
 :-(

yes, that would have been a single file solution only. However, the real 
problem is, that some people commit files with wrong encoding. If you tell 
Maven that the file *is* UTF-8, then you have to ensure, that only files in 
this encoding can be committed at all e.g. in Subversion using a commit 
hook.

The problem is the *detection*. We normally force ASCII. This is fine for 
all kind of source code and easy to detect. If some non-ASCII character has 
to be in the code, you can always encode it with a Unicode notation (e.g. 
\u). This is true for Java, property files, JavaScript, XML, HTML, ...

- Jörg


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



maven-resources-plugin file-encoding

2010-11-01 Thread Asmann, Roland
Hi all,

I'm having some problems with the maven-resources-plugin. I am 
responsible for our CI-builds and have a Hudson set up on a Linux 
environment.

Now, our developers are using Eclipse on Windows and therefore have 
inadvertently configured the resources to be encoded in 'Cp1252', 
instead of 'UTF-8'. Now some have accidentally included German Umlauts 
in the resources, which I agree shouldn't be done in the first place.

The strange thing is that Maven builds without any problems on Windows 
(even telling us that it is using UTF-8 encoding on the resources!), but 
it fails with an exception on Linux!

Is there any way I can configure Maven to already fail the build on 
Windows or have it configured so that it works on Linux? I want the 
behavior of the two builds to be the same -- as it should be!

Any help is greatly appreciated!

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-01 Thread Simone Tripodi
Hi Roland,
you've 2 options:

* specify the 'encoding'[1] parameter of the maven-resources-plugin to 'UTF-8'
* define in the 'properties' section the property
'project.build.sourceEncoding' to 'UTF-8'.

I usually prefer the second option, so the char encoding is globally
set also for the compiler and site plugin.
Hope this helps, alles gute,
Simo

[1] 
http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#encoding

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Mon, Nov 1, 2010 at 6:03 PM, Asmann, Roland roland.asm...@adesso.at wrote:
 Hi all,

 I'm having some problems with the maven-resources-plugin. I am
 responsible for our CI-builds and have a Hudson set up on a Linux
 environment.

 Now, our developers are using Eclipse on Windows and therefore have
 inadvertently configured the resources to be encoded in 'Cp1252',
 instead of 'UTF-8'. Now some have accidentally included German Umlauts
 in the resources, which I agree shouldn't be done in the first place.

 The strange thing is that Maven builds without any problems on Windows
 (even telling us that it is using UTF-8 encoding on the resources!), but
 it fails with an exception on Linux!

 Is there any way I can configure Maven to already fail the build on
 Windows or have it configured so that it works on Linux? I want the
 behavior of the two builds to be the same -- as it should be!

 Any help is greatly appreciated!

 --
 Roland Asmann
 Senior Software Engineer

 adesso Austria GmbH
 Floridotower 26. Stock              T +43 1 2198790-27
 Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
 A-1210 Wien                         M +43 664 88657566
                                    E roland.asm...@adesso.at
                                    W www.adesso.at

 -
              business. people. technology. 
 -

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-01 Thread Asmann, Roland
Martin,

Danke, aber nicht genau was ich brauch... Wie ich konvertieren kann weiß
ich schon, ich will nur das Maven schreit wenn was nicht passt, und zwar
auf beide Systeme!

Sorry, for the other readers:

Thanks, but that's not what I was looking for... I know how to convert
the encodings, I just want Maven to report when something's wrong, and
preferably on both systems!


On 01-11-10 18:26, Martin Gainty wrote:
   bauen ihr pom.xml mit ISO-8859-1
   http://www.io.com/~jdawson/cp1252.html
  
   Viel Gluck,
   Martin
   __
   Verzicht und Vertraulichkeitanmerkung
  
   Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
   Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
   unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.
   Diese Nachricht dient lediglich dem Austausch von Informationen und
   entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten
   Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt
   uebernehmen.
  
From: roland.asm...@adesso.at
To: users@maven.apache.org
Date: Mon, 1 Nov 2010 18:03:53 +0100
Subject: maven-resources-plugin  file-encoding
   
Hi all,
   
I'm having some problems with the maven-resources-plugin. I am
responsible for our CI-builds and have a Hudson set up on a Linux
environment.
   
Now, our developers are using Eclipse on Windows and therefore have
inadvertently configured the resources to be encoded in 'Cp1252',
instead of 'UTF-8'. Now some have accidentally included German Umlauts
in the resources, which I agree shouldn't be done in the first place.
   
The strange thing is that Maven builds without any problems on Windows
(even telling us that it is using UTF-8 encoding on the
resources!), but
it fails with an exception on Linux!
   
Is there any way I can configure Maven to already fail the build on
Windows or have it configured so that it works on Linux? I want the
behavior of the two builds to be the same -- as it should be!
   
Any help is greatly appreciated!
   
--
Roland Asmann
Senior Software Engineer
   
adesso Austria GmbH
Floridotower 26. Stock T +43 1 2198790-27
Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at
   
-
 business. people. technology. 
-
   
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
   

--
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock T +43 1 2198790-27
Floridsdorfer Hauptstr. 1 F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
   business. people. technology. 
-


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven-resources-plugin file-encoding

2010-11-01 Thread Asmann, Roland
Hello Simo,

That second settings is what I am actually using! The output in Maven 
looks like this:

[INFO] 

[INFO] Building deva - EJB
[INFO]task-segment: [package]
[INFO] 

[INFO] [resources:copy-resources {execution: copy-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 15 resources
[INFO] 

[ERROR] BUILD ERROR
[INFO] 

[INFO] null


On Windows, the build error does not occur and the build continues on. 
But on both systems Maven tells me it is using UTF-8 and only on Linux 
does it actually stop the build.

And as you can see, the error I get is pretty obvious! :-)
Only after turning on debugging I found out that there were Umlauts in 
the property-files and that they were encoded as Cp1252!

Roland


On 01-11-10 18:58, Simone Tripodi wrote:
 Hi Roland,
 you've 2 options:

 * specify the 'encoding'[1] parameter of the maven-resources-plugin to
 'UTF-8'
 * define in the 'properties' section the property
 'project.build.sourceEncoding' to 'UTF-8'.

 I usually prefer the second option, so the char encoding is globally
 set also for the compiler and site plugin.
 Hope this helps, alles gute,
 Simo

 [1]
 http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#encoding

 http://people.apache.org/~simonetripodi/
 http://www.99soft.org/



 On Mon, Nov 1, 2010 at 6:03 PM, Asmann, Roland roland.asm...@adesso.at
 wrote:
   Hi all,
  
   I'm having some problems with the maven-resources-plugin. I am
   responsible for our CI-builds and have a Hudson set up on a Linux
   environment.
  
   Now, our developers are using Eclipse on Windows and therefore have
   inadvertently configured the resources to be encoded in 'Cp1252',
   instead of 'UTF-8'. Now some have accidentally included German Umlauts
   in the resources, which I agree shouldn't be done in the first place.
  
   The strange thing is that Maven builds without any problems on Windows
   (even telling us that it is using UTF-8 encoding on the resources!), but
   it fails with an exception on Linux!
  
   Is there any way I can configure Maven to already fail the build on
   Windows or have it configured so that it works on Linux? I want the
   behavior of the two builds to be the same -- as it should be!
  
   Any help is greatly appreciated!
  
   --
   Roland Asmann
   Senior Software Engineer
  
   adesso Austria GmbH
   Floridotower 26. Stock  T +43 1 2198790-27
   Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
   A-1210 Wien M +43 664 88657566
  E roland.asm...@adesso.at
  W www.adesso.at
  
   -
business. people. technology. 
   -
  
   -
   To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
   For additional commands, e-mail: users-h...@maven.apache.org
  
  

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-