Skip to content

Commit

Permalink
Merge pull request #9817 from geoand/fast-jar-directory
Browse files Browse the repository at this point in the history
Make the directory containing the output fast jar a constant
  • Loading branch information
geoand authored Jun 9, 2020
2 parents feb9e82 + dffe957 commit 9fb4df8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public class JarResultBuildStep {
public static final String TRANSFORMED_BYTECODE_JAR = "transformed-bytecode.jar";
public static final String APP = "app";
public static final String QUARKUS = "quarkus";
public static final String DEFAULT_FAST_JAR_DIRECTORY_NAME = "quarkus-app";

private static final boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows");

Expand Down Expand Up @@ -397,7 +398,7 @@ private JarBuildItem buildThinJar(CurateOutcomeBuildItem curateOutcomeBuildItem,
boolean rebuild = outputTargetBuildItem.isRebuild();

Path buildDir = outputTargetBuildItem.getOutputDirectory()
.resolve(outputTargetBuildItem.getBaseName());
.resolve(packageConfig.outputDirectory.orElse(DEFAULT_FAST_JAR_DIRECTORY_NAME));
//unmodified 3rd party dependencies
Path libDir = buildDir.resolve(LIB);
//parent first entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void testThatFastJarFormatWorks() throws MavenInvocationException, IOExce
Assertions.assertFalse(Files.exists(jar));

jar = testDir.toPath().toAbsolutePath()
.resolve(Paths.get("target/acme-1.0-SNAPSHOT/quarkus-run.jar"));
.resolve(Paths.get("target/quarkus-app/quarkus-run.jar"));
Assertions.assertTrue(Files.exists(jar));
File output = new File(testDir, "target/output.log");
output.createNewFile();
Expand Down Expand Up @@ -131,7 +131,7 @@ public void testThatMutableFastJarWorks() throws MavenInvocationException, IOExc
Assertions.assertFalse(Files.exists(jar));

jar = testDir.toPath().toAbsolutePath()
.resolve(Paths.get("target/acme-1.0-SNAPSHOT/quarkus-run.jar"));
.resolve(Paths.get("target/quarkus-app/quarkus-run.jar"));
Assertions.assertTrue(Files.exists(jar));
File output = new File(testDir, "target/output.log");
output.createNewFile();
Expand Down

0 comments on commit 9fb4df8

Please sign in to comment.