maven吧 关注:1,515贴子:3,158
  • 0回复贴,共1

大神来看看,unix下maven解析scss出错

只看楼主收藏回复

在window下pom.xml中配置
<plugin> <groupId>org.jasig.maven</groupId> <artifactId>sass-maven-plugin</artifactId> <version>1.1.1</version> <executions> <execution> <phase>generate-resources</phase> <goals> <goal>update-stylesheets</goal> </goals> </execution> </executions></plugin>


用来解析scss可以成功打包,但是到unix下就报错,请问在unix下pom.xml中应该配置哪种插件才能成功
错误信息:
[INFO] --- sass-maven-plugin:1.1.1:update-stylesheets (default) ---
[INFO] Compiling SASS Templates
[INFO] Queing SASS Template for compile: /export/home/support/ccnyan/version79/src/main/webapp => /export/home/support/ccnyan/version79/target/supplierportal-79.0-SNAPSHOT
[INFO] Queing SASS Template for compile: /export/home/support/ccnyan/version79/src/main/webapp/resources/css/scss => /export/home/support/ccnyan/version79/target/supplierportal-79.0-SNAPSHOT/resources/css/scss/..
[INFO] Queing SASS Template for compile: /export/home/support/ccnyan/version79/src/main/webapp/resources/scss => /export/home/support/ccnyan/version79/target/supplierportal-79.0-SNAPSHOT/resources/scss/..
Errno::ENOENT: No such file or directory -
mkdir at org/jruby/RubyDir.java:576
fu_mkdir at file:/export/home/support/ccnyan/maven-repo/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/fileutils.rb:243
mkdir_p at file:/export/home/support/ccnyan/maven-repo/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/fileutils.rb:217
reverse_each at org/jruby/RubyArray.java:1700
mkdir_p at file:/export/home/support/ccnyan/maven-repo/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/fileutils.rb:215
each at org/jruby/RubyArray.java:1620
mkdir_p at file:/export/home/support/ccnyan/maven-repo/org/jruby/jruby-complete/1.6.8/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/fileutils.rb:201
update_stylesheet at file:/export/home/support/ccnyan/maven-repo/org/jasig/maven/sass-maven-plugin/1.1.1/sass-maven-plugin-1.1.1.jar!/gems/sass-3.2.8/lib/sass/plugin/compiler.rb:335
update_stylesheets at file:/export/home/support/ccnyan/maven-repo/org/jasig/maven/sass-maven-plugin/1.1.1/sass-maven-plugin-1.1.1.jar!/gems/sass-3.2.8/lib/sass/plugin/compiler.rb:203
each at org/jruby/RubyArray.java:1620
update_stylesheets at file:/export/home/support/ccnyan/maven-repo/org/jasig/maven/sass-maven-plugin/1.1.1/sass-maven-plugin-1.1.1.jar!/gems/sass-3.2.8/lib/sass/plugin/compiler.rb:201
update_stylesheets at file:/export/home/support/ccnyan/maven-repo/org/jasig/maven/sass-maven-plugin/1.1.1/sass-maven-plugin-1.1.1.jar!/gems/sass-3.2.8/lib/sass/plugin.rb:81
(root) at <script>:25
org.jruby.embed.EvalFailedException: (ENOENT) No such file or directory -
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:136)
at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:90)
at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:153)
at org.jasig.maven.plugin.sass.AbstractSassMojo.executeSassScript(AbstractSassMojo.java:191)
at org.jasig.maven.plugin.sass.UpdateStylesheetsMojo.execute(UpdateStylesheetsMojo.java:43)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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.jruby.exceptions.RaiseException: (ENOENT) No such file or directory -
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:07.136s
[INFO] Finished at: Thu Oct 23 15:55:25 CST 2014
[INFO] Final Memory: 15M/144M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jasig.maven:sass-maven-plugin:1.1.1:update-stylesheets (default) on project supplierportal: Failed to execute SASS ruby script:
[ERROR] require *rubygems*
[ERROR] env = { *GEM_PATH* => [
[ERROR] */export/home/support/ccnyan/version79/target/rubygems*
[ERROR] ] }
[ERROR] env[*GEM_PATH*] += ENV[*GEM_PATH*] unless ENV[*GEM_PATH*].nil?
[ERROR] Gem.paths = env
[ERROR] require *sass/plugin*
[ERROR] require *java*
[ERROR] Sass::Plugin.options.merge!(
[ERROR] :cache_location => */export/home/support/ccnyan/version79/target/sass_cache*,
[ERROR] :style => :expanded,
[ERROR] :cache => true,
[ERROR] :unix_newlines => true,
[ERROR] :css_location => */export/home/support/ccnyan/version79/target/supplierportal-79.0-SNAPSHOT*,
[ERROR] :template_location => */export/home/support/ccnyan/version79/src/main/webapp*,
[ERROR] :always_update => true
[ERROR] )
[ERROR] Sass::Plugin.add_template_location(*/export/home/support/ccnyan/version79/src/main/webapp/resources/css/scss*, */export/home/support/ccnyan/version79/target/supplierportal-79.0-SNAPSHOT/resources/css/scss/..*)
[ERROR] Sass::Plugin.add_template_location(*/export/home/support/ccnyan/version79/src/main/webapp/resources/scss*, */export/home/support/ccnyan/version79/target/supplierportal-79.0-SNAPSHOT/resources/scss/..*)
[ERROR] Sass::Plugin.on_compilation_error {|error, template, css| $compiler_callback.compilationError(error.message, template, css) }
[ERROR] Sass::Plugin.on_updated_stylesheet {|template, css| $compiler_callback.updatedStylesheeet(template, css) }
[ERROR] Sass::Plugin.on_template_modified {|template| $compiler_callback.templateModified(template) }
[ERROR] Sass::Plugin.on_template_created {|template| $compiler_callback.templateCreated(template) }
[ERROR] Sass::Plugin.on_template_deleted {|template| $compiler_callback.templateDeleted(template) }
[ERROR] Sass::Plugin.update_stylesheets: org.jruby.exceptions.RaiseException: (ENOENT) No such file or directory -
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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


回复
1楼2014-10-23 16:26