Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#138: added updater for mvn 4.x versions #172

Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected Pattern getVersionPattern() {
@Override
protected String mapVersion(String version) {

// TODO remove this hack and get versiosn from reliable API
// TODO remove this hack and get versions from reliable API
return super.mapVersion(version.replace(" ", "-"));
}

Expand Down
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})");
MattesMrzik marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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 All @@ -57,11 +58,12 @@ public class UpdateManager extends AbstractProcessorWithTimeout {
private final UrlRepository urlRepository;

private final List<AbstractUrlUpdater> updaters = Arrays.asList(new AndroidStudioUrlUpdater(), new AwsUrlUpdater(),
new AzureUrlUpdater(), new CobigenUrlUpdater(), new DockerDesktopUrlUpdater() , new DotNetUrlUpdater(), new EclipseCppUrlUpdater(),
new EclipseJavaUrlUpdater(), new GCloudUrlUpdater(), 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 AzureUrlUpdater(), new CobigenUrlUpdater(), new DockerDesktopUrlUpdater(), new DotNetUrlUpdater(),
new EclipseCppUrlUpdater(), new EclipseJavaUrlUpdater(), new GCloudUrlUpdater(), 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 Mvn4UrlUpdater(), new NodeUrlUpdater(), new NpmUrlUpdater(), new OcUrlUpdater(),
new PipUrlUpdater(), new PythonUrlUpdater(), new QuarkusUrlUpdater(), new DockerRancherDesktopUrlUpdater(),
new SonarUrlUpdater(), new TerraformUrlUpdater(), new TomcatUrlUpdater(), new VsCodeUrlUpdater());

Expand Down
Loading