Skip to content

Commit 3834ce8

Browse files
Merge branch 'main' into feature/devonfw#103-implement-version-security-checks
# Conflicts: # cli/pom.xml # cli/src/main/java/com/devonfw/tools/ide/common/SystemPath.java # cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java # cli/src/test/java/com/devonfw/tools/ide/context/AbstractIdeContextTest.java # documentation/LICENSE.adoc
2 parents f162e09 + 4e9b19b commit 3834ce8

File tree

227 files changed

+7107
-4793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+7107
-4793
lines changed

.github/workflows/build.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,5 @@ jobs:
1818
java-version: '17'
1919
- name: Build project with Maven
2020
run: mvn -B -ntp -Dstyle.color=always install
21-
- name: Deploy to OSSRH nexus
22-
env:
23-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
24-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
25-
run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dmaven.install.skip=true -Dstyle.color=always -B -ntp deploy
2621
- name: Coveralls GitHub Action
27-
uses: coverallsapp/[email protected]
22+
uses: coverallsapp/[email protected]

.github/workflows/nightly-build.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
name: Nightly CI Build and Snapshot Release
2-
on:
1+
name: Nightly Build
2+
on:
3+
workflow_dispatch:
34
schedule:
45
- cron: '0 2 * * *'
56

@@ -13,7 +14,7 @@ jobs:
1314
- uses: actions/checkout@v3
1415
- id: verify_commit
1516
name: Verify latest commit is less than 24 hours
16-
if: ${{ github.event_name == 'schedule' }}
17+
if: ${{ (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch') }}
1718
run: echo '::set-output name=RUN_BUILD::'$(test -n "$(git log --format=%H --since='24 hours ago')" && echo 'true' || echo 'false')
1819

1920
build-natives:
@@ -32,7 +33,7 @@ jobs:
3233

3334
- uses: graalvm/setup-graalvm@v1
3435
with:
35-
java-version: '17.0.7'
36+
java-version: '21.0.2'
3637
distribution: 'graalvm'
3738
github-token: ${{ secrets.GITHUB_TOKEN }}
3839
native-image-job-reports: 'true'

.github/workflows/release.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and deploy a release including native-images
1+
name: Release
22

33
# Runs manually
44
on:
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: graalvm/setup-graalvm@v1
2121
with:
22-
java-version: '17.0.7'
22+
java-version: '21.0.2'
2323
distribution: 'graalvm'
2424
github-token: ${{ secrets.GITHUB_TOKEN }}
2525
native-image-job-reports: 'true'
@@ -75,8 +75,9 @@ jobs:
7575
git commit -m "set release version to ${next_version}"
7676
git tag -a "release/${next_version}" -m "tagged version ${next_version}"
7777
export GPG_TTY=$TTY
78-
mvn --settings .mvn/settings.xml -B -ntp deploy -Pdeploy -Dgpg.pin.entry.mode=loopback -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
78+
mkdir -p ./cli/target/
7979
mv ./natives/* ./cli/target/
80+
mvn --settings .mvn/settings.xml -B -ntp deploy -Pdeploy -Dgpg.pin.entry.mode=loopback -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
8081
env:
8182
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
8283
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

.mvn/maven.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-Drevision=2024.02.001-alpha-SNAPSHOT
1+
-Drevision=2024.03.001-alpha-SNAPSHOT

CHANGELOG.asciidoc CHANGELOG.adoc

File renamed without changes.

README.adoc

+19-31
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,34 @@ image:https://img.shields.io/github/license/devonfw/IDEasy.svg?label=License["Ap
1010
image:https://img.shields.io/maven-central/v/com.devonfw.tools.ide/ide-cli.svg?label=Maven%20Central["Maven Central",link=https://search.maven.org/search?q=g:com.devonfw.tools.ide]
1111
image:https://github.com/devonfw/IDEasy/actions/workflows/build.yml/badge.svg["Build Status",link="https://github.com/devonfw/IDEasy/actions/workflows/build.yml"]
1212
image:https://github.com/devonfw/IDEasy/actions/workflows/update-urls.yml/badge.svg["Update URLS Status",link="https://github.com/devonfw/IDEasy/actions/workflows/update-urls.yml"]
13+
image:https://github.com/devonfw/IDEasy/actions/workflows/nightly-build.yml/badge.svg["Nightly Release", link="https://github.com/devonfw/IDEasy/actions/workflows/nightly-build.yml"]
1314
image:https://coveralls.io/repos/github/devonfw/IDEasy/badge.svg?branch=main["Coverage Status",link="https://coveralls.io/github/devonfw/IDEasy?branch=main"]
1415

1516
toc::[]
1617

1718
== Setup
1819

1920
=== Prerequisites
20-
** Windows
21+
All you need before installing IDEasy is https://git-scm.com/download/[git].
2122

23+
** Windows
2224
*** On Windows you need to *download and install* https://git-scm.com/download/win[git for windows].
23-
24-
*** You need a tool to extract `*.tar.gz` files (`tar` and `gzip`).
25-
+
26-
For example https://www.7-zip.org/[7-zip] or https://www.win-rar.com/[WinRar].
2725
** Linux
28-
*** On Linux you need to install `curl` and `git` if you don't have them already
29-
+
30-
[source,terminal, .text-center]
31-
----
32-
sudo apt-get install git curl
33-
or
34-
sudo yum install git-core curl
35-
----
36-
26+
*** On Linux you only need to install https://git-scm.com/download/linux[git for linux].
3727
** MacOS
3828
*** On MacOS you only need to download and install https://git-scm.com/download/mac[git for mac].
3929

4030
=== Install
4131

42-
** Download the latest version of `devonfw-ide` from https://github.com/devonfw/IDEasy/releases[here] and extract it to a folder of your choice.
32+
** Download the latest version of `IDEasy` from https://github.com/devonfw/IDEasy/releases[here] and execute it.
4333
+
4434
(You can find all Releases in https://repo.maven.apache.org/maven2/com/devonfw/tools/IDEasy/ide-cli/[Maven Central])
4535
** Run the `setup` in this folder (On Windows you can double click on `setup.bat`)
4636
+
47-
A command prompt will open and the setup will start. The setup will ask for a settings URL. In case you do not have a settings URL for your project, you can just press enter to use the default settings.
37+
A command prompt will open and the setup will start. The setup will ask for a settings URL.
38+
In case you do not have a settings URL for your project, you can just press enter to use the default settings.
4839
** After the setup is finished, you can close the command prompt and open a new one.
49-
** *You are done! You can now use the `devon` command in your terminal to use the devonfw-ide.*
40+
** *You are done! You can now use the `ide` command in your terminal to use the `IDEasy`.*
5041

5142
==== Video Tutorial
5243
ifdef::env-github[]
@@ -63,23 +54,20 @@ See also our latest video https://vimeo.com/808368450/88d4af9d18[devon ide updat
6354

6455
== Documentation
6556

66-
* link:documentation/features.asciidoc[Features]
67-
* link:documentation/setup.asciidoc[Download & Setup]
68-
* link:documentation/usage.asciidoc[Usage]
69-
* link:documentation/IDEasy-contribution-getting-started.asciidoc[Contribution]
70-
* link:documentation/configuration.asciidoc[Configuration]
71-
* link:documentation/structure.asciidoc[Structure]
72-
* link:documentation/cli.asciidoc[Command Line Interface]
73-
* link:documentation/variables.asciidoc[Variables]
74-
* link:documentation/scripts.asciidoc[Scripts]
75-
* link:documentation/settings.asciidoc[Settings]
76-
* link:documentation/software.asciidoc[Software Folder]
77-
* link:documentation/integration.asciidoc[Integration]
78-
* link:documentation/advanced-tooling.asciidoc[Advanced-tooling]
57+
* link:documentation/features.adoc[Features]
58+
* link:documentation/setup.adoc[Download & Setup]
59+
* link:documentation/usage.adoc[Usage]
60+
* link:documentation/IDEasy-contribution-getting-started.adoc[Contribution]
61+
* link:documentation/configuration.adoc[Configuration]
62+
* link:documentation/structure.adoc[Structure]
63+
* link:documentation/cli.adoc[Command Line Interface]
64+
* link:documentation/variables.adoc[Variables]
65+
* link:documentation/settings.adoc[Settings]
66+
* link:documentation/advanced-tooling.adoc[Advanced-tooling]
7967
* link:documentation/[Documentation]
8068

8169
== Contribution Guidelines
82-
*If you want to contribute to `devon-ide` please read our https://github.com/devonfw/ide/blob/master/documentation/devonfw-ide-contribution-getting-started.asciidoc[Contribution Guidelines].*
70+
*If you want to contribute to `IDEasy` please read our https://github.com/devonfw/IDEasy/blob/main/documentation/IDEasy-contribution-getting-started.adoc[Contribution Guidelines].*
8371

8472
*We use https://github.com/devonfw/IDEasy/issues[GitHub Issues] to track bugs and submit feature requests.*
8573

cli/pom.xml

+61-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<groupId>com.devonfw.tools.IDEasy</groupId>
1212
<artifactId>ide-cli</artifactId>
1313
<version>${revision}</version>
14+
<name>${project.artifactId}</name>
1415
<properties>
1516
<mainClass>com.devonfw.tools.ide.cli.Ideasy</mainClass>
1617
<imageName>ideasy</imageName>
@@ -58,10 +59,14 @@
5859
<dependency>
5960
<groupId>org.slf4j</groupId>
6061
<artifactId>slf4j-api</artifactId>
62+
<version>2.0.12</version>
63+
<!--optional>true</optional-->
6164
</dependency>
6265
<dependency>
6366
<groupId>ch.qos.logback</groupId>
6467
<artifactId>logback-classic</artifactId>
68+
<version>1.5.3</version>
69+
<!--optional>true</optional-->
6570
</dependency>
6671
<!-- Needed for WireMock test support -->
6772
<dependency>
@@ -103,6 +108,29 @@
103108
</archive>
104109
</configuration>
105110
</plugin>
111+
<!-- Copy Resources -->
112+
<plugin>
113+
<artifactId>maven-resources-plugin</artifactId>
114+
<version>3.3.1</version>
115+
<executions>
116+
<execution>
117+
<id>copy-resources</id>
118+
<phase>validate</phase>
119+
<goals>
120+
<goal>copy-resources</goal>
121+
</goals>
122+
<configuration>
123+
<outputDirectory>${project.build.directory}/package</outputDirectory>
124+
<resources>
125+
<resource>
126+
<directory>src/main/package</directory>
127+
<filtering>true</filtering>
128+
</resource>
129+
</resources>
130+
</configuration>
131+
</execution>
132+
</executions>
133+
</plugin>
106134
</plugins>
107135
</build>
108136

@@ -125,17 +153,17 @@
125153
<configuration>
126154
<artifacts>
127155
<artifact>
128-
<file>target/${project.artifactId}-linux-x64.tar.gz</file>
156+
<file>${project.build.directory}/${project.artifactId}-linux-x64.tar.gz</file>
129157
<type>tar.gz</type>
130158
<classifier>linux</classifier>
131159
</artifact>
132160
<artifact>
133-
<file>target/${project.artifactId}-windows-x64.tar.gz</file>
161+
<file>${project.build.directory}/${project.artifactId}-windows-x64.tar.gz</file>
134162
<type>tar.gz</type>
135163
<classifier>windows</classifier>
136164
</artifact>
137165
<artifact>
138-
<file>target/${project.artifactId}-mac-x64.tar.gz</file>
166+
<file>${project.build.directory}/${project.artifactId}-mac-x64.tar.gz</file>
139167
<type>tar.gz</type>
140168
<classifier>mac</classifier>
141169
</artifact>
@@ -179,16 +207,42 @@
179207
<agent>
180208
<enabled>true</enabled>
181209
</agent>
182-
<imageName>
183-
${imageName}
184-
</imageName>
210+
<imageName>${imageName}</imageName>
185211
<buildArgs>
186212
<arg>--enable-url-protocols=https</arg>
187213
<arg>-H:IncludeResources="nls/.*"</arg>
188214
<arg>--initialize-at-build-time=org.apache.commons.compress</arg>
189215
</buildArgs>
190216
</configuration>
191217
</plugin>
218+
<plugin>
219+
<!-- Include documentation into release -->
220+
<groupId>org.apache.maven.plugins</groupId>
221+
<artifactId>maven-dependency-plugin</artifactId>
222+
<executions>
223+
<execution>
224+
<id>copy-documentation</id>
225+
<phase>prepare-package</phase>
226+
<goals>
227+
<goal>copy</goal>
228+
</goals>
229+
</execution>
230+
</executions>
231+
<configuration>
232+
<artifactItems>
233+
<artifactItem>
234+
<groupId>${project.groupId}</groupId>
235+
<artifactId>ide-doc</artifactId>
236+
<version>${project.version}</version>
237+
<type>pdf</type>
238+
<destFileName>IDEasy-documentation.pdf</destFileName>
239+
</artifactItem>
240+
</artifactItems>
241+
<outputDirectory>${project.build.directory}/package</outputDirectory>
242+
<overWriteReleases>false</overWriteReleases>
243+
<overWriteSnapshots>true</overWriteSnapshots>
244+
</configuration>
245+
</plugin>
192246
<plugin>
193247
<groupId>org.apache.maven.plugins</groupId>
194248
<artifactId>maven-assembly-plugin</artifactId>
@@ -203,7 +257,7 @@
203257
<finalName>${releaseName}</finalName>
204258
<appendAssemblyId>false</appendAssemblyId>
205259
<descriptors>
206-
<descriptor>/src/main/assembly/exec.xml</descriptor>
260+
<descriptor>/src/main/assembly/release.xml</descriptor>
207261
</descriptors>
208262
</configuration>
209263
</execution>

cli/src/main/assembly/exec.xml cli/src/main/assembly/release.xml

+5-9
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,17 @@
77
</formats>
88
<includeBaseDirectory>false</includeBaseDirectory>
99
<fileSets>
10-
<fileSet>
11-
<directory>${project.build.directory}</directory>
12-
<outputDirectory>./</outputDirectory>
13-
<excludes>
14-
<exclude>*</exclude>
15-
<exclude>*/**</exclude>
16-
</excludes>
17-
</fileSet>
18-
<fileSet>
10+
<fileSet>
1911
<directory>${project.build.directory}</directory>
2012
<outputDirectory>./bin</outputDirectory>
2113
<includes>
2214
<include>${imageName}.exe</include>
2315
<include>${imageName}</include>
2416
</includes>
2517
</fileSet>
18+
<fileSet>
19+
<directory>${project.build.directory}/package</directory>
20+
<outputDirectory>.</outputDirectory>
21+
</fileSet>
2622
</fileSets>
2723
</assembly>

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

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.devonfw.tools.ide.tool.aws.Aws;
1313
import com.devonfw.tools.ide.tool.az.Azure;
1414
import com.devonfw.tools.ide.tool.cobigen.Cobigen;
15+
import com.devonfw.tools.ide.tool.docker.Docker;
1516
import com.devonfw.tools.ide.tool.eclipse.Eclipse;
1617
import com.devonfw.tools.ide.tool.gcviewer.GcViewer;
1718
import com.devonfw.tools.ide.tool.gh.Gh;
@@ -23,10 +24,13 @@
2324
import com.devonfw.tools.ide.tool.kotlinc.KotlincNative;
2425
import com.devonfw.tools.ide.tool.mvn.Mvn;
2526
import com.devonfw.tools.ide.tool.node.Node;
27+
import com.devonfw.tools.ide.tool.npm.Npm;
2628
import com.devonfw.tools.ide.tool.oc.Oc;
2729
import com.devonfw.tools.ide.tool.quarkus.Quarkus;
30+
import com.devonfw.tools.ide.tool.sonar.Sonar;
2831
import com.devonfw.tools.ide.tool.terraform.Terraform;
2932
import com.devonfw.tools.ide.tool.vscode.Vscode;
33+
import com.devonfw.tools.ide.tool.jasypt.Jasypt;
3034

3135
/**
3236
* Implementation of {@link CommandletManager}.
@@ -65,10 +69,12 @@ public CommandletManagerImpl(IdeContext context) {
6569
add(new EditionSetCommandlet(context));
6670
add(new EditionListCommandlet(context));
6771
add(new VersionCommandlet(context));
72+
add(new RepositoryCommandlet(context));
6873
add(new Gh(context));
6974
add(new Helm(context));
7075
add(new Java(context));
7176
add(new Node(context));
77+
add(new Npm(context));
7278
add(new Mvn(context));
7379
add(new GcViewer(context));
7480
add(new Gradle(context));
@@ -83,6 +89,9 @@ public CommandletManagerImpl(IdeContext context) {
8389
add(new Aws(context));
8490
add(new Cobigen(context));
8591
add(new Jmc(context));
92+
add(new Jasypt(context));
93+
add(new Docker(context));
94+
add(new Sonar(context));
8695
}
8796

8897
private void add(Commandlet commandlet) {

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

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package com.devonfw.tools.ide.commandlet;
22

3-
import java.util.Collection;
4-
5-
import com.devonfw.tools.ide.common.SystemPath;
63
import com.devonfw.tools.ide.context.IdeContext;
74
import com.devonfw.tools.ide.environment.VariableLine;
85
import com.devonfw.tools.ide.os.WindowsPathSyntax;
96
import com.devonfw.tools.ide.property.FlagProperty;
7+
import com.devonfw.tools.ide.variable.IdeVariables;
8+
9+
import java.util.Collection;
1010

1111
/**
1212
* {@link Commandlet} to print the environment variables.
@@ -37,7 +37,7 @@ public String getName() {
3737
@Override
3838
public boolean isIdeHomeRequired() {
3939

40-
return false;
40+
return true;
4141
}
4242

4343
@Override
@@ -48,10 +48,14 @@ public void run() {
4848
if (this.context.getSystemInfo().isWindows()) {
4949
line = normalizeWindowsValue(line);
5050
}
51+
String lineValue = line.getValue();
52+
if (IdeVariables.PATH.getName().equals(line.getName())) {
53+
lineValue = this.context.getPath().toString(this.bash.isTrue());
54+
}
55+
lineValue = "\"" + lineValue + "\"";
56+
line = line.withValue(lineValue);
5157
this.context.info(line.toString());
5258
}
53-
SystemPath path = this.context.getPath();
54-
this.context.info("export PATH={}", path.toString(this.bash.isTrue()));
5559
}
5660

5761
VariableLine normalizeWindowsValue(VariableLine line) {

0 commit comments

Comments
 (0)