You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "kai lilleby (JIRA)" <ji...@codehaus.org> on 2008/08/06 09:15:27 UTC

[jira] Created: (MWAR-164) suporting spesification of encoding to use when filtering resources

suporting spesification of encoding to use when filtering resources
-------------------------------------------------------------------

                 Key: MWAR-164
                 URL: http://jira.codehaus.org/browse/MWAR-164
             Project: Maven 2.x War Plugin
          Issue Type: Improvement
    Affects Versions: 2.1-alpha-1
            Reporter: kai lilleby


Howdy,


You can create the issue in the WAR plugin (see below).




Thanks,
Stéphane


---------- Forwarded message ----------
From: Hervé BOUTEMY <he...@free.fr>
Date: Tue, Aug 5, 2008 at 10:45 PM
Subject: Re: Fwd: regarding encoding and filtering in maven war plugin
To: Maven Developers List <de...@maven.apache.org>


Hi,

Maven filtering provides an encoding parameter to set encoding used when
reading/writing files. But war plugin uses null value, which means platform
encoding... Sorry, encoding support won't be totally "free" ;)

I added TODOs in the code.

For web.xml and container config XML file, I set encoding to UTF-8, which is a
better default value than platform encoding.

For other filtered resources, you'll need to add an encoding attribute to
o.a.m.model.Resource class, to let the user define which encoding he wants to
use when filtering. Perhaps using project.build.sourceEncoding as a default
value is a good idea.
Seems like this is worth a Jira issue to track this new feature.


Regards,

Hervé

Le mardi 05 août 2008, Stephane Nicoll a écrit :

> Howdy,
>
> Hervé, could you please give us a status of the work needed to upgrade war
> to support filtered encoding? We are using maven filtering so will it come
> "for free" in the next release?
>
> Best,
> Stéphane
>
> ---------- Forwarded message ----------
> From: Kai Lilleby <ka...@systemfabrikken.no>
> Date: Tue, Aug 5, 2008 at 8:57 AM
> Subject: regarding encoding and filtering in maven war plugin
> To: stephane.nicoll@gmail.com
>
>
>  Greetings from norway:)
> any idea on when spesification of encoding to use when filtering war
> resources will be supported?
> seems that current version uses the system default encoding..
>
> kai




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org





-- 
Large Systems Suck: This rule is 100% transitive. If you build one, you suck" -- S.Yegge


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg closed MWAR-164.
--------------------------------

    Resolution: Fixed
    
> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>            Assignee: Dennis Lundberg
>             Fix For: 2.3
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) suporting spesification of encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=164923#action_164923 ] 

Dennis Lundberg commented on MWAR-164:
--------------------------------------

Bug fix for filteringDeploymentDescriptors coming up.

> suporting spesification of encoding to use when filtering resources
> -------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x War Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=164926#action_164926 ] 

Dennis Lundberg commented on MWAR-164:
--------------------------------------

Created MWAR-183 specifically for filteringDeploymentDescriptors.

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x War Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309393#comment-309393 ] 

Dennis Lundberg commented on MWAR-164:
--------------------------------------

I have committed a fix for this in http://svn.apache.org/viewvc?view=revision&revision=1388368 complete with an IT. The default encoding used is project.build.sourceEncoding, as suggested.

I went the more difficult path and did not set the configured encoding for xml files. Intead for xml files (currently files ending in ".xml") the encoding is read from the files themselves. This means that you can have a mix of encodings in your resource files. The IT has a properties file encoded in ISO-8859-1 and an xml file encoded in UTF-8 which is also specified in the files xml header. Apart from the IT I've successfully tried this on several local projects that suffer from this bug.

I have not yet deployed a new SNAPSHOT, but will do so later today. Please help test this.

Also I want to add some documentation for this, apart from the parameter documentation that went in with this commit, before I close the issue.
                
> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>            Assignee: Dennis Lundberg
>             Fix For: 2.3
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MWAR-164) suporting spesification of encoding to use when filtering resources

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MWAR-164:
------------------------------

    Fix Version/s: 2.1

