Package io.quarkus.cli.plugin
Class PluginUtil
java.lang.Object
io.quarkus.cli.plugin.PluginUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<io.quarkus.maven.dependency.GACTV> checkGACTV(String location) Chekcs if specifiedStringis a valid .static Optional<io.quarkus.maven.dependency.GACTV> checkGACTV(Optional<String> location) Chekcs if specifiedStringis a valid path.checkRemoteCatalog(String location) Chekcs if specifiedStringcontains a valid remote catalogcheckRemoteCatalog(Optional<String> location) Chekcs if specifiedStringis a valid .static PluginTypeGet thePluginTypethat corresponds the the specified location.static PluginTypeGet thePluginTypethat corresponds the the specified locations.static booleanisLocalFile(String location) Checks if location is a file that does exists locally.static booleanisProjectFile(Path projectRoot, String location) Checks if location is a file that does exists under the project root.static booleanisRemoteLocation(String location) Checks if location is remote.static booleanCheck if the plugin can be found.static booleanshouldSync(Path projectRoot, PluginCatalog catalog) static booleanshouldSync(Optional<Path> projectRoot, PluginCatalog catalog)
-
Method Details
-
shouldSync
-
shouldSync
-
getType
Get thePluginTypethat corresponds the the specified location.- Parameters:
the- location- Returns:
- the
PluginTypethat corresponds to the location.
-
getType
public static PluginType getType(Optional<io.quarkus.maven.dependency.GACTV> gactv, Optional<URL> url, Optional<Path> path) Get thePluginTypethat corresponds the the specified locations.- Parameters:
gactv- the gactvurl- the urlpath- the path- Returns:
- the
PluginTypethat corresponds to the location.
-
shouldRemove
Check if the plugin can be found. The method is used to determined the plugin can be located.- Returns:
- true if path is not null and points to an existing file.
-
checkUrl
Chekcs if specifiedStringis a valid . -
checkUrl
-
checkGACTV
Chekcs if specifiedStringis a valid . -
checkGACTV
-
checkPath
Chekcs if specifiedStringis a valid path. -
checkPath
-
checkRemoteCatalog
Chekcs if specifiedStringcontains a valid remote catalog- Parameters:
location- The string to check- Returns:
- The catalog wrapped in
Optionalif valid, empty otherwise.
-
checkRemoteCatalog
-
isRemoteLocation
Checks if location is remote.- Parameters:
location- the specifiied location.- Returns:
- true if location is url or gactv
-
isLocalFile
Checks if location is a file that does exists locally.- Parameters:
location- the specifiied location.- Returns:
- true if location is url or gactv
-
isProjectFile
Checks if location is a file that does exists under the project root.- Parameters:
projectRoot- the root of the project.location- the specifiied location.- Returns:
- true if location is url or gactv
-