掲示板

Maven goal build-css fails in maven build

6年前 に Thomas Pieronczyk によって更新されました。

Maven goal build-css fails in maven build

New Member 投稿: 3 参加年月日: 16/10/14 最新の投稿
Hi,

we have a multi module maven build which includes multiple liferay-theme projects. Not always but often the build fails with the error message listed below. We use maven parallel build capability. As the build fails sporadically, we assume that it may be related to multithreading. Has anyone any experience with this kind of problem and knows a solution?

We're using Liferay 6.2-GA4.


[ERROR] Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:6.2.2:build-css (default) on project <projectname>: null: MojoExecutionException: InvocationTargetException: Neither current working directory (null) nor pathname (classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8) led to an absolute path -&gt; [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.liferay.maven.plugins:liferay-maven-plugin:6.2.2:build-css (default) on project <projectname>: null
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    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:116)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:188)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:184)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
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:132)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 11 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    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)
    ... 13 more
Caused by: java.lang.IllegalArgumentException: Neither current working directory (null) nor pathname (classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8) led to an absolute path
    at org.jruby.util.JRubyFile.createNoUnicodeConversion(JRubyFile.java:71)
    at org.jruby.util.JRubyFile.create(JRubyFile.java:52)
    at org.jruby.runtime.load.LoadService.tryResourceFromLoadPath(LoadService.java:1183)
    at org.jruby.runtime.load.LoadService.tryResourceFromLoadPathOrURL(LoadService.java:1092)
    at org.jruby.runtime.load.LoadService.findLibraryWithoutCWD(LoadService.java:865)
    at org.jruby.runtime.load.LoadService$NormalSearcher.trySearch(LoadService.java:567)
    at org.jruby.runtime.load.LoadService.findFileForLoad(LoadService.java:285)
    at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:332)
    at org.jruby.runtime.load.LoadService.require(LoadService.java:381)
    at org.jruby.Ruby.initBuiltins(Ruby.java:1520)
    at org.jruby.Ruby.init(Ruby.java:1098)
    at org.jruby.Ruby.newInstance(Ruby.java:182)
    at org.jruby.embed.internal.LocalContext.getThreadSafeRuntime(LocalContext.java:69)
    at org.jruby.embed.internal.ThreadSafeLocalContextProvider.getRuntime(ThreadSafeLocalContextProvider.java:61)
    at org.jruby.embed.ScriptingContainer.put(ScriptingContainer.java:1091)
    at com.liferay.portal.scripting.ruby.RubyExecutor.doEval(RubyExecutor.java:181)
    at com.liferay.portal.scripting.ruby.RubyExecutor.eval(RubyExecutor.java:229)
    at com.liferay.portal.scripting.ruby.RubyExecutor.eval(RubyExecutor.java:129)
    at com.liferay.portal.tools.SassToCssBuilder._parseSassFile(SassToCssBuilder.java:288)
    at com.liferay.portal.tools.SassToCssBuilder._parseSassDirectory(SassToCssBuilder.java:247)
    at com.liferay.portal.tools.SassToCssBuilder.<init>(SassToCssBuilder.java:139)
    at com.liferay.portal.tools.SassToCssBuilder.main(SassToCssBuilder.java:93)
    ... 20 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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :liferay-page-management
[JENKINS] Zeichne Testergebnisse auf
[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: java.util.concurrent.ExecutionException: Invalid object ID 29 iota=100
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.7.201606060606:report (post-unit-test) @ formular-api ---
[INFO] Loading execution data file /srv/jenkins-slave/slave/workspace/imbw-serviceportal-build-all-build/formular-api/target/coverage-reports/jacoco-ut.exec
[INFO] Analyzed bundle 'formular-api' with 97 classes
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.798 sec
[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: java.util.concurrent.ExecutionException: Invalid object ID 29 iota=100
</goals></init></projectname></projectname>
thumbnail
6年前 に Andrew Jardine によって更新されました。

RE: Maven goal build-css fails in maven build

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hi Thomas,

Don't want to leave your post completely unanswered -- but I have never come across this issue. I would guess that your theory is correct though based on the error output. If you still think that maybe it is related to a Liferay issue, then you could possibly try upgrading to the latest 6.2 release (GA5) and see if that fixes the issue.

But if you can stop it from happening simply by forcing a single threaded build, then I would guess that is the culprit. I wonder, is it possible to group all the items that are dependent on one another into one of the threads to force them to execute in a certain order to help prevent the problem?
6年前 に Thomas Pieronczyk によって更新されました。

RE: Maven goal build-css fails in maven build

New Member 投稿: 3 参加年月日: 16/10/14 最新の投稿
Hi Andrew,

thank you for your quick reply. I would prefer to keep the multithreaded build, as switching to singlethreaded builds leads to long build cycles as we have many modules to build. Hopefully we can switch to GA5 Liferay Version soon. As far as I know it is not possible in maven to bind specific modules to a single thread in a multithreaded setup. Would it help to post this error as a bug in the tracker?

Cheers.
thumbnail
6年前 に Andrew Jardine によって更新されました。

RE: Maven goal build-css fails in maven build

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
I don't see how it would hurt to post a bug. For myself though I always try reproducing with the latest first though to make sure that the issue isn't because I am not using the latest. No point in cluttering the bug tracker unnecessarily right?

I'm kind of pressed for time at the moment, but if you want to post the steps for me to reproduce something similar on my side to test it (I have a GA6 install) then I can try to reproduce the issue. Not sure how much work it would be for me to setup a similar scenario is all.