Skip to content

Conversation

@HannesWell
Copy link
Member

This might be useful if one wants to run Eclipse from Maven without a context project.

@github-actions
Copy link

github-actions bot commented Jul 26, 2025

Test Results

1 008 files  1 008 suites   4h 50m 48s ⏱️
1 293 tests 1 272 ✅ 20 💤 1 ❌
3 879 runs  3 813 ✅ 64 💤 2 ❌

For more details on these failures, see this check.

Results for commit b20967d.

♻️ This comment has been updated with latest results.

}
cli.setJvmExecutable(executable);
cli.setWorkingDirectory(project.getBasedir());
cli.setWorkingDirectory(project != null ? project.getBasedir() : new File("").getAbsoluteFile());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly maven always create an empty project for you when you execute it from within a directory without a pom.

Beside that a temp directory might be better to use?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly maven always create an empty project for you when you execute it from within a directory without a pom.

I don't know that, but I assume the empty project, will then have the current working directory as directory? So basically the same result.

Beside that a temp directory might be better to use?

The idea was that the current working directory where the direct CLI invocation is launched is probably also interesting was working directory of the eclipse run (just 'forwarding' the shell's workding directory to the Eclipse run).

@HannesWell HannesWell force-pushed the eclipserun-without-project branch from 6d7bd78 to d3fb852 Compare August 8, 2025 19:04
@HannesWell HannesWell force-pushed the eclipserun-without-project branch from d3fb852 to b20967d Compare August 9, 2025 14:13
@HannesWell
Copy link
Member Author

I did now make some experiments and there is indeed an empty project injected if no pom is available, but its basedir is null. So I adjusted that.
But this experiment also showed that it doesn't work that simply as one has to define a (p2-) repository to resolve the artifacts building the runtime.
And as a repository is a complex type, I'm not aware of a way to define it on the CLI, or do you know one?

@laeubi
Copy link
Member

laeubi commented Sep 15, 2025

What cam into my mind is to define an additional parameter (e.g. repo-url) that can be used as a fallback for CLI invocation, we can then use an ID as eclipse-run-cli for example so users can still configure that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants