Skip to content

Commit e249742

Browse files
authored
Merge branch 'main' into fix/1130-improve-behaviour-on-ambigous-xpath-match
2 parents be644c6 + 8a9936e commit e249742

File tree

8 files changed

+48
-49
lines changed

8 files changed

+48
-49
lines changed

CHANGELOG.adoc

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDE
66

77
Release with new features and bugfixes:
88

9+
* https://github.com/devonfw/IDEasy/issues/1153[#1153]: Print SystemInfo in ide status
10+
* https://github.com/devonfw/IDEasy/issues/1006[#1006]: Eclipse automation opens UI that blocks further processing until closed
11+
* https://github.com/devonfw/IDEasy/issues/1039[#1039]: Update Jasypt commandlet implementation to run Java version from dependencies.json
12+
913
The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/24?closed=1[milestone 2025.03.002].
1014

1115
== 2025.03.001

cli/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,10 @@
266266
<goal>run</goal>
267267
</goals>
268268
<configuration>
269-
<tasks>
269+
<target>
270270
<move file="${project.basedir}/target/msi/ideasy.msi"
271271
tofile="${project.basedir}/target/${project.artifactId}-${revision}-windows-x64.msi"/>
272-
</tasks>
272+
</target>
273273
</configuration>
274274
</execution>
275275
</executions>

cli/src/main/java/com/devonfw/tools/ide/commandlet/StatusCommandlet.java

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.devonfw.tools.ide.environment.EnvironmentVariables;
88
import com.devonfw.tools.ide.git.GitContext;
99
import com.devonfw.tools.ide.migration.IdeMigrator;
10+
import com.devonfw.tools.ide.os.SystemInfo;
1011
import com.devonfw.tools.ide.tool.IdeasyCommandlet;
1112
import com.devonfw.tools.ide.version.VersionIdentifier;
1213

@@ -43,6 +44,13 @@ public void run() {
4344
logMigrationStatus();
4445
}
4546
new IdeasyCommandlet(this.context, null).checkIfUpdateIsAvailable();
47+
logSystemInfo();
48+
}
49+
50+
private void logSystemInfo() {
51+
SystemInfo systemInfo = this.context.getSystemInfo();
52+
this.context.info("Your operating system is {}({})@{} [{}@{}]", systemInfo.getOs(), systemInfo.getOsVersion(), systemInfo.getArchitecture(),
53+
systemInfo.getOsName(), systemInfo.getArchitectureName());
4654
}
4755

