private void repackage(File file) { File outputFile = RepackageTask.this.outputFile; if (outputFile != null && !file.equals(outputFile)) { copy(file, outputFile); file = outputFile; } Repackager repackager = new LoggingRepackager(file); setMainClass(repackager); if (this.extension.convertLayout() != null) { repackager.setLayout(this.extension.convertLayout()); } repackager.setBackupSource(this.extension.isBackupSource()); try { LaunchScript launchScript = getLaunchScript(); repackager.repackage(file, this.libraries, launchScript); } catch (IOException ex) { throw new IllegalStateException(ex.getMessage(), ex); } }
private void repackage() throws MojoExecutionException { File source = this.project.getArtifact().getFile(); File target = getTargetFile(); Repackager repackager = getRepackager(source); Set<Artifact> artifacts = filterDependencies(this.project.getArtifacts(), getFilters(getAdditionalFilters())); Libraries libraries = new ArtifactsLibraries(artifacts, this.requiresUnpack, getLog()); try { LaunchScript launchScript = getLaunchScript(); repackager.repackage(target, libraries, launchScript); } catch (IOException ex) { throw new MojoExecutionException(ex.getMessage(), ex); } updateArtifact(source, target, repackager.getBackupFile()); }
private LaunchScript getLaunchScript() throws IOException { if (isExecutable() || getEmbeddedLaunchScript() != null) { return new DefaultLaunchScript(getEmbeddedLaunchScript(), getEmbeddedLaunchScriptProperties()); } return null; }
private LaunchScript getLaunchScript() throws IOException { if (this.executable || this.embeddedLaunchScript != null) { return new DefaultLaunchScript(this.embeddedLaunchScript, buildLaunchScriptProperties()); } return null; }
private LaunchScript getLaunchScript() throws IOException { if (this.extension.isExecutable() || this.extension.getEmbeddedLaunchScript() != null) { return new DefaultLaunchScript(this.extension.getEmbeddedLaunchScript(), this.extension.getEmbeddedLaunchScriptProperties()); } return null; }