Class BuildFile
java.lang.Object
io.quarkus.devtools.project.buildfile.BuildFile
- All Implemented Interfaces:
ExtensionManager
- Direct Known Subclasses:
AbstractGroovyGradleBuildFile,MavenBuildFile,MavenProjectBuildFile
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkus.devtools.project.extensions.ExtensionManager
ExtensionManager.InstallResult, ExtensionManager.UninstallResult -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanaddDependency(io.quarkus.maven.dependency.ArtifactCoords coords, boolean managed) protected abstract List<io.quarkus.maven.dependency.ArtifactCoords> final Collection<io.quarkus.maven.dependency.ArtifactCoords> Read the build file(s) to get the list of installed extensions in this Quarkus project.protected Pathprotected abstract StringgetProperty(String propertyName) protected booleanhasProjectFile(String fileName) protected abstract booleanimportBom(io.quarkus.maven.dependency.ArtifactCoords coords) install(ExtensionInstallPlan plan) This is going to install/add all the specified extensions to the project build file(s).install(Collection<io.quarkus.maven.dependency.ArtifactCoords> coords) This is going to install/add all the specified extensions to the project build file(s).static booleanisDefinedInRegistry(Collection<io.quarkus.registry.catalog.Extension> registry, io.quarkus.maven.dependency.ArtifactKey key) protected byte[]readProjectFile(String fileName) protected abstract voidprotected abstract voidremoveDependency(io.quarkus.maven.dependency.ArtifactKey key) uninstall(Collection<io.quarkus.maven.dependency.ArtifactKey> keys) This is going to uninstall/remove all the specified extensions from the project build file(s).protected abstract voidprotected voidwriteToProjectFile(String fileName, byte[] content) protected voidwriteToProjectFile(String fileName, String content) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.devtools.project.extensions.ExtensionManager
getBuildTool, getInstalledPlatforms, isInstalled
-
Constructor Details
-
BuildFile
-
-
Method Details
-
install
public final ExtensionManager.InstallResult install(Collection<io.quarkus.maven.dependency.ArtifactCoords> coords) throws IOException Description copied from interface:ExtensionManagerThis is going to install/add all the specified extensions to the project build file(s).- Extensions which are already installed will ALWAYS be skipped whatever the specified version - The provided version will be used if it wasn't already installed
- Specified by:
installin interfaceExtensionManager- Parameters:
coords- the list ofArtifactCoordsfor the extensions to install- Returns:
- the
ExtensionManager.InstallResult - Throws:
IOException- if a problem occurs while reading/writing the project build file(s)
-
install
Description copied from interface:ExtensionManagerThis is going to install/add all the specified extensions to the project build file(s).- If the project Quarkus platform bom is not defined, an
IllegalStateExceptionwill be thrown - Extensions which are already installed will ALWAYS be skipped whatever the specified version - The provided version will be used if wasn't already installed- Specified by:
installin interfaceExtensionManager- Parameters:
plan- the list ofArtifactCoordsfor the extensions to install- Returns:
- the
ExtensionManager.InstallResult - Throws:
IOException- if a problem occurs while reading/writing the project build file(s)
-
getInstalled
public final Collection<io.quarkus.maven.dependency.ArtifactCoords> getInstalled() throws IOExceptionDescription copied from interface:ExtensionManagerRead the build file(s) to get the list of installed extensions in this Quarkus project.- Specified by:
getInstalledin interfaceExtensionManager- Returns:
- The list of
ArtifactCoordsinstalled in the project build file(s). - Throws:
IOException- if a problem occurs while reading the project build file(s)
-
uninstall
public final ExtensionManager.UninstallResult uninstall(Collection<io.quarkus.maven.dependency.ArtifactKey> keys) throws IOException Description copied from interface:ExtensionManagerThis is going to uninstall/remove all the specified extensions from the project build file(s). This is ignoring the version- Specified by:
uninstallin interfaceExtensionManager- Parameters:
keys- the set ofArtifactKeyfor the extensions to uninstall- Returns:
- the
ExtensionManager.InstallResult - Throws:
IOException- if a problem occurs while reading/writing the project build file(s)
-
importBom
protected abstract boolean importBom(io.quarkus.maven.dependency.ArtifactCoords coords) -
addDependency
protected abstract boolean addDependency(io.quarkus.maven.dependency.ArtifactCoords coords, boolean managed) -
removeDependency
protected abstract void removeDependency(io.quarkus.maven.dependency.ArtifactKey key) throws IOException - Throws:
IOException
-
getDependencies
protected abstract List<io.quarkus.maven.dependency.ArtifactCoords> getDependencies() throws IOException- Throws:
IOException
-
writeToDisk
- Throws:
IOException
-
getProperty
- Throws:
IOException
-
refreshData
protected abstract void refreshData() -
getProjectDirPath
-
hasProjectFile
- Throws:
IOException
-
readProjectFile
- Throws:
IOException
-
writeToProjectFile
- Throws:
IOException
-
writeToProjectFile
- Throws:
IOException
-
isDefinedInRegistry
public static boolean isDefinedInRegistry(Collection<io.quarkus.registry.catalog.Extension> registry, io.quarkus.maven.dependency.ArtifactKey key)
-