Run task only once [message #1852045] |
Wed, 27 April 2022 12:39 |
Cosmin Pop Messages: 1 Registered: April 2022 |
Junior Member |
|
|
We have a number of tasks defined in the installation.setup file, which run every time a new workspace is created, or an existing one is opened.
One of the tasks is a "Projects Import" task which imports the projects based on the location of the workspace(as a rule, we define the workspace inside a project).
Often times we do not need all of the modules that are being imported, so we remove them(only from the workspace, not from disk). However, because the import project task runs every time a workspace is opened, the modules that we removed are being re-imported.
We are looking for a way to prevent this behaviour. So far, we have tried the following:
- setting a bootstrap trigger -> not available in projects import task
- filter by a variable which we set to false after workspace has been created -> does not work because variables are evaluated before tasks are executed
- create a file inside the workspace, and do the import tasks projects only if the file does not exist -> we were able to create the file, but were unable to check if it exists. According to this post https://www.eclipse.org/forums/index.php/t/1070369/, this could be the way, but we're not sure how to do it.
- overwrite workspace.setup from within a task in installation.setup -> we tried using ResourceCopy, TextModify, but workspace.setup gets overwritten back to its original value(empty)
- create new setup file and import it with an eclipse ini task, but only after workspace has been created - it tried to load the file before tasks are run
|
|
|
|
Powered by
FUDForum. Page generated in 0.03254 seconds