Class BootableJarSupport
java.lang.Object
org.wildfly.plugin.tools.bootablejar.BootableJarSupport
Various utilities for packing a bootable JAR.
- Author:
- jdenise, James R. Perkins
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildJar(Path contentDir, Path jarFile, ScannedArtifacts bootable, org.jboss.galleon.universe.maven.repo.MavenRepoManager resolver) Builds a JAR file for the bootable JAR.static voidpackageBootableJar(Path targetJarFile, Path workDir, org.jboss.galleon.api.config.GalleonProvisioningConfig config, Path serverHome, org.jboss.galleon.universe.maven.repo.MavenRepoManager resolver, org.jboss.galleon.MessageWriter writer) Package a server as a bootable JAR.static voidpackageBootableJar(Path targetJarFile, Path workDir, org.jboss.galleon.api.config.GalleonProvisioningConfig config, Path serverHome, org.jboss.galleon.universe.maven.repo.MavenRepoManager resolver, org.jboss.galleon.MessageWriter writer, String stabilityLevel) Package a server as a bootable JAR.static ScannedArtifactsscanArtifacts(org.jboss.galleon.api.Provisioning pm, org.jboss.galleon.api.config.GalleonProvisioningConfig config, org.jboss.galleon.MessageWriter writer) Scans the provisioning session for required artifacts.static voidunzipCloudExtension(Path contentDir, String version, org.jboss.galleon.universe.maven.repo.MavenRepoManager resolver) Resolves the cloud extension for the version provided.static voidCreates a ZIP archive for the server.static voidCreates a ZIP archive for the server.
-
Field Details
-
BOOTABLE_SUFFIX
- See Also:
-
JBOSS_MODULES_GROUP_ID
- See Also:
-
JBOSS_MODULES_ARTIFACT_ID
- See Also:
-
WILDFLY_ARTIFACT_VERSIONS_RESOURCE_PATH
- See Also:
-
-
Constructor Details
-
BootableJarSupport
public BootableJarSupport()
-
-
Method Details
-
packageBootableJar
public static void packageBootableJar(Path targetJarFile, Path workDir, org.jboss.galleon.api.config.GalleonProvisioningConfig config, Path serverHome, org.jboss.galleon.universe.maven.repo.MavenRepoManager resolver, org.jboss.galleon.MessageWriter writer) throws IOException, org.jboss.galleon.ProvisioningException Package a server as a bootable JAR.- Parameters:
targetJarFile- the path to the JAR file to createworkDir- the working directory used to generate and store contentconfig- the Galleon provisioning configurationserverHome- the server directoryresolver- the Maven resolver used to resolve artifactswriter- the message writer where messages will be written to- Throws:
IOException- if an error occurs packaging the bootable JARorg.jboss.galleon.ProvisioningException- if an error occurs packaging the bootable JAR
-
packageBootableJar
public static void packageBootableJar(Path targetJarFile, Path workDir, org.jboss.galleon.api.config.GalleonProvisioningConfig config, Path serverHome, org.jboss.galleon.universe.maven.repo.MavenRepoManager resolver, org.jboss.galleon.MessageWriter writer, String stabilityLevel) throws IOException, org.jboss.galleon.ProvisioningException Package a server as a bootable JAR.- Parameters:
targetJarFile- the path to the JAR file to createworkDir- the working directory used to generate and store contentconfig- the Galleon provisioning configurationserverHome- the server directoryresolver- the Maven resolver used to resolve artifactswriter- the message writer where messages will be written tostabilityLevel- the stability level used when starting the embedded server.- Throws:
IOException- if an error occurs packaging the bootable JARorg.jboss.galleon.ProvisioningException- if an error occurs packaging the bootable JAR
-
unzipCloudExtension
public static void unzipCloudExtension(Path contentDir, String version, org.jboss.galleon.universe.maven.repo.MavenRepoManager resolver) throws org.jboss.galleon.universe.maven.MavenUniverseException, IOException Resolves the cloud extension for the version provided. It then unpacks the extension into the content directory.- Parameters:
contentDir- the directory the cloud extension should be extracted toversion- the version of the cloud extension to useresolver- the Maven resolver used to resolve the cloud extension- Throws:
org.jboss.galleon.universe.maven.MavenUniverseException- if an error occurs while resolving the artifactIOException- if en error occurs extracting the extension
-
zipServer
Creates a ZIP archive for the server. The archive name will bewildfly.zip.- Parameters:
source- path for the content to archivetargetDir- the target directory for the archive to be created in- Throws:
IOException- if an error occurs creating the archive
-
zipServer
Creates a ZIP archive for the server.- Parameters:
source- path for the content to archivetargetDir- the target directory for the archive to be created inzipFileName- the of the archive to create- Throws:
IOException- if an error occurs creating the archive
-
scanArtifacts
public static ScannedArtifacts scanArtifacts(org.jboss.galleon.api.Provisioning pm, org.jboss.galleon.api.config.GalleonProvisioningConfig config, org.jboss.galleon.MessageWriter writer) throws org.jboss.galleon.ProvisioningException Scans the provisioning session for required artifacts. These includejboss-modules, thewildfly-jar-bootartifact and CLI artifacts.- Parameters:
pm- the provisioning sessionconfig- the provisioning configurationwriter- the message writer- Returns:
- the scanned artifacts
- Throws:
org.jboss.galleon.ProvisioningException- if an error occurs scanning
-
buildJar
public static void buildJar(Path contentDir, Path jarFile, ScannedArtifacts bootable, org.jboss.galleon.universe.maven.repo.MavenRepoManager resolver) throws IOException, org.jboss.galleon.universe.maven.MavenUniverseException Builds a JAR file for the bootable JAR.- Parameters:
contentDir- the directory which stores the bootable JAR's contentjarFile- the target JAR filebootable- the scanned artifactsresolver- the Maven resolver used to resolve artifacts- Throws:
IOException- if an error occurs building the JARorg.jboss.galleon.universe.maven.MavenUniverseException- if an error occurs resolving artifacts
-