You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Georg Pietrek (JIRA)" <de...@myfaces.apache.org> on 2014/03/13 11:47:44 UTC

[jira] [Created] (TOBAGO-1376) tobago-theme-plugin puts backslashes in war file if build runs under Windows

Georg Pietrek created TOBAGO-1376:
-------------------------------------

             Summary: tobago-theme-plugin puts backslashes in war file if build runs under Windows
                 Key: TOBAGO-1376
                 URL: https://issues.apache.org/jira/browse/TOBAGO-1376
             Project: MyFaces Tobago
          Issue Type: Bug
    Affects Versions: 2.0.0-beta-1
         Environment: Windows (build environment), Linux (runtime)
            Reporter: Georg Pietrek


When building a Tobago theme (using the tobago-theme-plugin) on a Windows machine the file target/classes/META-INF/tobago-resource-index.txt contains file paths with backslashes. 

This leads to errors when running the application on a Linux machine:
2014-03-12 16:11:41,740 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG org.apache.myfaces.tobago.internal.context.ResourceManagerImpl adding resourceKey = '/com\abc\foundation\tobago\renderkit\html\abc\standard\image\exclamation.png'

2014-03-12 16:11:41,740 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO  org.apache.myfaces.tobago.internal.context.ResourceLocator Adding properties from: 'com\abc\foundation\tobago\renderkit\html\abc\standard\property\tobago-theme-config.properties'

2014-03-12 16:11:41,744 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR org.apache.myfaces.tobago.internal.config.TobagoConfigBuilder Error while deploy process. Tobago can't be initialized! Application will not run!
javax.servlet.ServletException: java.lang.NullPointerException


Please take a look at the class IndexThemeMojo, this may be the cause of the problem:

BufferedWriter bufferedWriter = null;
      try {
        final StringWriter stringWriter = new StringWriter();
        bufferedWriter = new BufferedWriter(stringWriter);
        for (final String file : scanner.getIncludedFiles()) {
          bufferedWriter.append('/');
          bufferedWriter.append(file);
          bufferedWriter.newLine();
        }



--
This message was sent by Atlassian JIRA
(v6.2#6252)