Uploaded image for project: 'PUBLIC - Liferay Maven'
  1. PUBLIC - Liferay Maven
  2. MAVEN-148

build-css fails with com.liferay.sass.compiler.jni.JniSassCompilerException: stdin:1: file to import not found or unreadable: .scss files are not copied to the output folder

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.2.0 GA1, 6.1.30 EE GA3, Master
    • Fix Version/s: None
    • Component/s: General, Plugins
    • Labels:
    • Environment:

      Description

      1- Create a sample portlet using liferay-portlet-archetype (sample project attached: MAVEN-148.zip, 7.0.0-SNAPSHOT)
      2- Copy the attached main.css & resource.css.scss files into "src/main/webapp/css/"
      3- Change the properties in the pom.xml to reflect your system
      4- Execute

      mvn liferay:build-css
      

      Expected result build-css goal completes successfully, .sass-cache contains a valid main.css and "$resourceServer" is correctly resolved
      Actual result Goal fails to complete:

      tibusz@tibusz-E6520:~/workspaces/luna/build.css$ mvn liferay:build-css -e
      [INFO] Error stacktraces are turned on.
      [INFO] Scanning for projects...
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/maven/plugins/liferay-maven-plugin/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/liferay-ee/com/liferay/maven/plugins/liferay-maven-plugin/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/maven/plugins/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/liferay-ee/com/liferay/maven/plugins/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/maven/maven-support/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/liferay-ee/com/liferay/maven/maven-support/7.0.0-SNAPSHOT/maven-metadata.xml
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building build.css Portlet 0.0.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- liferay-maven-plugin:7.0.0-SNAPSHOT:build-css (default-cli) @ build.css ---
      Downloading: https://repository.liferay.com/nexus/content/groups/liferay-ee/com/liferay/portal/portal-service/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/portal-service/7.0.0-SNAPSHOT/maven-metadata.xml
      [WARNING] Could not transfer metadata com.liferay.portal:portal-service:7.0.0-SNAPSHOT/maven-metadata.xml from/to liferay-public (https://repository.liferay.com/nexus/content/groups/public): Failed to transfer file: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/portal-service/7.0.0-SNAPSHOT/maven-metadata.xml. Return code is: 502 , ReasonPhrase:Proxy Error.
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/liferay-ee/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloaded: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/maven-metadata.xml (789 B at 0.1 KB/sec)
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/util-bridges-7.0.0-20150515.041434-1212.pom
      Downloaded: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/util-bridges-7.0.0-20150515.041434-1212.pom (412 B at 0.5 KB/sec)
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/liferay-ee/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloaded: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/maven-metadata.xml (788 B at 0.1 KB/sec)
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/util-taglib-7.0.0-20150515.041450-1211.pom
      Downloaded: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/util-taglib-7.0.0-20150515.041450-1211.pom (411 B at 0.7 KB/sec)
      Downloading: https://repository.liferay.com/nexus/content/groups/liferay-ee/com/liferay/portal/util-java/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-java/7.0.0-SNAPSHOT/maven-metadata.xml
      Downloaded: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-java/7.0.0-SNAPSHOT/maven-metadata.xml (786 B at 0.1 KB/sec)
      Downloading: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-java/7.0.0-SNAPSHOT/util-java-7.0.0-20150515.041440-1212.pom
      Downloaded: https://repository.liferay.com/nexus/content/groups/public/com/liferay/portal/util-java/7.0.0-SNAPSHOT/util-java-7.0.0-20150515.041440-1212.pom (409 B at 0.5 KB/sec)
      Loading jar:file:/home/tibusz/liferay/bundles/master/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
      com.liferay.sass.compiler.jni.JniSassCompilerException: stdin:1: file to import not found or unreadable: resource.css.scss
      Current dir: 
      
      	at com.liferay.sass.compiler.jni.JniSassCompiler.compileString(JniSassCompiler.java:184)
      	at com.liferay.portal.tools.sass.SassExecutorUtil.parse(SassExecutorUtil.java:115)
      	at com.liferay.portal.tools.sass.SassString.<init>(SassString.java:28)
      	at com.liferay.portal.tools.sass.SassFile._addSassString(SassFile.java:268)
      	at com.liferay.portal.tools.sass.SassFile.call(SassFile.java:148)
      	at com.liferay.portal.tools.sass.SassFile.call(SassFile.java:37)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1:27.766s
      [INFO] Finished at: Fri May 15 10:22:44 CEST 2015
      [INFO] Final Memory: 12M/303M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:7.0.0-SNAPSHOT:build-css (default-cli) on project build.css: null: MojoExecutionException: InvocationTargetException: Unable to parse /css/main.css: stdin:1: file to import not found or unreadable: resource.css.scss
      [ERROR] Current dir:
      [ERROR] -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:7.0.0-SNAPSHOT:build-css (default-cli) on project build.css: null
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.MojoExecutionException
      	at com.liferay.maven.plugins.AbstractLiferayMojo.execute(AbstractLiferayMojo.java:88)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      	... 19 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.liferay.maven.plugins.AbstractLiferayMojo.executeTool(AbstractLiferayMojo.java:224)
      	at com.liferay.maven.plugins.SassToCssBuilderMojo.doExecute(SassToCssBuilderMojo.java:90)
      	at com.liferay.maven.plugins.AbstractLiferayMojo.execute(AbstractLiferayMojo.java:81)
      	... 21 more
      Caused by: java.lang.Exception: Unable to parse /css/main.css
      	at com.liferay.portal.tools.sass.SassExecutorUtil.parse(SassExecutorUtil.java:123)
      	at com.liferay.portal.tools.sass.SassString.<init>(SassString.java:28)
      	at com.liferay.portal.tools.sass.SassFile._addSassString(SassFile.java:268)
      	at com.liferay.portal.tools.sass.SassFile.call(SassFile.java:148)
      	at com.liferay.portal.tools.sass.SassFile.call(SassFile.java:37)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.sass.compiler.jni.JniSassCompilerException: stdin:1: file to import not found or unreadable: resource.css.scss
      Current dir: 
      
      	at com.liferay.sass.compiler.jni.JniSassCompiler.compileString(JniSassCompiler.java:184)
      	at com.liferay.portal.tools.sass.SassExecutorUtil.parse(SassExecutorUtil.java:115)
      	... 8 more
      [ERROR] 
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      tibusz@tibusz-E6520:~/workspaces/luna/build.css$ 
      

        Attachments

        1. main.css
          0.1 kB
        2. MAVEN-148.zip
          7 kB
        3. resource.css.scss
          0.0 kB
        4. TestCopyDirectoryFromSassToCssBuilderMojo.java
          1 kB

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  4 years, 30 weeks, 6 days ago

                  Packages

                  Version Package