Skip to content

Commit

Permalink
Merge branch 'master' into feature/devonfw#1039-Add-support-for-Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
Amueller36 authored Mar 28, 2023
2 parents ebad93c + 117cc46 commit d9b7929
Show file tree
Hide file tree
Showing 22 changed files with 374 additions and 62 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ jobs:
git add -f .mvn/maven.config
git commit -m "set next version to ${next_version}"
# prevent GH006 error when pushing to protected branch
git remote set-url origin github.com/devonfw/ide.git
git push
git push --tags
git remote set-url origin https://${BUILD_USER}:${BUILD_USER_PASSWORD}@github.com/devonfw/ide.git
git -c "http.https://github.com/.extraheader=" push
git -c "http.https://github.com/.extraheader=" push --tags
noDotVersion="${current_version//.}"
gh release create "release/${current_version}" --title "${current_version}" --notes "# Download
https://repo1.maven.org/maven2/com/devonfw/tools/ide/devonfw-ide-scripts/${old_version}/devonfw-ide-scripts-${current_version}.tar.gz
# Changes
https://github.com/devonfw/ide/blob/master/CHANGELOG.asciidoc#${noDotVersion}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_USER: ${{ secrets.BUILD_USER }}
BUILD_USER_PASSWD: ${{ secrets.BUILD_USER_PASSWD }}
2 changes: 1 addition & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Drevision=2023.02.001-SNAPSHOT
-Drevision=2023.04.001-SNAPSHOT
42 changes: 42 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,55 @@

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

== 2023.04.001

Release with new features and bugfixes:

* TODO

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

== 2023.03.003

Release with new features and bugfixes:

* https://github.com/devonfw/ide/issues/1074[#1074]: Fix vscode plugin installation

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

== 2023.03.002

Release with new features and bugfixes:

* https://github.com/devonfw/ide/issues/1071[#1071]: devon.bat sets wrong user PATH in Windows system environment settings

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

== 2023.03.001

Release with new features and bugfixes:

* https://github.com/devonfw/ide/issues/1068[#1068]: setup of devon ide create hangs
* https://github.com/devonfw/ide/issues/999[#999]: Ability to require minimum devonfw-ide version

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

== 2023.02.001

Release with new features and bugfixes:

* https://github.com/devonfw/ide/issues/1066[#1066]: devon.bat stopped adding PATH
* https://github.com/devonfw/ide/issues/1043[#1043]: Environment variables defined in devon.properties are not available in devonfw CMD
* https://github.com/devonfw/ide/issues/982[#982]: Add plugin recommendation feature to vscode
* https://github.com/devonfw/ide/issues/971[#971]: Ability to run "migration script" on update
* https://github.com/devonfw/ide/issues/991[#991]: Integrate openrewrite feature
* https://github.com/devonfw/ide/issues/1030[#1030]: Rancher Desktop Installation not detected
* https://github.com/devonfw/ide/issues/1062[#1062]: Migration support for devon4j 2023.01.001
* https://github.com/devonfw/ide/issues/1052[#1052]: Fix leading spaces on MacOS
* https://github.com/devonfw/ide/issues/1022[#1022]: suppress confusing windows process result messages like The operation completed successfully.
* https://github.com/devonfw/ide/issues/1039[#1039]: Add support for Kotlin.
* https://github.com/devonfw/ide/issues/1051[#1051]: creation of a documentation for using the software IObit Unlocker to find processes that block specific files


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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ public static MigrationImpl devon4j() {
.replaceProperty("spring.boot.version", "2.7.6") //
.replaceProperty("cxf.version", "3.5.4") //
.and() //
.next().to(VersionIdentifier.ofDevon4j("2023.01.001")).pom() //
.replaceProperty("devon4j.version", "2023.01.001") //
.and() //
.next().build();
}

