Skip to content

Automatic project import for Eclipse #1165

Description

@hohwille

Expected behavior

As a IDEasy user, I want eclipse git repository project imports to happen automatically in the background so that I do not get disturbed and everything is automated without the need for me to interact.

Hint: via repository configuration and by setting import=eclipse this feature can be triggered.

Actual behavior

The automated project import seems to launch Eclipse GUI and IDEasy waits for the process to terminate what requires me to close the GUI.
Also the actual import does not seem to do anything instead of opening the Eclipse GUI.

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. ide create mmm https://github.com/m-m-m/settings.git

Related/Dependent Issues

Comments/Hints:

  • Project import is now implemented in IDEasy in the same way it was done in devonfw-ide but it seems that something was done wrong in IDEasy or it was always fragile/buggy and needs rework.

Links into the code:

public void importRepository(Path repositoryPath) {
if (!this.groovyInstalled) {
Mvn maven = this.context.getCommandletManager().getCommandlet(Mvn.class);
MvnArtifact groovyAnt = new MvnArtifact("org.codehaus.groovy", "groovy-ant", GROOVY_VERSION);
maven.getOrDownloadArtifact(groovyAnt);
this.groovyInstalled = true;
}
// -DdevonImportPath=\"${import_path}\" -DdevonImportWorkingSet=\"${importWorkingSets}\""
runTool(ProcessMode.DEFAULT, null, ProcessErrorHandling.THROW_CLI, VMARGS,
"-DrepositoryImportPath=\"" + repositoryPath + "\" -DrepositoryImportWorkingSet=\"" + "" + "\"", "-application", "org.eclipse.ant.core.antRunner",
"-buildfile", this.context.getIdeInstallationPath().resolve(IdeContext.FOLDER_INTERNAL).resolve("eclipse-import.xml").toString());
}

See also https://github.com/devonfw/IDEasy/tree/main/cli/src/main/package/internal

Affected version:

  • 2025.03.002-SNAPSHOT

See #1006

Metadata

Metadata

Labels

eclipserelated to Eclipse IDEenhancementNew feature or requestready-to-implementrepositoryCommandlet to clone, build or import git repositories

Projects

Status
🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions