Cannot build project [message #1830644] |
Thu, 30 July 2020 07:42  |
Eclipse User |
|
|
|
Hi,
I created new Scout 10 project using latest Eclipse. I have Node installed.
I can run app localy. But problem is when I try to build .war files. It gets failed on UI.HTML project.
I use clean verify command on main project.
This is error:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (scout-releng-snapshot-install-dependency) on project
Tried this 10 times already, but no luck.
Before I could create new project, but now I cant.
This is error with maven -X command:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (scout-releng-snapshot-install-dependency) on project testproject.ui.html: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (scout-releng-snapshot-install-dependency) on project testproject.ui.html: Command execution failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
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:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:326)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
... 20 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
... 22 more
[ERROR]
[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 <args> -rf :testproject.ui.html
|
|
|
|
|
|
|
Re: Cannot build project [message #1830890 is a reply to message #1830862] |
Thu, 06 August 2020 00:16   |
Eclipse User |
|
|
|
Hi Andre,
I also experienced same issue.
I couldn't fine the module "@eclipse-scout/releng" in my node_modules directory in the following location.
E:\senaka\eclipseworkspace\helloworld\helloworld\target\node\node_modules
In this directory has npm sub directory only.
I have checked the package.json file and" @eclipse-scout/releng" devDependency is there.
devDependencies": {
"@eclipse-scout/cli": "10.0.21",
"@eclipse-scout/testing": "10.0.21",
"@eclipse-scout/releng": "^10.0.0",
"@eclipse-scout/eslint-config": "10.0.21",
"eslint": "6.5.1",
"babel-eslint": "10.0.3",
"eslint-plugin-babel": "5.3.0"
},
I have attached package.json file for your reference.
Please check following for my node and java versions.
node --version
v12.16.1
npm --version
6.13.4
pnpm --version
4.13.0
java -version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
Regards
Senaka
Attachment: package.json
(Size: 1.36KB, Downloaded 114 times)
|
|
|
|
|
|
|
|
|
|
Re: Cannot build project [message #1830972 is a reply to message #1830951] |
Fri, 07 August 2020 10:06   |
Eclipse User |
|
|
|
Hi Senaka
Thanks again for posting your build log here. We've analyzed your log and I compared it against my own build log. I found this difference:
[Your Log]
[INFO] Running 'npm install -g pnpm@4.13.0 @eclipse-scout/releng@^10.0.0' in E:\senaka\eclipseworkspace\helloworld\helloworld.ui.html
[DEBUG] Executing command line [E:\senaka\eclipseworkspace\helloworld\helloworld.ui.html\..\helloworld\target\node\..\node\node.exe, E:\senaka\eclipseworkspace\helloworld\helloworld.ui.html\..\helloworld\target\node\..\node\node_modules\npm\bin\npm-cli.js, install, -g, pnpm@4.13.0, @eclipse-scout/releng@^10.0.0]
[INFO] C:\Users\mathe\AppData\Roaming\npm\releng-scripts -> C:\Users\mathe\AppData\Roaming\npm\node_modules\@eclipse-scout\releng\bin\releng-scripts.js
[INFO] C:\Users\mathe\AppData\Roaming\npm\pnpm -> C:\Users\mathe\AppData\Roaming\npm\node_modules\pnpm\bin\pnpm.js
[INFO] C:\Users\mathe\AppData\Roaming\npm\pnpx -> C:\Users\mathe\AppData\Roaming\npm\node_modules\pnpm\bin\pnpx.js
[INFO] + pnpm@4.13.0
[INFO] + @eclipse-scout/releng@10.0.3
[INFO] updated 2 packages in 60.155s
[My Log]
[INFO] Running 'npm install -g pnpm@4.13.0 @eclipse-scout/releng@^10.0.0' in C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld.ui.html
[DEBUG] Executing command line [C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld.ui.html\..\helloworld\target\node\..\node\node.exe, C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld.ui.html\..\helloworld\target\node\..\node\node_modules\npm\bin\npm-cli.js, install, -g, pnpm@4.13.0, @eclipse-scout/releng@^10.0.0]
[INFO] C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld\target\node\releng-scripts -> C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld\target\node\node_modules\@eclipse-scout\releng\bin\releng-scripts.js
[INFO] C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld\target\node\pnpm -> C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld\target\node\node_modules\pnpm\bin\pnpm.js
[INFO] C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld\target\node\pnpx -> C:\Temp\eclipse-scout-2020-06-R-win32-x86_64\workspaces\helloworld\helloworld\target\node\node_modules\pnpm\bin\pnpx.js
[INFO] + pnpm@4.13.0
[INFO] + @eclipse-scout/releng@10.0.3
[INFO] added 181 packages from 101 contributors in 43.276s
In your case the two modules @eclipse-scout/releng and pnpm are installed in C:\Users\mathe\AppData\Roaming\npm, but the build expects them to be installed under the workspace/helloworld/ directory. I guess this has something to do with how you've installed NPM. I will open a Bugzilla bug for this: the build must work independent from how exactly one has installed NPM. See: Bug 565896 - Maven build fails because NPM modules are installed at the wrong location.
Could you please check if there is a NODE_PATH environment variable set on your machine?
As a workaround you could try to manually copy all files from "C:\Users\mathe\AppData\Roaming\npm\node_modules\@eclipse-scout" to "E:\senaka\eclipseworkspace\helloworld\helloworld\target\node\node_modules\@eclipse-scout" where the build expects these files. And run the build again without "clean", otherwise the directory will be deleted again.
You could also try to change the NODE_PATH variable and point it to the directory "E:\senaka\eclipseworkspace\helloworld\helloworld\target\node\node_modules" before you run the build (untested).
Hope that helps. Cheers,
André
[Updated on: Fri, 07 August 2020 10:39] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.28739 seconds