Expand Down
1 change: 1 addition & 0 deletions documentation/LICENSE.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The following table shows the components that may be used. The column `inclusion
|https://github.com/cli/cli/[GitHubCLI]|Optional|https://github.com/cli/cli/blob/trunk/LICENSE[MIT]
|https://quarkus.io/guides/cli-tooling[QuarkusCLI]|Optional|https://github.com/quarkusio/quarkus/blob/main/LICENSE.txt[ASL 2.0]
|https://cloud.google.com/sdk/gcloud[GCloudCLI]|Optional|https://github.com/twistedpair/google-cloud-sdk/blob/master/google-cloud-sdk/LICENSE[ASL 2.0]
|https://github.com/openrewrite/rewrite-maven-plugin[Openrewrite]|Optional|https://github.com/openrewrite/rewrite-maven-plugin/blob/main/LICENSE[ASL 2.0]
|=======================

== Apache Software License - Version 2.0
Expand Down
1 change: 1 addition & 0 deletions documentation/cli.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ The following commandlets are currently available:
* link:pip.asciidoc[pip]
* link:quarkus.asciidoc[quarkus]
* link:release.asciidoc[release]
* link:rewrite.asciidoc[rewrite]
* link:sonar.asciidoc[sonar]
* link:terraform.asciidoc[terraform]
* link:vscode.asciidoc[vscode]
Expand Down
2 changes: 2 additions & 0 deletions documentation/devonfw-ide-usage.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ include::quarkus.asciidoc[leveloffset=3]

include::release.asciidoc[leveloffset=3]

include::rewrite.asciidoc[leveloffset=3]

include::sonar.asciidoc[leveloffset=3]

include::terraform.asciidoc[leveloffset=3]
Expand Down
1 change: 1 addition & 0 deletions documentation/functions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ Attention: for one installation package the function doReplaceExtractedSkipSingl
Called with the three parameters path of the file or directory to be moved, the target directory and a backup directory.
The function creates missing directories, makes a backup from the target directory to the backup directory.
Then the files specified in the first parameter are moved to the target directory.
Finally, the link:migration.asciidoc[migration script] is run to migrate the ide to the latest version.

=== doReplaceExtractedSkipSingleFolder
The parameters source directory, target directory, backup directory and possibly a list of files and directories via shell file name expansion (globbing) are passed to the doReplaceExtractedSkipSingleFolder function.
Expand Down
41 changes: 41 additions & 0 deletions documentation/how-to-unlock-files.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
= Guide: Finding Processes that Block Specific Files

== Introduction

Sometimes, when you try to perform an action on a file on your Windows computer, you may encounter an error message that says the file is in use and cannot be accessed. This is usually because the file is locked by a process that is currently running on your system. In this guide, we will show you how to find the processes that are blocking specific files, as well as provide information on Windows file locks and resulting problems and solutions.

== Understanding Windows File Locks

In Windows, when a process opens a file, the operating system creates a file lock to prevent other processes from modifying or deleting the file while it is being used. When a file is locked, any attempt to modify or delete the file will fail. This can result in errors or unexpected behavior when you try to perform actions on the file.

There are two types of file locks in Windows: shared locks and exclusive locks. Shared locks allow multiple processes to access a file at the same time, but prevent any one process from modifying or deleting the file while it is in use. Exclusive locks, on the other hand, prevent all other processes from accessing the file while it is in use.

== Finding Processes that Block Specific Files

To find the processes that are blocking a specific file, you can use the Windows Resource Monitor or the Command Prompt. Here are the steps to do so:

1. Open the Windows Resource Monitor by typing "resmon" in the Start menu search bar, then press Enter.

2. Click on the CPU tab.

3. In the Associated Handles section, type the name of the file that is being blocked in the Search Handles field, then press Enter.

4. The processes that are blocking the file will be listed in the lower pane of the Resource Monitor. Note the name of the process that is blocking the file.
+
image::images/ResourceManager.png[UnlockFileResourceMonitor]
+
5. You can right click the process name and terminate it.

== Solutions for File Locking Problems

If you have identified the process that is blocking a file, you can take one of the following actions:

- Close the process: If the process is not necessary, you can close it to release the file lock.

- Wait for the process to complete: If the process is performing a necessary operation on the file, you can wait for it to complete before attempting to perform your action.

- Use a file unlocking tool: There are many third-party tools available that can unlock files and release file locks. Some popular tools include Unlocker and ProcessExplorer. Another option is IObit Unlocker, which is a free tool that can help you unlock and delete files that are in use. You can download IObit Unlocker from the following link: https://www.iobit.com/en/iobit-unlocker.php

== Conclusion

In this guide, we have provided information on Windows file locks and how to find processes that are blocking specific files. We have also provided solutions for file locking problems, including using third-party tools like Unlocker, ProcessExplorer, and IObit Unlocker. If you encounter file locking problems on your Windows computer, following the steps in this guide should help you resolve them.
Binary file added documentation/images/ResourceManager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions documentation/migration.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
:toc:
toc::[]

= migration

When we publish a new release, our users can install it to existing devonfw-ide installations via `devon ide update scripts`.
Sometimes we do some structural changes and to avoid "polluting" our scripts with legacy handling code, there is a `migration` script under `${DEVON_IDE_HOME}/scripts` that is automatically executed by `devon ide update scripts` after the new release has been installed.
The `migration` script then executes all potential upgrades in `${DEVON_IDE_HOME}/scripts/migrations/«version»` that are greater or equal to the previously installed version in numerical order.

== upgrade scripts
The `migrations` folder contains a file for each devonfw-ide version that requires an upgrade migration on installation as illustrated by the following example:

.Structure of migrations folder
[subs=+macros]
----
/migrations
├──/ ...
├──/ 2023.03.001
├──/ 2023.03.003
├──/ 2023.12.001
├──/ ...
----

As you can see, the migrations folder contains scripts with specific ide versions.
If no upgrade is required for a new version there will be no migration script so there can be gaps in their numbers.
So if the user runs `devon ide update scripts` on ide with version `«version-x»`, the `migration` script will execute each script in migrations folder from the same version to the latest version in numerical order.

ATTENTION: Since this feature is available with version ´2023.02.001´, older ide's are not affected by the migration.
We try to reach our users with an announcement to upgrade all installations to that version once released.
In case you missed to follow this guidance, you can still manually call `migration 2023.02.001` in your `${DEVON_IDE_HOME}/scripts/` folder to fix it.
38 changes: 38 additions & 0 deletions documentation/rewrite.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
:toc:
toc::[]

= rewrite

The rewrite commandlet allows the use of https://docs.openrewrite.org/[Openrewrite], a Maven based tool that can be used to refactor code with recipes for multiple languages and tools.
Before using this tool, we recommend that you read the https://docs.openrewrite.org/running-recipes/getting-started[Getting-Started] page.

== Usage
The commandlet accepts the name of a recipe such as `org.openrewrite.java.format.AutoFormat` as the first argument.
If this recipe is built-in, the second argument can be ignored.
In case the recipe is provided by an external catalog of recipes, the second parameter must be passed.
Usually this information is set in the pom.xml of the project in plugin dependencies:

```
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-spring</artifactId>
<version>4.33.0</version>
</dependency>
</dependencies>
```
However, you can set up the second parameter in this structure instead: `groupId:artifactId:version`.
In the example the second parameter would be `org.openrewrite.recipe:rewrite-spring:LATEST`. You can also use the exact version instead of `LATEST`.

The catalog of recipes can be found here:

https://docs.openrewrite.org/reference/recipes

The arguments (devon rewrite «args») are explained by the following table:

Usage of `devon rewrite`
[options="header"]
|=======================
|*Argument(s)* |*Meaning*
|«recipe» [«catalog»] |run a «recipe». If it is not a built-in recipe then provide the catalog of this recipe in [«catalog»]"
|=======================
1 change: 1 addition & 0 deletions documentation/scripts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ This directory is the heart of the `devonfw-ide` and contains the required link:
│ ├── link:pip.asciidoc[pip]
│ ├── link:quarkus.asciidoc[quarkus]
│ ├── link:release.asciidoc[release]
│ ├── link:rewrite.asciidoc[rewrite]
│ ├── link:sonar.asciidoc[sonar]
│ ├── link:terraform.asciidoc[terraform]
│ ├── link:vscode.asciidoc[vscode]
Expand Down
31 changes: 24 additions & 7 deletions documentation/vscode.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,37 @@ You may also supply additional arguments as `devon vscode «args»`. These are e

== plugins

To be productive with VS Code you need plugins (called `extensions` in VS Code). Of course `devonfw-ide` can automate this for your:
To be productive with VS Code you need plugins (called `extensions` in VS Code).
Of course `devonfw-ide` can automate this for your:
In your link:settings.asciidoc[settings] git repository create a folder https://github.com/devonfw/ide-settings/tree/master/vscode/plugins[vscode/plugins] (click this link to see more examples and see which plugins come by default).
Here you can create a properties file for each plugin. This is an example https://github.com/devonfw/ide-settings/blob/master/vscode/plugins/devonfw-extension-pack.properties[devonfw-extension-pack.properties]:
Here you can create a properties file for each plugin.
This is an example https://github.com/devonfw/ide-settings/blob/master/vscode/plugins/devonfw-extension-pack.properties[devonfw-extension-pack.properties]:
```
plugin_id=devonfw.devonfw-extension-pack
plugin_active=true
```

The variables are defined as following:

* `plugin_id` defines the unique ID of the plugin to install. If you want to customize `devonfw-ide` with new plugins click on `Extensions` at the bottom of the left navigation icon bar in VS code. Then use the search to find the plugin of your choice. If you click on it the plugin ID is displayed in grey beside the official title at the top of the plugin details page. Copy & paste the ID from here to make up your own custom config.
* `plugin_active` is an optional parameter. If it is `true` (default) the plugin will be installed automatically during the project link:setup.asciidoc[setup] for all developers in your team. Otherwise developers can still install the plugin manually via `devon vscode add-plugin «plugin-name»` from the config file `settings/vscode/plugins/«plugin-name».properties`. See the `settings/vscode/plugins` folder for possible values of «plugin-name».
* `plugin_id` defines the unique ID of the plugin to install.
If you want to customize `devonfw-ide` with new plugins click on `Extensions` at the bottom of the left navigation icon bar in VS code.
Then use the search to find the plugin of your choice.
If you click on it the plugin ID is displayed in grey beside the official title at the top of the plugin details page.
Copy & paste the ID from here to make up your own custom config.
* `plugin_active` is an optional parameter.
If it is `true` (default) the plugin will be installed automatically during the project link:setup.asciidoc[setup] for all developers in your team.
Otherwise developers can still install the plugin manually via `devon vscode add-plugin «plugin-name»` from the config file `settings/vscode/plugins/«plugin-name».properties`.
See the `settings/vscode/plugins` folder for possible values of «plugin-name».

In general you should try to stick with the configuration pre-defined by your project. But some plugins may be considered as personal flavor and are typically not predefined by the project config. Such plugins should be shipped with your link:settings.asciidoc[settings] as described above with `plugin_active=false` allowing you to easily install it manually. Surely, you can easily add plugins via the UI of VS code. However, be aware that some plugins may collect sensitive data or could introduce other vulnerabilities. So consider the governance of your project and talk to your technical lead before installing additional plugins that are not pre-defined in your link:settings.asciidoc[settings].
In general you should try to stick with the configuration pre-defined by your project.
But some plugins may be considered as personal flavor and are typically not predefined by the project config.
Such plugins should be shipped with your link:settings.asciidoc[settings] as described above with `plugin_active=false` allowing you to easily install it manually. Surely, you can easily add plugins via the UI of VS code.
However, be aware that some plugins may collect sensitive data or could introduce other vulnerabilities.
So consider the governance of your project and talk to your technical lead before installing additional plugins that are not pre-defined in your link:settings.asciidoc[settings].

As maintainer of the link:settings.asciidoc[settings] for your project you should avoid to ship too many plugins that may waste resources but are not used by every developer. By configuring additional plugins with `plugin_active=false` you can give your developers the freedom to install some additional plugins easily.
As maintainer of the link:settings.asciidoc[settings] for your project you should avoid to ship too many plugins that may waste resources but are not used by every developer.
By configuring additional plugins with `plugin_active=false` you can give your developers the freedom to install some additional plugins easily.
In addition, these plugins are recommended to the user by recommendation https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions[recommendation feature] of VS Code. Be aware that the recommendations feature only works for the main workspace.

=== cleaning plugins on update

Expand All @@ -51,4 +66,6 @@ If you want to strictly manage the plugins for `VS code` in your project, you ca
clean_plugins_on_update=true
```

This will wipe all plugins when an update of `VS code` is performed (e.g. via `devon ide update`) and reinstall all configured plugins. While this gives you more control over the governance of the plugins and allows to remove a plugin later during project lifecycle. However, this will delete all manually installed plugins automatically without asking.
This will wipe all plugins when an update of `VS code` is performed (e.g. via `devon ide update`) and reinstall all configured plugins.
While this gives you more control over the governance of the plugins and allows to remove a plugin later during project lifecycle.
However, this will delete all manually installed plugins automatically without asking.
Loading

0 comments on commit d9b7929

Please sign in to comment.