-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
139 additions
and
21 deletions.
There are no files selected for viewing
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
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
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
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
33 changes: 33 additions & 0 deletions
33
...in/src/main/java/eu/maveniverse/maven/toolbox/plugin/gav/GavListAvailablePluginsMojo.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,33 @@ | ||
/* | ||
* Copyright (c) 2023-2024 Maveniverse Org. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
*/ | ||
package eu.maveniverse.maven.toolbox.plugin.gav; | ||
|
||
import eu.maveniverse.maven.toolbox.plugin.GavMojoSupport; | ||
import eu.maveniverse.maven.toolbox.shared.ToolboxCommando; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
import org.apache.maven.plugins.annotations.Parameter; | ||
|
||
/** | ||
* List available plugins. | ||
*/ | ||
@Mojo(name = "gav-list-available-plugins", requiresProject = false, threadSafe = true) | ||
public class GavListAvailablePluginsMojo extends GavMojoSupport { | ||
/** | ||
* The groupIds to list. | ||
*/ | ||
@Parameter(property = "groupIds") | ||
private String groupIds; | ||
|
||
@Override | ||
protected void doExecute(ToolboxCommando toolboxCommando) throws Exception { | ||
if (groupIds == null || groupIds.trim().isEmpty()) { | ||
groupIds = String.join(",", settings.getPluginGroups()); | ||
} | ||
toolboxCommando.listAvailablePlugins(csv(groupIds), output); | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...plugin/src/main/java/eu/maveniverse/maven/toolbox/plugin/gav/GavListRepositoriesMojo.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,44 @@ | ||
/* | ||
* Copyright (c) 2023-2024 Maveniverse Org. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
*/ | ||
package eu.maveniverse.maven.toolbox.plugin.gav; | ||
|
||
import eu.maveniverse.maven.toolbox.plugin.GavMojoSupport; | ||
import eu.maveniverse.maven.toolbox.shared.ResolutionScope; | ||
import eu.maveniverse.maven.toolbox.shared.ToolboxCommando; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
import org.apache.maven.plugins.annotations.Parameter; | ||
|
||
/** | ||
* Resolves transitively a given GAV and outputs used repositories. | ||
*/ | ||
@Mojo(name = "gav-list-repositories", threadSafe = true) | ||
public final class GavListRepositoriesMojo extends GavMojoSupport { | ||
/** | ||
* The resolution scope to display, accepted values are "runtime", "compile", "test", etc. | ||
*/ | ||
@Parameter(property = "scope", defaultValue = "runtime", required = true) | ||
private String scope; | ||
|
||
/** | ||
* The artifact coordinates in the format {@code <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>} | ||
* to display tree for. | ||
*/ | ||
@Parameter(property = "gav", required = true) | ||
private String gav; | ||
|
||
/** | ||
* Apply BOMs, if needed. Comma separated GAVs. | ||
*/ | ||
@Parameter(property = "boms", defaultValue = "") | ||
private String boms; | ||
|
||
@Override | ||
protected void doExecute(ToolboxCommando toolboxCommando) throws Exception { | ||
toolboxCommando.listRepositories(ResolutionScope.parse(scope), toolboxCommando.loadGav(gav, csv(boms)), output); | ||
} | ||
} |
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
31 changes: 31 additions & 0 deletions
31
maven-plugin/src/main/java/eu/maveniverse/maven/toolbox/plugin/mp/ListRepositoriesMojo.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,31 @@ | ||
/* | ||
* Copyright (c) 2023-2024 Maveniverse Org. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
*/ | ||
package eu.maveniverse.maven.toolbox.plugin.mp; | ||
|
||
import eu.maveniverse.maven.toolbox.plugin.MPMojoSupport; | ||
import eu.maveniverse.maven.toolbox.shared.ResolutionScope; | ||
import eu.maveniverse.maven.toolbox.shared.ToolboxCommando; | ||
import org.apache.maven.plugins.annotations.Mojo; | ||
import org.apache.maven.plugins.annotations.Parameter; | ||
|
||
/** | ||
* Resolves transitively a given GAV and outputs used repositories. | ||
*/ | ||
@Mojo(name = "list-repositories", threadSafe = true) | ||
public final class ListRepositoriesMojo extends MPMojoSupport { | ||
/** | ||
* The resolution scope to display, accepted values are "runtime", "compile", "test", etc. | ||
*/ | ||
@Parameter(property = "scope", defaultValue = "runtime", required = true) | ||
private String scope; | ||
|
||
@Override | ||
protected void doExecute(ToolboxCommando toolboxCommando) throws Exception { | ||
toolboxCommando.listRepositories(ResolutionScope.parse(scope), projectAsResolutionRoot(), output); | ||
} | ||
} |
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