> suporting spesification of encoding to use when filtering resources
> -------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x War Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Florian Fray (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=254557#action_254557 ] 

Florian Fray commented on MWAR-164:
-----------------------------------

Hi!

Has somebody had the chance to review this patch ?

Best regards,

Florian

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.2
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=184895#action_184895 ] 

Olivier Lamy commented on MWAR-164:
-----------------------------------

So we need to detect *.xml files (in a harcoded way ?).
This need some changes in DefaultMavenFileFilter#copyFile.
Something like 
pseudo code without any formating :P
{code}
if ( file.endWith (*.xml) )
encoding = ReaderFactory.newXmlReader( from ).getEncoding();
{code}
WDYT ?

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182859#action_182859 ] 

Benjamin Bentmann commented on MWAR-164:
----------------------------------------

bq. Why do we have two strategies here (enconding specified in the xml and a parameter for filtered resources). 
XML files come with the luxus of an embedded encoding declaration and this declaration has to be obeyed or interpolation fails, leaving the input either unaltered or corrupted (it's a [fatal error|http://www.w3.org/TR/REC-xml/#NT-EncodingDecl] if the encoding does not match the file's byte stream). Most other resources files (i.e. non-XML documents), are not equipped with an embedded encoding declaration so the user has to provide the encoding in form of a parameter.

The Resources Plugin or better the filtering component should ideally be enhanced to detect XML files and respect their encoding.

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183097#action_183097 ] 

Dennis Lundberg commented on MWAR-164:
--------------------------------------

I agree with Stephane and Benjamin. We should simply use any encoding specified in the files to be filtered. This will at least work for xml files, since they have the ability for the author to specify the encoding being used. Ideally this should be handled by the shared filtering component.

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MWAR-164:
---------------------------------

    Summary: Support for specifying which encoding to use when filtering resources  (was: suporting spesification of encoding to use when filtering resources)

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x War Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) suporting spesification of encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=164763#action_164763 ] 

Dennis Lundberg commented on MWAR-164:
--------------------------------------

I stumbled upon this issue today when using filteringDeploymentDescriptors.

Filtering the web.xml file should be able to use the encoding specified in the web.xml file itself. We specify ISO-8859-1 as the encoding in our web.xml, but it ends up scrambled into UTF-8 after being filtered.


This is our configuration:

{noformat}
       <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.1-alpha-2</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
            </archive>
            <archiveClasses>true</archiveClasses>
            <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
          </configuration>
        </plugin>
{noformat}

> suporting spesification of encoding to use when filtering resources
> -------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x War Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MWAR-164:
---------------------------------

    Component/s: filtering

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.2
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Ognjen Blagojevic (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=186839#action_186839 ] 

Ognjen Blagojevic commented on MWAR-164:
----------------------------------------

Herve is right. "Perhaps using project.build.sourceEncoding as a default value is a good idea."

Plus a Boolean parameter (searchEncodingInFiles) which will specify to open XML/JSP/HTML... files to look for specified encoding. This is of course harder to implement and less valuable, so maybe could be separate bug?

project.build.sourceEncoding covers most use cases, I think.

Regards,
Ognjen

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MWAR-164) suporting spesification of encoding to use when filtering resources

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephane Nicoll updated MWAR-164:
---------------------------------

    Description: 
Quoting Hervé:

{quote}
Maven filtering provides an encoding parameter to set encoding used when
reading/writing files. But war plugin uses null value, which means platform
encoding... Sorry, encoding support won't be totally "free" ;)

I added TODOs in the code.

For web.xml and container config XML file, I set encoding to UTF-8, which is a
better default value than platform encoding.

For other filtered resources, you'll need to add an encoding attribute to
o.a.m.model.Resource class, to let the user define which encoding he wants to
use when filtering. Perhaps using project.build.sourceEncoding as a default
value is a good idea.
Seems like this is worth a Jira issue to track this new feature.
{quote}

  was:
Howdy,


You can create the issue in the WAR plugin (see below).




Thanks,
Stéphane


---------- Forwarded message ----------
From: Hervé BOUTEMY <he...@free.fr>
Date: Tue, Aug 5, 2008 at 10:45 PM
Subject: Re: Fwd: regarding encoding and filtering in maven war plugin
To: Maven Developers List <de...@maven.apache.org>


Hi,

Maven filtering provides an encoding parameter to set encoding used when
reading/writing files. But war plugin uses null value, which means platform
encoding... Sorry, encoding support won't be totally "free" ;)

I added TODOs in the code.

For web.xml and container config XML file, I set encoding to UTF-8, which is a
better default value than platform encoding.

For other filtered resources, you'll need to add an encoding attribute to
o.a.m.model.Resource class, to let the user define which encoding he wants to
use when filtering. Perhaps using project.build.sourceEncoding as a default
value is a good idea.
Seems like this is worth a Jira issue to track this new feature.


Regards,

Hervé

Le mardi 05 août 2008, Stephane Nicoll a écrit :

> Howdy,
>
> Hervé, could you please give us a status of the work needed to upgrade war
> to support filtered encoding? We are using maven filtering so will it come
> "for free" in the next release?
>
> Best,
> Stéphane
>
> ---------- Forwarded message ----------
> From: Kai Lilleby <ka...@systemfabrikken.no>
> Date: Tue, Aug 5, 2008 at 8:57 AM
> Subject: regarding encoding and filtering in maven war plugin
> To: stephane.nicoll@gmail.com
>
>
>  Greetings from norway:)
> any idea on when spesification of encoding to use when filtering war
> resources will be supported?
> seems that current version uses the system default encoding..
>
> kai




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org





-- 
Large Systems Suck: This rule is 100% transitive. If you build one, you suck" -- S.Yegge



