-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
71f8a35
commit cc69fdf
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
cli/src/main/java/com/devonfw/tools/ide/tool/mvn/Mvn4UrlUpdater.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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})"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters