Skip to content

Commit

Permalink
Merge branch 'devonfw:main' into devonfw#734-improve-process-result
Browse files Browse the repository at this point in the history
  • Loading branch information
alfeilex authored Nov 19, 2024
2 parents 8e66739 + d2a3760 commit 5c3cccb
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
* Mac(x64): https://repo1.maven.org/maven2/com/devonfw/tools/IDEasy/ide-cli/${current_version}/ide-cli-${current_version}-mac-x64.tar.gz
* Linux: https://repo1.maven.org/maven2/com/devonfw/tools/IDEasy/ide-cli/${current_version}/ide-cli-${current_version}-linux-x64.tar.gz
# Changes
https://github.com/devonfw/IDEasy/blob/main/CHANGELOG.asciidoc#${noDotVersion}"
https://github.com/devonfw/IDEasy/blob/main/CHANGELOG.adoc#${noDotVersion/-beta/}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_USER: ${{ secrets.BUILD_USER }}
Expand Down
2 changes: 1 addition & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Drevision=2024.11.001-beta-SNAPSHOT
-Drevision=2024.12.001-beta-SNAPSHOT
7 changes: 7 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This file documents all notable changes to https://github.com/devonfw/IDEasy[IDEasy].

== 2024.12.001

Release with new features and bugfixes:


The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/16?closed=1[milestone 2024.12.001].

== 2024.11.001

Release with new features and bugfixes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,8 @@ public void setCwd(Path userDir, String workspace, Path ideHome) {
this.userHomeIde = this.userHome.resolve(".ide");
this.downloadPath = this.userHome.resolve("Downloads/ide");

this.variables = createVariables();
this.path = computeSystemPath();
this.customToolRepository = CustomToolRepositoryImpl.of(this);
this.workspaceMerger = new DirectoryMerger(this);
}

