Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ jobs:
current_version="${maven_config/#*-Drevision=}"
current_version="${current_version/ */}"
current_version="${current_version/-SNAPSHOT/-$(date +%m_%d_%H)-SNAPSHOT}"
cd cli
mvn -B -ntp -Pnative -DskipTests=true -Drevision=${current_version} package
cd gui-launcher
mvn -B -ntp -DskipTests clean install
cd ../cli
mvn -B -ntp -Passembly,native -DskipTests=true -Drevision=${current_version} package
- name: Upload native image
uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ jobs:
current_version="${maven_config/#*-Drevision=}"
current_version="${current_version/ */}"
next_version="${current_version/-SNAPSHOT/}"
cd cli
mvn -B -ntp -Drevision=${next_version} -Pnative -DskipTests=true package
cd gui-launcher
mvn -B -ntp -DskipTests clean install
cd ../cli
mvn -B -ntp -Drevision=${next_version} -Passembly,native -DskipTests=true package
- name: Upload native image
uses: actions/upload-artifact@v4
with:
Expand Down
24 changes: 24 additions & 0 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,30 @@
<id>assembly</id>
<build>
<plugins>
<!-- step required for copying the required pom.xml into the release in order to be able to launch the gui. See Gui.java -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-gui-pom</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.basedir}/target/package/${gui.relative_pom_path}"/>

<copy
file="${project.basedir}/../gui-launcher/.flattened-pom.xml"
tofile="${project.basedir}/target/package/${gui.relative_pom_path}/pom.xml"
failonerror="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<!-- Assembly Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ public void installIdeasy(Path cwd) {
success &= addInstallationArtifact(cwd, "bin", true, installationArtifacts);
success &= addInstallationArtifact(cwd, "functions", true, installationArtifacts);
success &= addInstallationArtifact(cwd, "internal", true, installationArtifacts);
success &= addInstallationArtifact(cwd, "gui", true, installationArtifacts);
success &= addInstallationArtifact(cwd, "system", true, installationArtifacts);
success &= addInstallationArtifact(cwd, "IDEasy.pdf", true, installationArtifacts);
success &= addInstallationArtifact(cwd, "setup", true, installationArtifacts);
Expand Down
19 changes: 3 additions & 16 deletions cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
import com.devonfw.tools.ide.process.ProcessContext;
import com.devonfw.tools.ide.process.ProcessContextImpl;
import com.devonfw.tools.ide.process.ProcessMode;
import com.devonfw.tools.ide.tool.ToolEdition;
import com.devonfw.tools.ide.tool.ToolEditionAndVersion;
import com.devonfw.tools.ide.tool.ToolInstallRequest;
import com.devonfw.tools.ide.tool.java.Java;
import com.devonfw.tools.ide.tool.mvn.Mvn;
import com.devonfw.tools.ide.version.VersionRange;

/**
* {@link Commandlet} to launch the IDEasy GUI.
Expand Down Expand Up @@ -46,22 +42,13 @@ protected void doRun() {

ProcessContext processContext = new ProcessContextImpl(this.context);

ToolInstallRequest toolInstallRequest = new ToolInstallRequest(false);
toolInstallRequest.setProcessContext(processContext);
toolInstallRequest.setRequested(
new ToolEditionAndVersion(
new ToolEdition("java", "java"),
VersionRange.of("[25,)")
)
);

Java java = this.context.getCommandletManager().getCommandlet(Java.class);
java.install(toolInstallRequest);
Mvn mvn = this.context.getCommandletManager().getCommandlet(Mvn.class);
java.install(false);
mvn.install(false);

LOG.debug("Starting GUI via commandlet");

Mvn mvn = context.getCommandletManager().getCommandlet(Mvn.class);

Path pomPath = context.getIdeInstallationPath().resolve("gui/pom.xml");
if (!Files.exists(pomPath)) {
LOG.error("Fatal error: The pom.xml file required for launching the IDEasy GUI could not be found in expected location: {}", pomPath);
Expand Down
32 changes: 0 additions & 32 deletions gui-launcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,4 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>assembly</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-gui-pom</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.basedir}/../cli/target/package/${gui.relative_pom_path}"/>

<copy
file="${project.basedir}/.flattened-pom.xml"
tofile="${project.basedir}/../cli/target/package/${gui.relative_pom_path}/pom.xml"
failonerror="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading