[ 
https://issues.apache.org/activemq/browse/SM-829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved SM-829.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2
                   3.1.1
         Assignee: Guillaume Nodet

Thanks a lot for this patch !


Author: gnodet
Date: Wed Feb 14 09:35:54 2007
New Revision: 507635

URL: http://svn.apache.org/viewvc?view=rev&rev=507635
Log:
SM-829: Incorrect file encoding of create jbi.xml

Added:
   incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/
   incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/
   incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/
   incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/jbi/
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/jbi/JbiServiceUnitDescriptorWriterTest.java
   (with props)
Modified:
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiComponentDescriptorWriter.java
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiServiceAssemblyDescriptorWriter.java
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiServiceUnitDescriptorWriter.java
   
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiSharedLibraryDescriptorWriter.java


Author: gnodet
Date: Wed Feb 14 09:40:14 2007
New Revision: 507637

URL: http://svn.apache.org/viewvc?view=rev&rev=507637
Log:
SM-829: Incorrect file encoding of create jbi.xml

Added:
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/
     - copied from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/java/
     - copied from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/java/org/
     - copied from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/java/org/apache/
     - copied from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/
     - copied from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/
     - copied from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/
     - copied from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/jbi/
     - copied from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/jbi/
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/jbi/JbiServiceUnitDescriptorWriterTest.java
     - copied unchanged from r507635, 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/test/java/org/apache/servicemix/maven/plugin/jbi/JbiServiceUnitDescriptorWriterTest.java
Modified:
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiComponentDescriptorWriter.java
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiServiceAssemblyDescriptorWriter.java
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiServiceUnitDescriptorWriter.java
   
incubator/servicemix/branches/servicemix-3.1/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiSharedLibraryDescriptorWriter.java


> Incorrect file encoding of created jbi.xml
> ------------------------------------------
>
>                 Key: SM-829
>                 URL: https://issues.apache.org/activemq/browse/SM-829
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: tooling
>    Affects Versions: 3.0, 3.0.1, 3.1
>         Environment: Win XP, JDK 1.5.0_10
>            Reporter: Anders Hammar
>         Assigned To: Guillaume Nodet
>             Fix For: 3.1.1, 3.2
>
>         Attachments: JbiServiceUnitDescriptorWriterTest.java, 
> JbiServiceUnitDescriptorWriterTest.java
>
>
> When the jbi.xml file is created by the jbi-maven-plugin tool, the file 
> encoding isn't specified (the xml encoding for the xml header is defined 
> though). As a FileWriter is used, the default system encoding is used which 
> does not work for special characters.
> I've attached a test case that shows this for the 
> JbiServiceUnitDescriptorWriter class. However, the same problem exists in all 
> DescriptorWriter classes. The affected classes are:
> JbiComponentDescriptorWriter
> JbiServiceAssemblyDescriptorWriter
> JbiServiceUnitDescriptorWriter
> JbiSharedLibraryDescriptorWriter
> One solution is to change the used FileWriter to a PrintWriter and pass the 
> encoding to the PrintWriter constructor. Like this:
> {code:title=JbiServiceUnitDescriptorWriter.java|borderStyle=solid}
> //...
> public void write(File descriptor, boolean bc, String name, String 
> description, List uris, List consumes, List provides)
>         throws JbiPluginException {
>     PrintWriter w;
>     try {
>         w = new PrintWriter(descriptor, encoding);
>     } catch (IOException ex) {
>         throw new JbiPluginException("Exception while opening file[" + 
> descriptor.getAbsolutePath() + "]", ex);
>     }
>     //...
> }
> //...
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to