Skip to content

#1165: fix eclipse automatic project import - #2323

Merged
hohwille merged 4 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/1165-fix-eclipse-automatic-import
Aug 18, 2026
Merged

#1165: fix eclipse automatic project import#2323
hohwille merged 4 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/1165-fix-eclipse-automatic-import

Conversation

@Ali-Shariati-Najafabadi

@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #1165

Implemented changes:

  • Reordered the arguments passed to eclipse for importRepository so -application/-buildfile come before -vmargs. Everything after -vmargs is forwarded to the JVM instead of being parsed by eclipse itself, so -application org.eclipse.ant.core.antRunner was never seen by eclipse and it silently fell back to launching the normal GUI instead of running the headless ant import.
  • Fixed a property key mismatch: the Java side passed -DrepositoryImportPath=... but eclipse-import.groovy read it back via antProperties.get("devonImportPath") (leftover from an incomplete rename), so the import path was never picked up.

Testing instructions

  1. Configure a repository with import=eclipse in your settings repository (see repository.adoc).
  2. Run ide create <project> <settings-git-url> (or ide repository on an existing project).
  3. Verify the project import into eclipse runs headlessly in the background without popping up the eclipse GUI and without requiring you to close anything manually.
  4. Alternatively run mvn -Dtest=EclipseTest test in the cli module, which covers the fix with EclipseTest#testImportRepository.

Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Aug 13, 2026
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi added enhancement New feature or request repository Commandlet to clone, build or import git repositories eclipse related to Eclipse IDE labels Aug 13, 2026
@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi moved this from 🆕 New to 🏗 In progress in IDEasy board Aug 13, 2026
@hohwille hohwille moved this from 🏗 In progress to Team Review in IDEasy board Aug 13, 2026
@coveralls

coveralls commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 32127626265

Coverage increased (+0.01%) to 72.921%

Details

  • Coverage increased (+0.01%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 2 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/version/VersionSegment.java 2 90.81%

Coverage Stats

Coverage Status
Relevant Lines: 17556
Covered Lines: 13352
Line Coverage: 76.05%
Relevant Branches: 7759
Covered Branches: 5108
Branch Coverage: 65.83%
Branches in Coverage %: Yes
Coverage Strength: 3.23 hits per line

💛 - Coveralls

@Hiepiscus Hiepiscus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Ali-Shariati-Najafabadi Thanks for the PR. I followed the test instructions using a local repository configuration with import=eclipse.

During the setup, I got the following Eclipse error dialog:
Image

After closing the dialog, the setup continued and eventually reported: Successfully ended step 'Setup of repository test-eclipse'.

I am not sure whether this is related to the changes in this PR or to my local Eclipse setup, but I wanted to mention it as part of my testing. I also did not see the Eclipse IDE window being launched during the import.

@hohwille hohwille added this to the release:2026.08.002 milestone Aug 13, 2026

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Ali-Shariati-Najafabadi I never took the time to analyse what was going wrong here but your PR now opened my eyes and all seems to make sense. Great that you were able to trace this down and make this work again. 👍

I have one remark that should be addressed, then we can merge.

Comment thread cli/src/main/java/com/devonfw/tools/ide/tool/eclipse/Eclipse.java
@github-project-automation github-project-automation Bot moved this from Team Review to 👀 In review in IDEasy board Aug 13, 2026
@Ali-Shariati-Najafabadi

Copy link
Copy Markdown
Contributor Author

@Ali-Shariati-Najafabadi Thanks for the PR. I followed the test instructions using a local repository configuration with import=eclipse.

During the setup, I got the following Eclipse error dialog: Image

After closing the dialog, the setup continued and eventually reported: Successfully ended step 'Setup of repository test-eclipse'.

I am not sure whether this is related to the changes in this PR or to my local Eclipse setup, but I wanted to mention it as part of my testing. I also did not see the Eclipse IDE window being launched during the import.

Thanks for testing! Good news: the actual #1165 bug is fixed and no GUI popup, import finished fine.
That dialog is something else though. could you send me the .metadata.log it mentions?

@Hiepiscus

Copy link
Copy Markdown
Contributor

I reviewed the .metadata log file and found that the /_ide/internal/eclipse-import.groovy file was missing. After adding it to the directory, it works now. Thanks!

@hohwille
hohwille merged commit 29cd91e into devonfw:main Aug 18, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in IDEasy board Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eclipse related to Eclipse IDE enhancement New feature or request repository Commandlet to clone, build or import git repositories

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Automatic project import for Eclipse

4 participants