> suporting spesification of encoding to use when filtering resources
> -------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x War Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Florian Fray (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=247770#action_247770 ] 

Florian Fray commented on MWAR-164:
-----------------------------------

I was facing this problem in our builds as well, so I've worked around it by setting the JVM ??file.encoding??-property.
It works for me, but not for my team, so I'd like to fix it permanently.

For now my preference is to keep the existing behaviour as default (which is odd, but well known). In my patch I've added a property named ??resourceEncoding?? to the AbstractWarMojo.

I've added this to my parent-poms:

{code}
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.2-SNAPSHOT</version>
  <configuration>
    <resourceEncoding>${project.build.sourceEncoding}</resourceEncoding>
  </configuration>
</plugin>
{code}

In order to test this I've modified the ??web-resources-filtering??-Integration-Test and hope this will pass the review :-)

Please find my patch attached to this bug-report.


Best regards,

Florian

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.2
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MWAR-164:
---------------------------------

    Fix Version/s:     (was: 2.2)
                   2.3
    
> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.3
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Sebastian Davids (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=285110#comment-285110 ] 

Sebastian Davids commented on MWAR-164:
---------------------------------------

Please review patch and/or fix differently, thanks.

12 Votes and patch exists for almost a year now ...

I am in favor of being consistent with the resources plugin: http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#encoding

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.2
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=182650#action_182650 ] 

Stephane Nicoll commented on MWAR-164:
--------------------------------------

Hey Dennis, are we sure we want to do this?

Why do we have two strategies here (enconding specified in the xml and a parameter for filtered resources). The resources plugin does not offer such feature AFAIK ...

I'd go with something similar to the resources plugin and that would be enough,right?

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MWAR-164:
---------------------------------

    Fix Version/s:     (was: 2.1-beta-1)
                   2.1

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x War Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Issue Comment Edited: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=184895#action_184895 ] 

Olivier Lamy edited comment on MWAR-164 at 7/26/09 3:11 AM:
------------------------------------------------------------

So we need to detect *.xml files (in a harcoded way ?).
This need some changes in DefaultMavenFileFilter#copyFile.
Something like 
pseudo code without any formating :P
{code}
if ( file.endWith (*.xml) )
encoding = ReaderFactory.newXmlReader( from ).getEncoding();
{code}
BTW this new way of filtering should be off by default (and configurable). 
As this can break some builds.
WDYT ?

      was (Author: olamy):
    So we need to detect *.xml files (in a harcoded way ?).
This need some changes in DefaultMavenFileFilter#copyFile.
Something like 
pseudo code without any formating :P
{code}
if ( file.endWith (*.xml) )
encoding = ReaderFactory.newXmlReader( from ).getEncoding();
{code}
WDYT ?
  
> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309488#comment-309488 ] 

Dennis Lundberg commented on MWAR-164:
--------------------------------------

A new 2.3-SNAPSHOT has now been deployed.
Please help us test this issue.
                
> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>            Assignee: Dennis Lundberg
>             Fix For: 2.3
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Florian Fray (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=269188#action_269188 ] 

Florian Fray commented on MWAR-164:
-----------------------------------

Could somebody please review the patch and respond to this issue?

Best regards,

Florian


> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.2
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309924#comment-309924 ] 

Dennis Lundberg commented on MWAR-164:
--------------------------------------

Documentation added in [r1391312|http://svn.apache.org/viewvc?view=revision&revision=1391312].
                
> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>            Assignee: Dennis Lundberg
>             Fix For: 2.3
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Issue Comment Edited: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Sebastian Davids (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=285110#comment-285110 ] 

Sebastian Davids edited comment on MWAR-164 at 12/7/11 4:36 AM:
----------------------------------------------------------------

Please review patch and/or fix differently, thanks.

12 Votes and patch exists for almost a year now ...

I am in favor of being consistent with the resources plugin: http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#encoding

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

      was (Author: sdavids):
    Please review patch and/or fix differently, thanks.

12 Votes and patch exists for almost a year now ...

I am in favor of being consistent with the resources plugin: http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#encoding
  
> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.2
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Updated: (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Florian Fray (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Fray updated MWAR-164:
------------------------------

    Attachment: MWAR-164-maven-war-plugin.patch

Patch-file for MWAR-164 adding a "resourceEncoding"-property to the AbstractWarMojo.

> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: http://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>             Fix For: 2.2
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MWAR-164) Support for specifying which encoding to use when filtering resources

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg reassigned MWAR-164:
------------------------------------

    Assignee: Dennis Lundberg
    
> Support for specifying which encoding to use when filtering resources
> ---------------------------------------------------------------------
>
>                 Key: MWAR-164
>                 URL: https://jira.codehaus.org/browse/MWAR-164
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Improvement
>          Components: filtering
>    Affects Versions: 2.1-alpha-1
>            Reporter: kai lilleby
>            Assignee: Dennis Lundberg
>             Fix For: 2.3
>
>         Attachments: MWAR-164-maven-war-plugin.patch
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira