Search in sources :

Example 1 with LaunchScript

use of org.springframework.boot.loader.tools.LaunchScript in project spring-boot by spring-projects.

the class RepackageMojo method repackage.

private void repackage() throws MojoExecutionException {
    Artifact source = getSourceArtifact(this.classifier);
    File target = getTargetFile(this.finalName, this.classifier, this.outputDirectory);
    Repackager repackager = getRepackager(source.getFile());
    Libraries libraries = getLibraries(this.requiresUnpack);
    try {
        LaunchScript launchScript = getLaunchScript();
        repackager.repackage(target, libraries, launchScript, parseOutputTimestamp());
    } catch (IOException ex) {
        throw new MojoExecutionException(ex.getMessage(), ex);
    }
    updateArtifact(source, target, repackager.getBackupFile());
}
Also used : MojoExecutionException(org.apache.maven.plugin.MojoExecutionException) Repackager(org.springframework.boot.loader.tools.Repackager) Libraries(org.springframework.boot.loader.tools.Libraries) LaunchScript(org.springframework.boot.loader.tools.LaunchScript) DefaultLaunchScript(org.springframework.boot.loader.tools.DefaultLaunchScript) IOException(java.io.IOException) File(java.io.File) Artifact(org.apache.maven.artifact.Artifact)

Aggregations

File (java.io.File)1 IOException (java.io.IOException)1 Artifact (org.apache.maven.artifact.Artifact)1 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)1 DefaultLaunchScript (org.springframework.boot.loader.tools.DefaultLaunchScript)1 LaunchScript (org.springframework.boot.loader.tools.LaunchScript)1 Libraries (org.springframework.boot.loader.tools.Libraries)1 Repackager (org.springframework.boot.loader.tools.Repackager)1