Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Cannot build without clean
Cannot build without clean [message #1856760] Thu, 29 December 2022 13:30 Go to next message
Michel R is currently offline Michel RFriend
Messages: 46
Registered: April 2015
Member
Hello

I use Scout 22.

When I build my application with $ mvn clean install, it works.

When I build again any application, such as out-of-the-box helloworld, the build command:

$ mvn install

fails on helloscout-root.

Attached is the full build log.
The relevant part IMO is:

[DEBUG] Executing command line: [/home/genwyse/Projets/VLM/workspaces/workspace-scout-22/helloscout/target/node/node, /home/genwyse/Projets/VLM/workspaces/workspace-scout-22/helloscout//target/node/node_modules/pnpm/bin/pnpm.cjs, --recursive, update, --no-save, --ignore-scripts]
Scope: all 4 projects
helloscout/target/node                   |  WARN  Moving @eclipse-scout/releng that was installed by a different package manager to "node_modules/.ignored
undefined
/home/genwyse/Projets/VLM/workspaces/workspace-scout-22/helloscout/target/node:
 EEXIST  EEXIST: file already exists, rename '/home/genwyse/Projets/VLM/workspaces/workspace-scout-22/helloscout/target/node/node_modules/@eclipse-scout/releng' -> '/home/genwyse/Projets/VLM/workspaces/workspace-scout-22/helloscout/target/node/node_modules/.ignored/@eclipse-scout/releng'
[ERROR] Command execution failed.


It seems that some existing file/directory put there by the previous build blocks the command.

Is it a bug ? Is it mandatory to perform a clean before ALL builds ?
Can I fix this ?

Thank you.
  • Attachment: build.log
    (Size: 231.55KB, Downloaded 50 times)
Re: Cannot build without clean [message #1856769 is a reply to message #1856760] Fri, 30 December 2022 12:40 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 235
Registered: September 2011
Senior Member
Hi Michel

Basically it should not be necessary to always perform a clean. Even though it is recommended to ensure no old build outputs pollute your artifacts.

The root cause seems to be pnpm which tries to move a dependency to a ".ignored" folder because it detects node modules "installed by a different package manager" as mentioned in the output logs. However this pnpm issue seems to have improved in the version that will be used by the next Scout version 23.1.

Do you use other package mangers for your node modules than pnpm? Maybe npm or yarn? If yes, then the clean might be necessary as the Maven build of Scout only supports pnpm.

If you only use pnpm, you can try to build the parent Maven module instead of the root module.
E.g. if you have a project with the following structure:

helloscout  <-- this is the root module
├─ helloscout  <-- this is the parent module
├─ helloscout.client
├─ helloscout.server
├─ helloscout.server.app.dev
├─ helloscout.server.app.war
├─ helloscout.shared
├─ helloscout.ui.html
├─ helloscout.ui.html.app.dev
└─ helloscout.ui.html.app.war


start your Maven build in the parent module (<projectsDir>/helloscout/helloscout) instead of the root module (<projectsDir>/helloscout). Does this improve the situation?

Kind regards
Mat
Re: Cannot build without clean [message #1856858 is a reply to message #1856769] Thu, 05 January 2023 17:50 Go to previous messageGo to next message
Michel R is currently offline Michel RFriend
Messages: 46
Registered: April 2015
Member
Hi Mathias,

Thank you for the explanations. I agree that a clean is safer but during the development sometimes I just want to rebuild quickly a module.

I have little knowledge of these package managers so forgive my lack of experience here. It is possible that npm could have been used before to build some other application but there should not be any side effect on the build of helloscout.

Anyway, I tried to build from the parent project (instead of the root project) and this problem does not arise. This is what I will do from now.

Thank you.
Michel



Re: Cannot build without clean [message #1856859 is a reply to message #1856858] Thu, 05 January 2023 17:58 Go to previous message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 235
Registered: September 2011
Senior Member
Quote:

I agree that a clean is safer but during the development sometimes I just want to rebuild quickly a module.

I fully understand that :)

Quote:

It is possible that npm could have been used before to build some other application but there should not be any side effect on the build of helloscout.

Exactly.

Quote:

Anyway, I tried to build from the parent project (instead of the root project) and this problem does not arise. This is what I will do from now.


I am happy this works for you :)

Kind regards
Mat
Previous Topic:Backend client bean and dependency injection in services
Next Topic:Cannot get simple chart example working
Goto Forum:
  


Current Time: Sat Nov 09 02:42:19 GMT 2024

Powered by FUDForum. Page generated in 0.03886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top