From 58a3968cfa9659e91f72b540c336c1463727acdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Thu, 23 Jan 2025 11:50:16 +0100 Subject: [PATCH 01/12] #979: configure reflection to make xpath work (#980) --- .../ide-cli/reflect-config.json | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cli/src/main/resources/META-INF/native-image/com.devonfw.tools.IDEasy/ide-cli/reflect-config.json diff --git a/cli/src/main/resources/META-INF/native-image/com.devonfw.tools.IDEasy/ide-cli/reflect-config.json b/cli/src/main/resources/META-INF/native-image/com.devonfw.tools.IDEasy/ide-cli/reflect-config.json new file mode 100644 index 000000000..0f04bd615 --- /dev/null +++ b/cli/src/main/resources/META-INF/native-image/com.devonfw.tools.IDEasy/ide-cli/reflect-config.json @@ -0,0 +1,20 @@ +[ + { + "name": "com.sun.org.apache.xpath.internal.functions.FuncNormalizeSpace", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.sun.org.apache.xpath.internal.functions.FuncLocalPart", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + } +] From 098604ee24fdf25cc1926890a3fb286065cabb96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Thu, 23 Jan 2025 11:55:18 +0100 Subject: [PATCH 02/12] #919: #979: added to CHANGELOG.adoc --- CHANGELOG.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index e2b632fc5..a43466d11 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -2,6 +2,14 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDEasy]. +== 2025.01.002 + +Release with important bugfixes: + +* https://github.com/devonfw/IDEasy/issues/979[#979]: XML Merger: Failed to compile XPath expression + +The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/19?closed=1[milestone 2025.01.002]. + == 2025.01.001 Release with new features and bugfixes: @@ -11,6 +19,7 @@ Release with new features and bugfixes: * https://github.com/devonfw/IDEasy/issues/916[#916]: download is missing status code error handling * https://github.com/devonfw/IDEasy/issues/757[#757]: Support to allow settings in code repository * https://github.com/devonfw/IDEasy/issues/826[#826]: Fix git settings check when settings folder is empty +* https://github.com/devonfw/IDEasy/issues/919[#919]: Require user to agree to license * https://github.com/devonfw/IDEasy/issues/898[#898]: Improved output of get-version/edition and uninstall/-plugin * https://github.com/devonfw/IDEasy/issues/894[#894]: ide.bat not printing if IDEasy was initialized * https://github.com/devonfw/IDEasy/issues/759[#759]: Add UpgradeSettingsCommandlet for the upgrade of legacy devonfw-ide settings to IDEasy From 004264fff9616d1a46c80e1b3afa5a940cf0fc2c Mon Sep 17 00:00:00 2001 From: Seva <118260068+zeva369@users.noreply.github.com> Date: Fri, 24 Jan 2025 13:47:59 +0100 Subject: [PATCH 03/12] #984: windows documentation: typo's correction (#986) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * windows documentation: typo's correction * Update documentation/advanced-tooling-windows.adoc --------- Co-authored-by: Jörg Hohwiller --- documentation/advanced-tooling-windows.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/documentation/advanced-tooling-windows.adoc b/documentation/advanced-tooling-windows.adoc index 5c9117a95..eca188acb 100644 --- a/documentation/advanced-tooling-windows.adoc +++ b/documentation/advanced-tooling-windows.adoc @@ -28,7 +28,7 @@ This nice feature can be added to many other tools. === Tabs for Windows Explorer -Since Windows 11 the Windows Exporer supports Tabs. +Since Windows 11 the Windows Explorer supports Tabs. .Tabs in Windows Explorer image::images/tools-tabs-explorer.png["tabs in windows explorer"] @@ -48,7 +48,7 @@ If you want to use different shells like CMD, Powershell, git-bash, WSL, SSH, et .Tabs for multiple shells inside one window image::images/WindowsTerminal.png["Shells inside Windows-Terminal"] -For perfect integration, you should (re-)insall `git` after Windows-Terminal has been installed and check the option `Add a Git Bash Profile to Windows Terminal` or follow the https://www.timschaeps.be/post/adding-git-bash-to-windows-terminal/[manual integration]. +For perfect integration, you should (re-)install `git` after Windows-Terminal has been installed and check the option `Add a Git Bash Profile to Windows Terminal` or follow the https://www.timschaeps.be/post/adding-git-bash-to-windows-terminal/[manual integration]. .Integration of git-bash into Windows-Terminal image::https://linuxhint.com/wp-content/uploads/2022/09/add-git-bash-windows-terminal-05.png["Intergate git-bash into Windows-Terminal"] @@ -78,7 +78,7 @@ Just install http://www.7-zip.org/[7zip] and forget about windows build-in ZIP s Do you want to paste something from the clipboard but meanwhile you had to copy something else? On Windows 11 just press [Win][v] to open a popup with the history of your clipboard. -I you still want more you might try http://ditto-cp.sourceforge.net/[ditto]. +If you still want more you might try http://ditto-cp.sourceforge.net/[ditto]. === PowerToys @@ -108,14 +108,14 @@ Do you have to work with Windows? Would you also like to have such links in Windows? Why not? Windows https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/[supports real links] (not shortcuts like in other cases). -If you even want to have it integrated in windows explorer you might want to install http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html[linkshellextension]. +If you even want to have it integrated in Windows explorer you might want to install http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html[linkshellextension]. However, you might want to disable SmartMove in the http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#configuration[configuration] if you face strange performance issues when moving folders. === Linux Windows contains the Windows Subsystem for Linux (WSL) that allows you to easily run a linux inside your Windows operating system. Unlike running a full-fledged VM this is very lightweight and fast. -Simply go to Windows Store and install Ubunutu with a few clicks. +Simply go to Windows Store and install Ubuntu with a few clicks. You can even run it in a tab in Windows Terminal. Also get used to use bash. Git for Windows ships with the MINGW based git-bash. @@ -128,7 +128,7 @@ This allows you to install ssh with ssh-agent and all the Linux tools you love ( === X11 Do you want to connect via SSH and need to open an X11 app from the server? -Do you want to see the GUI on your windows desktop? +Do you want to see the GUI on your Windows desktop? No problem: Install https://sourceforge.net/projects/vcxsrv/[VcXsrv]. === Keyboard Freak @@ -145,7 +145,7 @@ For the example (« and ») you can simply use this script to get started: First, just press `[ctrl][<]` and `[ctrl][>]` (`[ctrl][shift][<]`). Next, create shortcuts to launch your IDE, to open your favorite tool, etc. -If you like a GUI to easily configure the scrips, that comes with a lot of extensions preinstalled, you should have a look at https://activaid.telgkamp.de/[Ac'tive Aid]. +If you like a GUI to easily configure the scrips, that comes with a lot of extensions preinstalled, you should have a look at https://activaid.telgkamp.de/[Ac'tiveAid]. === Paint anywhere on your desktop From 949fb99f90e89bafa90e3a45e61db29119f6b3ac Mon Sep 17 00:00:00 2001 From: devonfw-core Date: Fri, 24 Jan 2025 12:56:23 +0000 Subject: [PATCH 04/12] set release version to 2025.01.002-beta --- .mvn/maven.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/maven.config b/.mvn/maven.config index 70a680831..f3f0d01f0 100644 --- a/.mvn/maven.config +++ b/.mvn/maven.config @@ -1 +1 @@ --Drevision=2025.01.002-beta-SNAPSHOT +-Drevision=2025.01.002-beta From 307966958bf6653cb42a58d6accda9d24f278a97 Mon Sep 17 00:00:00 2001 From: devonfw-core Date: Fri, 24 Jan 2025 13:03:59 +0000 Subject: [PATCH 05/12] set next version to 2025.01.003-beta-SNAPSHOT --- .mvn/maven.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/maven.config b/.mvn/maven.config index f3f0d01f0..02781b5e5 100644 --- a/.mvn/maven.config +++ b/.mvn/maven.config @@ -1 +1 @@ --Drevision=2025.01.002-beta +-Drevision=2025.01.003-beta-SNAPSHOT From c44479b1a20c97c55c3c09f42404db70fc40daf9 Mon Sep 17 00:00:00 2001 From: Yurii Date: Mon, 27 Jan 2025 10:33:36 +0100 Subject: [PATCH 06/12] #975: addon changes corresponding to issue 853 (#977) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update: make the help text clear refine the text for 'ide repository' make the use of quote (single and double) consistent * add: add unit test for 'repository' * Update cli/src/main/resources/nls/Help_de.properties Co-authored-by: jan-vcapgemini <59438728+jan-vcapgemini@users.noreply.github.com> * Update cli/src/main/resources/nls/Help_de.properties --------- Co-authored-by: jan-vcapgemini <59438728+jan-vcapgemini@users.noreply.github.com> Co-authored-by: Jörg Hohwiller --- cli/src/main/resources/nls/Help.properties | 4 ++-- cli/src/main/resources/nls/Help_de.properties | 2 +- .../devonfw/tools/ide/completion/IdeCompleterTest.java | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cli/src/main/resources/nls/Help.properties b/cli/src/main/resources/nls/Help.properties index 9ee1535bc..ccdbaa1b1 100644 --- a/cli/src/main/resources/nls/Help.properties +++ b/cli/src/main/resources/nls/Help.properties @@ -80,7 +80,7 @@ cmd.pgadmin=Tool commandlet for pgAdmin. cmd.pgadmin.detail=pgAdmin is an open source management tool for PostgreSQL and derivative relational databases. Detailed documentation can be found at https://www.pgadmin.org/docs/pgadmin4/latest/index.html cmd.quarkus=Tool commandlet for Quarkus (framework for cloud-native apps). cmd.quarkus.detail=Quarkus is a Kubernetes-native Java framework for building cloud-native applications. Detailed documentation can be found at https://quarkus.io/ -cmd.repository=Setup pre-configured git repositories (clone, build, import). +cmd.repository=Set up pre-configured git repositories using 'ide repository setup ' cmd.repository.detail=Without further arguments this will set up all pre-configured git repositories.\nAlso, you can provide an explicit git repo as `` argument and IDEasy will automatically clone, build and set up your project based on the existing property file.\nRepositories are configured in 'settings/repository/.properties' and can therefore be shared with your project team for automatic or optional setup. cmd.repository.val.repository=The name of the properties file of the pre-configured git repository to set up, omit to set up all active repositories. cmd.set-edition=Set the edition of the selected tool. @@ -132,7 +132,7 @@ toolcommandlets=Available tool commandlets: usage=Usage: val.args=The commandline arguments to pass to the tool. val.cfg=Selection of the configuration file (settings | home | conf | workspace). -val.commandlet=The selected commandlet (use "ide help" to list all commandlets). +val.commandlet=The selected commandlet (use 'ide help' to list all commandlets). val.edition=The tool edition. val.plugin=The plugin to select val.settingsRepository=The settings git repository with the IDEasy configuration for the project. diff --git a/cli/src/main/resources/nls/Help_de.properties b/cli/src/main/resources/nls/Help_de.properties index a73ea56e3..6abc331c4 100644 --- a/cli/src/main/resources/nls/Help_de.properties +++ b/cli/src/main/resources/nls/Help_de.properties @@ -80,7 +80,7 @@ cmd.pgadmin=Werkzeug Kommando für pgAdmin. cmd.pgadmin.detail=pgAdmin ist ein Open-Source-Verwaltungswerkzeug for PostgreSQL und verwandte relationale Datenbanken. Detaillierte Dokumentation ist zu finden unter https://www.pgadmin.org/docs/pgadmin4/latest/index.html cmd.quarkus=Werkzeug Kommando für Quarkus (Framework für Cloud-native Anwendungen). cmd.quarkus.detail=Quarkus ist ein Kubernetes-native Java-Framework zur Entwicklung von Cloud-native Anwendungen. Detaillierte Dokumentation ist zu finden unter https://quarkus.io/ -cmd.repository=Richtet das vorkonfigurierte Git Repository ein. +cmd.repository=Richtet das vorkonfigurierte Git Repository ein mittels 'ide repository setup '. cmd.repository.detail=Dies wird alle vorkonfigurierten Repositories einrichten. Rufen Sie einfach 'ide repository setup ' auf, ersetzen Sie durch den Namen Ihrer Projektkonfigurationsdatei, die sich in 'settings/repository/your_project_name' befindet und IDEasy wird Ihr Projekt basierend auf der vorhandenen Eigenschaftsdatei automatisch klonen, bauen und einrichten.\nWenn Sie den Projektnamen weglassen, werden alle im Repository-Verzeichnis gefundenen Projekte vorkonfiguriert. cmd.repository.val.repository=Der Name der Properties-Datei des vorkonfigurierten Git Repositories zum Einrichten. Falls nicht angegeben, werden alle aktiven Projekte eingerichtet. cmd.set-edition=Setzt die Edition des selektierten Werkzeugs. diff --git a/cli/src/test/java/com/devonfw/tools/ide/completion/IdeCompleterTest.java b/cli/src/test/java/com/devonfw/tools/ide/completion/IdeCompleterTest.java index eef53376c..2e2de2ba6 100644 --- a/cli/src/test/java/com/devonfw/tools/ide/completion/IdeCompleterTest.java +++ b/cli/src/test/java/com/devonfw/tools/ide/completion/IdeCompleterTest.java @@ -140,6 +140,16 @@ public void testIdeCompleterWithOptionAfterCommandletWorks() { assertBuffer("env --bash ", new TestBuffer("env --ba").tab().tab()); } + /** + * Test of completion of repository. + */ + @Test + public void testIdeCompleterWithRepository() { + + this.reader.setCompleter(newCompleter()); + assertBuffer("repository setup ", new TestBuffer("repository ").tab().tab()); + } + /** * Test of completion of options and arguments after commandlets. */ From 8fd989660cd3a8bde0a4ad97a1165a8f376db72c Mon Sep 17 00:00:00 2001 From: hj-lorenz Date: Mon, 27 Jan 2025 15:30:29 +0100 Subject: [PATCH 07/12] #984: Fixed typos in docs (#988) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed several typos mentioned by intellij. Co-authored-by: Jörg Hohwiller --- documentation/advanced-tooling-windows.adoc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/documentation/advanced-tooling-windows.adoc b/documentation/advanced-tooling-windows.adoc index eca188acb..384c712ed 100644 --- a/documentation/advanced-tooling-windows.adoc +++ b/documentation/advanced-tooling-windows.adoc @@ -12,9 +12,9 @@ But if you need more, here are some ways to get it easily: https://chocolatey.org/[Chocolatey] is a repository for free and open source software similar to the repositories know from the Linux like apt, apk, pacman, ... -=== Winget +=== WinGet -Microsoft is also working on a repository for Windows called https://github.com/microsoft/winget-cli[winget]. +Microsoft is also working on a repository for Windows called https://github.com/microsoft/winget-cli[WinGet]. It is currently in a pre-release state, but is expected to be integrated in the upcoming Windows versions. == Tabs everywhere @@ -87,17 +87,17 @@ The include tools like a file renamer, a way to order your windows on the screen === Sysinternals Tools -A real developer will quickly notice that windows build in tools to analyze processes, network connections, autostarts, etc. are quite poor. +A real developer will quickly notice that windows build in tools to analyze processes, network connections, AutoStarts, etc. are quite poor. So, what you really would like is the https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite[Sysinternals-Suite]. You can make process-explorer your https://www.ricksdailytips.com/make-process-explorer-default-task-manager/[default task manager]. -Use autoruns to prevent nasty background things to be started automatically. -Use tcpview to figure out which process is blocking port 8080, etc. +Use AutoRuns to prevent nasty background things to be started automatically. +Use TCPView to figure out which process is blocking port 8080, etc. === Cope with file locks -Did you ever fail to delete a file or directory that was locked by some process and you did not even know which one it was? +Did you ever fail to delete a file or directory that was locked by some process, and you did not even know which one it was? Then you might love https://www.iobit.com/en/iobit-unlocker.php[IoBit Unlocker]. -Also `ProcessExplorer` from Sysinternal Tools (see above) allows to find locks via `Find` menu option `Find handle or DLL...`. +Also `ProcessExplorer` from SysInternal Tools (see above) allows to find locks via `Find` menu option `Find handle or DLL...`. Here you can paste the path to the locked file and click `Search` to find the process owning the lock and can terminate the process. See also https://www.howtogeek.com/128680/HOW-TO-DELETE-MOVE-OR-RENAME-LOCKED-FILES-IN-WINDOWS/[this article]. @@ -108,7 +108,7 @@ Do you have to work with Windows? Would you also like to have such links in Windows? Why not? Windows https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/[supports real links] (not shortcuts like in other cases). -If you even want to have it integrated in Windows explorer you might want to install http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html[linkshellextension]. +If you even want to have it integrated in Windows explorer you might want to install http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html[Link Shell Extension]. However, you might want to disable SmartMove in the http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#configuration[configuration] if you face strange performance issues when moving folders. === Linux @@ -159,7 +159,7 @@ Convert them to https://en.wikipedia.org/wiki/Trivial_Graph_Format[Trivial Graph === Up your screen capture game -Capture any part of your screen with a single click, directly upload to dropbox, or run a svn commit all in one go with http://getgreenshot.org/[Greenshot]. +Capture any part of your screen with a single click, directly upload to dropbox, or run a svn commit all in one go with http://getgreenshot.org/[GreenShot]. Another screen capture tool where you can easily manage and edit your screenshots and also do screen recordings with is https://www.screenpresso.com/download/[Screenpresso]. === Fast Search in Windows From 05af7d1fc8ce55f663afd74de5c7cc16055fc4fe Mon Sep 17 00:00:00 2001 From: salimbouch <145128725+salimbouch@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:04:50 +0100 Subject: [PATCH 08/12] #931: enhance settings in code repository (#983) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: jan-vcapgemini <59438728+jan-vcapgemini@users.noreply.github.com> Co-authored-by: Jörg Hohwiller --- .../commandlet/AbstractUpdateCommandlet.java | 4 +- .../ide/commandlet/StatusCommandlet.java | 4 +- .../tools/ide/context/AbstractIdeContext.java | 39 +++++++++++++++---- .../devonfw/tools/ide/context/IdeContext.java | 5 +++ .../devonfw/tools/ide/git/GitOperation.java | 4 +- .../com/devonfw/tools/ide/io/FileAccess.java | 6 +++ .../devonfw/tools/ide/io/FileAccessImpl.java | 2 +- 7 files changed, 52 insertions(+), 12 deletions(-) diff --git a/cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java b/cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java index 60b7b0ab6..9a386be81 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java +++ b/cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java @@ -45,7 +45,9 @@ public AbstractUpdateCommandlet(IdeContext context) { @Override public void run() { - updateSettings(); + if (!this.context.isSettingsRepositorySymlinkOrJunction() || this.context.isForceMode()) { + updateSettings(); + } updateConf(); reloadContext(); diff --git a/cli/src/main/java/com/devonfw/tools/ide/commandlet/StatusCommandlet.java b/cli/src/main/java/com/devonfw/tools/ide/commandlet/StatusCommandlet.java index fa93ce7b6..47a6eca1e 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/commandlet/StatusCommandlet.java +++ b/cli/src/main/java/com/devonfw/tools/ide/commandlet/StatusCommandlet.java @@ -60,7 +60,9 @@ private void logSettingsGitStatus() { if (settingsPath != null) { GitContext gitContext = this.context.getGitContext(); if (gitContext.isRepositoryUpdateAvailable(settingsPath, this.context.getSettingsCommitIdPath())) { - this.context.warning("Your settings are not up-to-date, please run 'ide update'."); + if (!this.context.isSettingsRepositorySymlinkOrJunction()) { + this.context.warning("Your settings are not up-to-date, please run 'ide update'."); + } } else { this.context.success("Your settings are up-to-date."); } diff --git a/cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java b/cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java index 3b4f56d8f..52143744b 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java +++ b/cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java @@ -221,6 +221,7 @@ private Path findIdeRoot(Path ideHomePath) { } private Path getIdeRootPathFromEnv() { + String root = getSystem().getEnv(IdeVariables.IDE_ROOT.getName()); if (root != null) { Path rootPath = Path.of(root); @@ -280,6 +281,7 @@ private String getMessageIdeHomeNotFound() { } private String getMessageIdeRootNotFound() { + String root = getSystem().getEnv("IDE_ROOT"); if (root == null) { return "The environment variable IDE_ROOT is undefined. Please reinstall IDEasy or manually repair IDE_ROOT variable."; @@ -301,7 +303,6 @@ protected SystemPath computeSystemPath() { return new SystemPath(this); } - private boolean isIdeHome(Path dir) { if (!Files.isDirectory(dir.resolve("workspaces"))) { @@ -429,8 +430,8 @@ public Path getSettingsGitRepository() { return null; } - // check whether the settings path has a .git folder only if its not a symbolic link - if (!Files.exists(settingsPath.resolve(".git")) && !Files.isSymbolicLink(settingsPath)) { + // check whether the settings path has a .git folder only if its not a symbolic link or junction + if (!Files.exists(settingsPath.resolve(".git")) && !isSettingsRepositorySymlinkOrJunction()) { error("Settings repository exists but is not a git repository."); return null; } @@ -438,6 +439,15 @@ public Path getSettingsGitRepository() { return settingsPath; } + public boolean isSettingsRepositorySymlinkOrJunction() { + + Path settingsPath = getSettingsPath(); + if (settingsPath == null) { + return false; + } + return Files.isSymbolicLink(settingsPath) || getFileAccess().isJunction(settingsPath); + } + @Override public Path getSettingsCommitIdPath() { @@ -557,6 +567,7 @@ public boolean isOfflineMode() { @Override public boolean isSkipUpdatesMode() { + return this.startContext.isSkipUpdatesMode(); } @@ -583,6 +594,7 @@ public boolean isOnline() { } private void configureNetworkProxy() { + if (this.networkProxy == null) { this.networkProxy = new NetworkProxy(this); this.networkProxy.configure(); @@ -873,10 +885,17 @@ private ValidationResult applyAndRun(CliArguments arguments, Commandlet cmd) { } Path settingsRepository = getSettingsGitRepository(); if (settingsRepository != null) { - if (getGitContext().isRepositoryUpdateAvailable(settingsRepository, getSettingsCommitIdPath()) || - (getGitContext().fetchIfNeeded(settingsRepository) && getGitContext().isRepositoryUpdateAvailable(settingsRepository, - getSettingsCommitIdPath()))) { - interaction("Updates are available for the settings repository. If you want to apply the latest changes, call \"ide update\""); + if (getGitContext().isRepositoryUpdateAvailable(settingsRepository, getSettingsCommitIdPath()) || ( + getGitContext().fetchIfNeeded(settingsRepository) && getGitContext().isRepositoryUpdateAvailable( + settingsRepository, getSettingsCommitIdPath()))) { + if (isSettingsRepositorySymlinkOrJunction()) { + interaction( + "Updates are available for the settings repository. Please pull the latest changes by yourself or by calling \"ide -f update\" to apply them."); + + } else { + interaction( + "Updates are available for the settings repository. If you want to apply the latest changes, call \"ide update\""); + } } } } @@ -958,6 +977,7 @@ This product (with its included 3rd party components) is open-source software an } private void verifyIdeRoot() { + if (!isTest()) { if (this.ideRoot == null) { warning("Variable IDE_ROOT is undefined. Please check your installation or run setup script again."); @@ -977,6 +997,7 @@ private void verifyIdeRoot() { * @return the {@link List} of {@link CompletionCandidate}s to suggest. */ public List complete(CliArguments arguments, boolean includeContextOptions) { + CompletionCandidateCollector collector = new CompletionCandidateCollectorDefault(this); if (arguments.current().isStart()) { arguments.next(); @@ -1004,6 +1025,7 @@ public List complete(CliArguments arguments, boolean includ } private void completeCommandlet(CliArguments arguments, Commandlet cmd, CompletionCandidateCollector collector) { + trace("Trying to match arguments for auto-completion for commandlet {}", cmd.getName()); Iterator> valueIterator = cmd.getValues().iterator(); valueIterator.next(); // skip first property since this is the keyword property that already matched to find the commandlet @@ -1060,7 +1082,6 @@ private void completeCommandlet(CliArguments arguments, Commandlet cmd, Completi } } - /** * @param arguments the {@link CliArguments} to apply. Will be {@link CliArguments#next() consumed} as they are matched. Consider passing a * {@link CliArguments#copy() copy} as needed. @@ -1179,6 +1200,7 @@ private String findBashOnWindows() { @Override public WindowsPathSyntax getPathSyntax() { + return this.pathSyntax; } @@ -1202,6 +1224,7 @@ public IdeStartContextImpl getStartContext() { * Reloads this context and re-initializes the {@link #getVariables() variables}. */ public void reload() { + this.variables = null; this.customToolRepository = null; } diff --git a/cli/src/main/java/com/devonfw/tools/ide/context/IdeContext.java b/cli/src/main/java/com/devonfw/tools/ide/context/IdeContext.java index 4367dbee9..bc2e00a4b 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/context/IdeContext.java +++ b/cli/src/main/java/com/devonfw/tools/ide/context/IdeContext.java @@ -405,6 +405,11 @@ default Path getRepositoriesPath() { */ Path getSettingsGitRepository(); + /** + * @return {@code true} if the settings repository is a symlink or a junction. + */ + boolean isSettingsRepositorySymlinkOrJunction(); + /** * @return the {@link Path} to the file containing the last tracked commit Id of the settings repository. */ diff --git a/cli/src/main/java/com/devonfw/tools/ide/git/GitOperation.java b/cli/src/main/java/com/devonfw/tools/ide/git/GitOperation.java index b6cc4b35d..0cd147d47 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/git/GitOperation.java +++ b/cli/src/main/java/com/devonfw/tools/ide/git/GitOperation.java @@ -155,7 +155,9 @@ private boolean isNeeded(Path targetRepository, IdeContext context) { } if (!hasGitDirectory) { if (isRequireGitFolder()) { - context.warning("Missing .git folder in {}.", targetRepository); + if (context.getSettingsGitRepository() == null) { + context.warning("Missing .git folder in {}.", targetRepository); + } } else { logEnforceGitOperationBecauseGitFolderNotPresent(targetRepository, context); } diff --git a/cli/src/main/java/com/devonfw/tools/ide/io/FileAccess.java b/cli/src/main/java/com/devonfw/tools/ide/io/FileAccess.java index 45358c08a..6ecafff03 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/io/FileAccess.java +++ b/cli/src/main/java/com/devonfw/tools/ide/io/FileAccess.java @@ -306,4 +306,10 @@ default void makeExecutable(Path file) { */ String readFileContent(Path file); + /** + * @param path that is checked whether it is a junction or not. + * @return {@code true} if the given {@link Path} is a junction, false otherwise. + */ + boolean isJunction(Path path); + } diff --git a/cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java b/cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java index 1d01f6079..5ce9c5ad9 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java +++ b/cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java @@ -247,7 +247,7 @@ public String checksum(Path file) { } } - private boolean isJunction(Path path) { + public boolean isJunction(Path path) { if (!SystemInfoImpl.INSTANCE.isWindows()) { return false; From eb449711e8737620ca09b7821a7f1ef05778d7ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:26:26 +0100 Subject: [PATCH 09/12] Bump org.codehaus.mojo:build-helper-maven-plugin from 3.0.0 to 3.6.0 (#962) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.codehaus.mojo:build-helper-maven-plugin](https://github.com/mojohaus/build-helper-maven-plugin) from 3.0.0 to 3.6.0. - [Release notes](https://github.com/mojohaus/build-helper-maven-plugin/releases) - [Commits](https://github.com/mojohaus/build-helper-maven-plugin/compare/build-helper-maven-plugin-3.0.0...3.6.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:build-helper-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jörg Hohwiller --- documentation/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/pom.xml b/documentation/pom.xml index 0c69f69a5..07ff726f2 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -281,7 +281,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.6.0 attach-doc From 7c3a3e5d1fd24c72d42d0f5f7680734429390083 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:33:22 +0100 Subject: [PATCH 10/12] Bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12 (#960) Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.11 to 0.8.12. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.11...v0.8.12) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fc6b88b72..9c6cc39f3 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ org.jacoco jacoco-maven-plugin - 0.8.11 + 0.8.12 From 390bfc3e3c07686ae84e61629d7b3794c846c305 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 15:47:37 +0100 Subject: [PATCH 11/12] Bump org.sonatype.plugins:nexus-staging-maven-plugin (#961) Bumps org.sonatype.plugins:nexus-staging-maven-plugin from 1.6.13 to 1.7.0. --- updated-dependencies: - dependency-name: org.sonatype.plugins:nexus-staging-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9c6cc39f3..5df4e45d9 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true repository From 5300a96fee4c67fc69277e3e2c30ef10ae0200ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Wed, 29 Jan 2025 16:02:18 +0100 Subject: [PATCH 12/12] #958: instead of upgrade better remove epub since we do not need it (#995) --- documentation/pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/documentation/pom.xml b/documentation/pom.xml index 07ff726f2..2525f79ee 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -36,7 +36,6 @@ yyyy-MM-dd_HH.mm.ss 1.6.0 1.5.0-alpha.18 - 1.5.0-alpha.9 9.2.6.0 false resolveCiFriendliesOnly @@ -227,11 +226,6 @@ asciidoctorj-pdf ${asciidoctorj.pdf.version} - - org.asciidoctor - asciidoctorj-epub3 - ${asciidoctorj.epub.version} - org.jruby jruby-complete