Skip to content

Commit

Permalink
devonfw#1024: Move urls into url-updater module
Browse files Browse the repository at this point in the history
adjusted github action workflow
updated wiremock from com.github.tomakehurst 2.35.2 to org.wiremock 3.11.0
added jackson-core dependency to ide-cli
added url to url tool test classes package name
  • Loading branch information
jan-vcapgemini committed Feb 7, 2025
1 parent 9c40fee commit 8a12beb
Show file tree
Hide file tree
Showing 79 changed files with 175 additions and 111 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-urls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
cache: 'maven'
- name: Build and run url updater
run: |
cd cli
cd url-updater
mvn -B -ntp -Dstyle.color=always install
mvn -B -ntp -Dstyle.color=always exec:java -Dexec.mainClass="com.devonfw.tools.ide.url.UpdateInitiator" -Dexec.args="../ide-urls PT5H30M"
- name: Commit and push to ide-urls
Expand Down
11 changes: 8 additions & 3 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<artifactId>parsson</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down Expand Up @@ -93,9 +98,9 @@
</dependency>
<!-- Needed for WireMock test support -->
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.2</version>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>3.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.devonfw.tools.ide.version.VersionRange;

/**
* Test of {@link com.devonfw.tools.ide.url.model.file.json.ToolDependencies} and {@link AbstractUrlToolOrEdition#getDependencyFile()}.
* Test of {@link ToolDependencies} and {@link AbstractUrlToolOrEdition#getDependencyFile()}.
*/
public class ToolDependenciesTest extends AbstractUrlModelTest {

Expand All @@ -23,7 +23,8 @@ public void testEditionSpecific() {
IdeContext context = newContext();

// act
Collection<ToolDependency> dependencies = context.getDefaultToolRepository().findDependencies("tomcat", "tomcat", VersionIdentifier.of("11.0.0"));
Collection<ToolDependency> dependencies = context.getDefaultToolRepository()
.findDependencies("tomcat", "tomcat", VersionIdentifier.of("11.0.0"));

// assert
assertThat(dependencies).containsExactly(new ToolDependency("java", VersionRange.of("[17,)")));
Expand All @@ -36,10 +37,12 @@ public void testEditionFallback() {
IdeContext context = newContext();

// act
Collection<ToolDependency> dependencies = context.getDefaultToolRepository().findDependencies("tomcat", "undefined", VersionIdentifier.of("11.0.0"));
Collection<ToolDependency> dependencies = context.getDefaultToolRepository()
.findDependencies("tomcat", "undefined", VersionIdentifier.of("11.0.0"));

// assert
assertThat(dependencies).containsExactly(new ToolDependency("this-is-the-wrong-file-only-for-testing", VersionRange.of("[1.0,2.0]")));
assertThat(dependencies).containsExactly(
new ToolDependency("this-is-the-wrong-file-only-for-testing", VersionRange.of("[1.0,2.0]")));
}

@Test
Expand All @@ -49,7 +52,8 @@ public void testEditionUnspecific() {
IdeContext context = newContext();

// act
Collection<ToolDependency> dependencies = context.getDefaultToolRepository().findDependencies("mvn", "undefined", VersionIdentifier.of("3.9.0"));
Collection<ToolDependency> dependencies = context.getDefaultToolRepository()
.findDependencies("mvn", "undefined", VersionIdentifier.of("3.9.0"));

// assert
assertThat(dependencies).containsExactly(new ToolDependency("java", VersionRange.of("[8,)")));
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<module>documentation</module>
<module>cli</module>
<module>gui</module>
<module>url-updater</module>
</modules>

<build>
Expand Down
42 changes: 42 additions & 0 deletions url-updater/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.devonfw.tools.IDEasy.dev</groupId>
<artifactId>ide</artifactId>
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.devonfw.tools.IDEasy</groupId>
<artifactId>url-updater</artifactId>
<version>${revision}</version>
<name>${project.artifactId}</name>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ide-cli</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.16</version>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>3.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package com.devonfw.tools.ide.tool.androidstudio;
package com.devonfw.tools.ide.url.tool.androidstudio;

import java.util.Collection;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.devonfw.tools.ide.tool.androidstudio.AndroidJsonDownload;
import com.devonfw.tools.ide.tool.androidstudio.AndroidJsonItem;
import com.devonfw.tools.ide.tool.androidstudio.AndroidJsonObject;
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.JsonUrlUpdater;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.aws;
package com.devonfw.tools.ide.url.tool.aws;

import com.devonfw.tools.ide.os.OperatingSystem;
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.az;
package com.devonfw.tools.ide.url.tool.az;

import com.devonfw.tools.ide.os.OperatingSystem;
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.docker;
package com.devonfw.tools.ide.url.tool.docker;

import java.util.Set;
import java.util.regex.Matcher;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.docker;
package com.devonfw.tools.ide.url.tool.docker;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.dotnet;
package com.devonfw.tools.ide.url.tool.dotnet;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.eclipse;
package com.devonfw.tools.ide.url.tool.eclipse;

/**
* {@link EclipseUrlUpdater} for "cpp" (C++) edition of Eclipse.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.eclipse;
package com.devonfw.tools.ide.url.tool.eclipse;

/**
* {@link EclipseUrlUpdater} for "java" edition of Eclipse.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.eclipse;
package com.devonfw.tools.ide.url.tool.eclipse;

/**
* {@link EclipseUrlUpdater} for "jee" (C++) edition of Eclipse.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.eclipse;
package com.devonfw.tools.ide.url.tool.eclipse;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.gcloud;
package com.devonfw.tools.ide.url.tool.gcloud;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.gcviewer;
package com.devonfw.tools.ide.url.tool.gcviewer;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.gh;
package com.devonfw.tools.ide.url.tool.gh;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.graalvm;
package com.devonfw.tools.ide.url.tool.graalvm;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.graalvm;
package com.devonfw.tools.ide.url.tool.graalvm;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.graalvm;
package com.devonfw.tools.ide.url.tool.graalvm;

import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.gradle;
package com.devonfw.tools.ide.url.tool.gradle;

import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.helm;
package com.devonfw.tools.ide.url.tool.helm;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.intellij;
package com.devonfw.tools.ide.url.tool.intellij;

import java.util.Collection;
import java.util.List;
Expand All @@ -7,6 +7,9 @@
import com.devonfw.tools.ide.json.JsonVersionItem;
import com.devonfw.tools.ide.os.OperatingSystem;
import com.devonfw.tools.ide.os.SystemArchitecture;
import com.devonfw.tools.ide.tool.intellij.IntellijJsonDownloadsItem;
import com.devonfw.tools.ide.tool.intellij.IntellijJsonObject;
import com.devonfw.tools.ide.tool.intellij.IntellijJsonRelease;
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.JsonUrlUpdater;
import com.fasterxml.jackson.core.JsonProcessingException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.jasypt;
package com.devonfw.tools.ide.url.tool.jasypt;

import com.devonfw.tools.ide.url.updater.MavenBasedUrlUpdater;
import com.devonfw.tools.ide.version.VersionIdentifier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.devonfw.tools.ide.tool.java;
package com.devonfw.tools.ide.url.tool.java;

import java.util.Collection;

import com.devonfw.tools.ide.tool.java.JavaJsonObject;
import com.devonfw.tools.ide.tool.java.JavaJsonVersion;
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.JsonUrlUpdater;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.jenkins;
package com.devonfw.tools.ide.url.tool.jenkins;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.jmc;
package com.devonfw.tools.ide.url.tool.jmc;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.kotlinc;
package com.devonfw.tools.ide.url.tool.kotlinc;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.kotlinc;
package com.devonfw.tools.ide.url.tool.kotlinc;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.lazydocker;
package com.devonfw.tools.ide.url.tool.lazydocker;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.mvn;
package com.devonfw.tools.ide.url.tool.mvn;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.mvn;
package com.devonfw.tools.ide.url.tool.mvn;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.node;
package com.devonfw.tools.ide.url.tool.node;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.npm;
package com.devonfw.tools.ide.url.tool.npm;

import com.devonfw.tools.ide.url.updater.NpmBasedUrlUpdater;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.oc;
package com.devonfw.tools.ide.url.tool.oc;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.pgadmin;
package com.devonfw.tools.ide.url.tool.pgadmin;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.pip;
package com.devonfw.tools.ide.url.tool.pip;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.python;
package com.devonfw.tools.ide.url.tool.python;

import java.util.Collection;
import java.util.List;
Expand All @@ -7,6 +7,9 @@
import org.slf4j.LoggerFactory;

import com.devonfw.tools.ide.json.JsonMapping;
import com.devonfw.tools.ide.tool.python.PythonFile;
import com.devonfw.tools.ide.tool.python.PythonJsonObject;
import com.devonfw.tools.ide.tool.python.PythonRelease;
import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.JsonUrlUpdater;
import com.fasterxml.jackson.core.JsonProcessingException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.quarkus;
package com.devonfw.tools.ide.url.tool.quarkus;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.sonar;
package com.devonfw.tools.ide.url.tool.sonar;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.terraform;
package com.devonfw.tools.ide.url.tool.terraform;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.tomcat;
package com.devonfw.tools.ide.url.tool.tomcat;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.devonfw.tools.ide.tool.vscode;
package com.devonfw.tools.ide.url.tool.vscode;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlUpdater;
Expand Down
Loading

0 comments on commit 8a12beb

Please sign in to comment.