Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
fvarrui committed Sep 25, 2023
2 parents 019de79 + d0bf0c1 commit f01e4f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies {
}

group = 'io.github.fvarrui'
version = '1.7.4'
version = '1.7.5'
description = 'Hybrid Maven/Gradle plugin to package Java applications as native Windows, Mac OS X or GNU/Linux executables and create installers for them'

sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import io.github.fvarrui.javapackager.packagers.ArtifactGenerator;
import io.github.fvarrui.javapackager.packagers.Context;
import io.github.fvarrui.javapackager.packagers.Packager;
import io.github.fvarrui.javapackager.utils.FileUtils;
import io.github.fvarrui.javapackager.utils.Logger;
import io.github.fvarrui.javapackager.utils.MojoExecutorUtils;

Expand All @@ -39,8 +38,6 @@ public CreateRunnableJar() {
protected File doApply(Packager packager) {

String classifier = "runnable";
String name = packager.getName();
String version = packager.getVersion();
String mainClass = packager.getMainClass();
File outputDirectory = packager.getOutputDirectory();
ExecutionEnvironment env = Context.getMavenContext().getEnv();
Expand Down Expand Up @@ -101,17 +98,7 @@ protected File doApply(Packager packager) {
String finalName = Context.getMavenContext().getEnv().getMavenProject().getBuild().getFinalName();

// creates file pointing to generated jar file
File finalJarFile = new File(outputDirectory, finalName + "-" + classifier + ".jar");

// creates desired output jar file
File jarFile = new File(outputDirectory, name + "-" + version + "-" + classifier + ".jar");

// renames generated jar to desired one if they are different
if (!finalJarFile.equals(jarFile)) {
FileUtils.rename(finalJarFile, jarFile.getName());
}

return jarFile;
return new File(outputDirectory, finalName + "-" + classifier + ".jar");

}

Expand Down

0 comments on commit f01e4f0

Please sign in to comment.