Skip to content

Commit

Permalink
#138: added updater for mvn 4.x versions (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattesMrzik authored Apr 19, 2024
1 parent 71f8a35 commit cc69fdf
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.devonfw.tools.ide.tool.mvn;

import java.util.regex.Pattern;

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

/**
* {@link WebsiteUrlUpdater} for mvn (maven) versions 4.x.
*/
public class Mvn4UrlUpdater extends WebsiteUrlUpdater {
@Override
protected String getTool() {

return "mvn";
}

@Override
protected void addVersion(UrlVersion urlVersion) {

doAddVersion(urlVersion,
"https://archive.apache.org/dist/maven/maven-4/${version}/binaries/apache-maven-${version}-bin.tar.gz");
}

@Override
protected String mapVersion(String version) {

return version;
}

@Override
protected String getVersionUrl() {

return "https://archive.apache.org/dist/maven/maven-4/";
}

@Override
protected Pattern getVersionPattern() {

return Pattern.compile("(\\d\\.\\d\\.\\d-[a-z]*?-\\d{1,2})");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.devonfw.tools.ide.tool.kotlinc.KotlincNativeUrlUpdater;
import com.devonfw.tools.ide.tool.kotlinc.KotlincUrlUpdater;
import com.devonfw.tools.ide.tool.lazydocker.LazyDockerUrlUpdater;
import com.devonfw.tools.ide.tool.mvn.Mvn4UrlUpdater;
import com.devonfw.tools.ide.tool.mvn.MvnUrlUpdater;
import com.devonfw.tools.ide.tool.node.NodeUrlUpdater;
import com.devonfw.tools.ide.tool.npm.NpmUrlUpdater;
Expand Down Expand Up @@ -64,7 +65,7 @@ public class UpdateManager extends AbstractProcessorWithTimeout {
new GcViewerUrlUpdater(), new GhUrlUpdater(), new GraalVmCommunityUpdater(), new GraalVmOracleUrlUpdater(),
new GradleUrlUpdater(), new HelmUrlUpdater(), new IntellijUrlUpdater(), new JavaUrlUpdater(),
new JenkinsUrlUpdater(), new JmcUrlUpdater(), new KotlincUrlUpdater(), new KotlincNativeUrlUpdater(),
new LazyDockerUrlUpdater(), new MvnUrlUpdater(), new NodeUrlUpdater(), new NpmUrlUpdater(), new OcUrlUpdater(),
new LazyDockerUrlUpdater(), new MvnUrlUpdater(), new Mvn4UrlUpdater(), new NodeUrlUpdater(), new NpmUrlUpdater(), new OcUrlUpdater(),
new PipUrlUpdater(), new PythonUrlUpdater(), new QuarkusUrlUpdater(), new DockerRancherDesktopUrlUpdater(),
new SonarUrlUpdater(), new TerraformUrlUpdater(), new TomcatUrlUpdater(), new VsCodeUrlUpdater(),
new JasyptUrlUpdater());
Expand Down

0 comments on commit cc69fdf

Please sign in to comment.