4856
private void logSettingsLegacyStatus() {

cli/src/main/java/com/devonfw/tools/ide/tool/eclipse/Eclipse.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ protected void configureToolBinary(ProcessContext pc, ProcessMode processMode, P
5757
@Override
5858
protected void configureToolArgs(ProcessContext pc, ProcessMode processMode, ProcessErrorHandling errorHandling, String... args) {
5959

60-
if ((args.length > 0) && !VMARGS.equals(args[0])) {
61-
String vmArgs = this.context.getVariables().get("ECLIPSE_VMARGS");
62-
if ((vmArgs != null) && !vmArgs.isEmpty()) {
63-
pc.addArg(VMARGS).addArg(vmArgs);
64-
}
65-
}
6660
// configure workspace location
6761
pc.addArg("-data").addArg(this.context.getWorkspacePath());
6862
// use keyring from user home to keep secrets and share across projects and workspaces
@@ -76,6 +70,12 @@ protected void configureToolArgs(ProcessContext pc, ProcessMode processMode, Pro
7670
pc.addArg("-consoleLog").addArg("-nosplash");
7771
}
7872
super.configureToolArgs(pc, processMode, errorHandling, args);
73+
if ((args.length > 0) && !VMARGS.equals(args[0])) {
74+
String vmArgs = this.context.getVariables().get("ECLIPSE_VMARGS");
75+
if ((vmArgs != null) && !vmArgs.isEmpty()) {
76+
pc.addArg(VMARGS).addArg(vmArgs);
77+
}
78+
}
7979
}
8080

8181
@Override
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
package com.devonfw.tools.ide.tool.jasypt;
22

33
import java.nio.file.Path;
4-
import java.util.ArrayList;
5-
import java.util.Arrays;
6-
import java.util.List;
74
import java.util.Set;
85

96
import com.devonfw.tools.ide.common.Tag;
107
import com.devonfw.tools.ide.context.IdeContext;
11-
import com.devonfw.tools.ide.nls.NlsBundle;
8+
import com.devonfw.tools.ide.process.ProcessContext;
9+
import com.devonfw.tools.ide.process.ProcessErrorHandling;
10+
import com.devonfw.tools.ide.process.ProcessMode;
11+
import com.devonfw.tools.ide.process.ProcessResult;
1212
import com.devonfw.tools.ide.property.EnumProperty;
1313
import com.devonfw.tools.ide.property.PasswordProperty;
1414
import com.devonfw.tools.ide.tool.LocalToolCommandlet;
1515
import com.devonfw.tools.ide.tool.ToolCommandlet;
16-
import com.devonfw.tools.ide.tool.java.Java;
1716

1817
/**
1918
* {@link ToolCommandlet} for <a href="http://www.jasypt.org/">Jasypt</a>, The java library which allows to add basic encryption capabilities with minimum
@@ -51,7 +50,7 @@ public Jasypt(IdeContext context) {
5150
@Override
5251
protected void initProperties() {
5352

54-
// Empty on purpose
53+
// avoid generic multi-valued arguments
5554
}
5655

5756
@Override
@@ -61,41 +60,35 @@ protected boolean isExtract() {
6160
}
6261

6362
@Override
64-
public void run() {
63+
public ProcessResult runTool(ProcessMode processMode, ProcessErrorHandling errorHandling, ProcessContext pc, String... args) {
6564

66-
Path toolPath = getToolPath();
67-
if (!toolPath.toFile().exists()) {
68-
super.install(true);
69-
}
65+
return runJasypt(determineJasyptMainClass(), pc, processMode);
66+
}
7067

68+
private String determineJasyptMainClass() {
7169
JasyptCommand command = this.command.getValue();
72-
switch (command) {
73-
case ENCRYPT:
74-
runJasypt(CLASS_NAME_ENCRYPTION);
75-
break;
76-
case DECRYPT:
77-
runJasypt(CLASS_NAME_DECRYPTION);
78-
break;
79-
80-
default:
81-
}
70+
return switch (command) {
71+
case ENCRYPT -> CLASS_NAME_ENCRYPTION;
72+
case DECRYPT -> CLASS_NAME_DECRYPTION;
73+
};
8274
}
8375

84-
private void runJasypt(String className) {
76+
private ProcessResult runJasypt(String className, ProcessContext pc, ProcessMode processMode) {
8577

86-
List<String> arguments = new ArrayList<>(
87-
Arrays.asList("-cp", resolveJasyptJarPath().toString(), className, "password=" + this.masterPassword.getValue(),
88-
"input=" + this.secret.getValue()));
78+
pc = pc.executable("java").addArgs("-cp", resolveJasyptJarPath().toString(), className, "password=" + this.masterPassword.getValue(),
79+
"input=" + this.secret.getValue());
8980

9081
String jasyptOpts = this.context.getVariables().get("JASYPT_OPTS");
91-
if (jasyptOpts != null && !jasyptOpts.trim().isEmpty()) {
92-
String[] jasyptOptions = jasyptOpts.split("\\s+");
93-
94-
arguments.addAll(Arrays.asList(jasyptOptions));
82+
if (jasyptOpts != null) {
83+
jasyptOpts = jasyptOpts.trim();
84+
if (!jasyptOpts.isEmpty()) {
85+
for (String opt : jasyptOpts.split("\\s+")) {
86+
pc = pc.addArg(opt);
87+
}
88+
}
9589
}
9690

97-
Java java = getCommandlet(Java.class);
98-
java.runTool(arguments.toArray(i -> new String[i]));
91+
return pc.run(processMode);
9992
}
10093

10194
private Path resolveJasyptJarPath() {
@@ -105,10 +98,4 @@ private Path resolveJasyptJarPath() {
10598
return toolPath.resolve("jasypt-" + installedVersion + ".jar");
10699
}
107100

108-
@Override
109-
public void printHelp(NlsBundle bundle) {
110-
111-
this.context.info(
112-
"To get detailed help about the usage of the jasypt CLI tools, see http://www.jasypt.org/cli.html#");
113-
}
114101
}

cli/src/main/resources/nls/Help.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ cmd.install.detail=To see all tools available for installation, call "ide help"
4848
cmd.intellij=Tool commandlet for IntelliJ (IDE)
4949
cmd.intellij.detail=IntelliJ is a popular Integrated Development Environment for Java developed by JetBrains. Detailed documentation can be found at https://www.jetbrains.com/idea/documentation/
5050
cmd.jasypt=Tool commandlet for Jasypt (encryption/decryption).
51-
cmd.jasypt.detail=Jasypt is a library for encrypting and decrypting sensitive data in Java applications. Detailed documentation can be found at http://www.jasypt.org/
51+
cmd.jasypt.detail=Jasypt is a library for encrypting and decrypting sensitive data in Java applications. Additional Jasypt options like "algorithm" can be configured via variable JASYPT_OPTS. Detailed documentation can be found at http://www.jasypt.org/
5252
cmd.jasypt.val.command=Modes (encrypt | decrypt)
5353
cmd.jasypt.val.masterPassword=master password.
5454
cmd.jasypt.val.secret=The secret to be encrypted or decrypted.

cli/src/main/resources/nls/Help_de.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ cmd.install.detail=Die Liste an zur Installation verfügbaren Werkzeugen können
4848
cmd.intellij=Werkzeug Kommando für Intellij (IDE)
4949
cmd.intellij.detail=IntelliJ ist eine beliebte Java-Entwicklungsumgebung, von JetBrains entwickelt. Detaillierte Dokumentation ist zu finden unter https://www.jetbrains.com/idea/documentation/
5050
cmd.jasypt=Werkzeug Kommando für Jasypt.
51-
cmd.jasypt.detail=Jasypt ist eine Bibliothek zum Verschlüsseln und Entschlüsseln sensibler Daten in Java-Anwendungen. Detaillierte Dokumentation ist zu finden unter http://www.jasypt.org/
51+
cmd.jasypt.detail=Jasypt ist eine Bibliothek zum Verschlüsseln und Entschlüsseln sensibler Daten in Java-Anwendungen. Zusätzliche Jasypt Optionen wie "algorithm" können mittels der Variable JASYPT_OPTS konfiguriert werden. Detaillierte Dokumentation ist zu finden unter http://www.jasypt.org/
5252
cmd.jasypt.val.command=Mode (encrypt | decrypt)
5353
cmd.jasypt.val.masterPassword=master Passwort.
5454
cmd.jasypt.val.secret=Das zu verschlüsselnde oder zu entschlüsselnde Geheimnis.

documentation/setup.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ The latest release of `IDEasy` can be downloaded from https://github.com/devonfw
2525
Extract the contents of the downloaded archive (`ide-cli-*.tar.gz`) to a new folder and run `setup` in this folder (on windows double-click on `setup.bat`).
2626

2727
To get started read the link:usage.adoc[usage].
28-
After the installation process, you can create a new project by typing: `ide create <project>`, replace `<project>` with your project name.
29-
Switch to the project folder e.g. `cd <project>` and install or configure tools for your project as needed.
28+
After the installation process, you can create a new project by typing in bash: `ide create <project>`, replace `<project>` with your project name.
29+
Switch to the project folder e.g. `cd <project>` and install or configure tools for your project as needed (for further details click link:project.adoc[here]).
3030

3131
=== Tweak installation location
3232

0 commit comments

Comments
 (0)