private String getMessageIdeHomeFound() {
Expand Down Expand Up @@ -498,6 +496,9 @@ public SystemPath getPath() {
@Override
public EnvironmentVariables getVariables() {

if (this.variables == null) {
this.variables = createVariables();
}
return this.variables;
}

Expand Down Expand Up @@ -571,6 +572,9 @@ public Locale getLocale() {
@Override
public DirectoryMerger getWorkspaceMerger() {

if (this.workspaceMerger == null) {
this.workspaceMerger = new DirectoryMerger(this);
}
return this.workspaceMerger;
}

Expand Down Expand Up @@ -1054,6 +1058,6 @@ public IdeStartContextImpl getStartContext() {
* Reloads this context and re-initializes the {@link #getVariables() variables}.
*/
public void reload() {
this.variables = createVariables();
this.variables = null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,11 @@ public boolean install(boolean silent, EnvironmentContext environmentContext) {
fileAccess.delete(tmpDir);
}
if (exitCode == 0) {
this.context.success("Successfully installed {} in version {}", this.tool, resolvedVersion);
this.context.success("Installation process for {} in version {} has started", this.tool, resolvedVersion);
} else {
this.context.warning("{} in version {} was not successfully installed", this.tool, resolvedVersion);
return false;
}
postInstall();
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,27 @@ public final boolean install(boolean silent, EnvironmentContext environmentConte

}

/**
* This method is called after a tool was requested to be installed or updated.
*
* @param newlyInstalled {@code true} if the tool was installed or updated (at least link to software folder was created/updated), {@code false} otherwise
* (configured version was already installed and nothing changed).
*/
protected void postInstall(boolean newlyInstalled) {

if (newlyInstalled) {
postInstall();
}
}

/**
* This method is called after the tool has been newly installed or updated to a new version.
*/
protected void postInstall() {

// nothing to do by default
}

private boolean toolAlreadyInstalled(boolean silent, VersionIdentifier installedVersion, Step step) {
if (!silent) {
this.context.info("Version {} of tool {} is already installed", installedVersion, getToolWithEdition());
Expand Down
21 changes: 0 additions & 21 deletions cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,27 +233,6 @@ public boolean install(boolean silent) {
*/
public abstract boolean install(boolean silent, EnvironmentContext environmentContext);

/**
* This method is called after a tool was requested to be installed or updated.
*
* @param newlyInstalled {@code true} if the tool was installed or updated (at least link to software folder was created/updated), {@code false} otherwise
* (configured version was already installed and nothing changed).
*/
protected void postInstall(boolean newlyInstalled) {

if (newlyInstalled) {
postInstall();
}
}

/**
* This method is called after the tool has been newly installed or updated to a new version.
*/
protected void postInstall() {

// nothing to do by default
}

/**
* @return {@code true} to extract (unpack) the downloaded binary file, {@code false} otherwise.
*/
Expand Down
2 changes: 1 addition & 1 deletion documentation/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The following list shows these configuration files in the order they are loaded
2. `~/.ide/ide.properties` - user specific global defaults (on Windows in `%USERPROFILE%/.ide/ide.properties`)
3. `https://github.com/devonfw/ide-settings/blob/main/ide.properties[settings/ide.properties]` (`settings/ide.properties`) - project specific configurations from link:settings.adoc[settings].
4. `workspaces/${WORKSPACE}/ide.properties` - optional workspace specific configurations (especially helpful in projects using docker).
5. `https://github.com/devonfw/ide-settings/blob/main/template/conf/ide.properties[conf/ide.properties]` - user specific configurations (e.g. `M2_REPO=~/.m2/repository`).
5. `https://github.com/devonfw/ide-settings/blob/main/templates/conf/ide.properties[conf/ide.properties]` - user specific configurations (e.g. `M2_REPO=~/.m2/repository`).
During setup this file is created by copying a template from `settings/template/conf/ide.properties`.

== ide.properties
Expand Down
4 changes: 2 additions & 2 deletions documentation/sandbox.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ With IDEasy we follow the sandbox principle for the projects managed by our tool
That is each project may peacefully coexist with other projects on the same computer.

Changes and work in one project do not have side-effects to other projects so the projects are isolated from each other.
This principle is not very easy to archive on the same computer since you have to consider the following requirements.
This principle is not very easy to achieve on the same computer since you have to consider the following requirements.
Different projects on the same computer...

* ... may want to use the same tool (`java`, `mvn`, `node`, `python`, you name it).
Expand All @@ -17,7 +17,7 @@ You do not want to accidentally deploy something for the wrong account because y

== Concept

There are differnet concepts and implementations how to archive this sandbox principle.
There are differnet concepts and implementations how to achieve this sandbox principle.
An obvious one is virtualization (using VMs) or para-virtualization (using "docker" containers).
Microsoft is using the latter with https://containers.dev/[development containers].
However, from the start we belived that developers want the following things:
Expand Down
12 changes: 6 additions & 6 deletions documentation/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you are working on different branches in parallel you typically want to use m

. Go to the link:workspaces.adoc[workspaces] folder in your link:variables.adoc[${IDE_HOME}] and create a new folder with the name of your choice (e.g. `release2.1`).
. Check out (`git clone ...`) the according projects and branch into that workspace folder.
. Open a shell in that new workspace folder (`cd` to it) and according to your IDE run e.g. link:eclipse.adoc[eclipse], link:vscode.adoc[vscode], or link:intellij.adoc[intellij] to create your workspace and launch the IDE.
. Open a shell in that new workspace folder (`cd` to it) and according to your IDE run e.g. `eclipse`, `vscode`, or `intellij` to create your workspace and launch the IDE.
You can also add the parameter `create-script` to the IDE link:cli.adoc#commandlets[commandlet] in order to create a launch-script for your IDE.

You can have multiple instances of eclipse running for each workspace in parallel.
Expand Down Expand Up @@ -86,11 +86,11 @@ This way you will take over control of the tools and their versions for every de
. In case you need a proprietary or unsupported tool, you can study link:software.adoc#custom[how to include custom tools].
. In case you have very restrictive policies about downloading tools from the internet, you can create and configure a link:software.adoc#repository[software repository] for your project or company.
. Some of the tools (especially the actual IDEs) allow extensions via plugins.
You can customize them to your needs for link:eclipse.adoc#plugins[eclipse], link:vscode.adoc#plugins[VS code], or link:intellij.adoc#plugins[intelliJ].
. In your `settings` git repository you will find a `projects` folder.
Here you will find configurations files for every git project relevant for your actual project.
Feel free to create new projects for your needs and delete the `devonfw` specific default projects.
The link:projects.adoc[projects] documentation will explain you how to do this.
You can customize them to your needs for https://github.com/devonfw/ide-settings/tree/main/eclipse/plugins[eclipse], https://github.com/devonfw/ide-settings/tree/main/vscode/plugins[VS code], or https://github.com/devonfw/ide-settings/tree/main/intellij/plugins[intelliJ].
. In your `settings` git repository you will find a `repositories` folder.
Here you will find configurations files for every git repository relevant for your actual development project (with your source-code).
Feel free to create new repositories for your needs and delete the included default repositories.
The link:repository.adoc[repository] documentation will explain you how to do this.
. For every IDE you will also find an according folder in your `settings` git repository.
Here are the individual configuration settings for that IDE.
You can change them by directly editing the according configuration files directly with a text-editor in your `settings` git repository.
Expand Down

0 comments on commit 5c3cccb

Please sign in to comment.