Skip to content

Commit

Permalink
Verify, that uberjar can be built even with empty suffix
Browse files Browse the repository at this point in the history
When option quarkus.package.add-runner-suffix=false is used,
überjar and the original JAR have the same name and the original JAR is
deleted before über is created.
Since über is created on the basis of original, this option caused failure,
before the fix in https://issues.redhat.com/browse/QUARKUS-2777
  • Loading branch information
fedinskiy committed Jan 13, 2023
1 parent c27474a commit 907043c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,30 @@
@DisabledOnNative(reason = "This scenario is using uber-jar, so it's incompatible with Native")
@QuarkusScenario
public class TodoDemoIT {
@GitRepositoryQuarkusApplication(repo = "https://github.com/quarkusio/todo-demo-app.git", mavenArgs = "-Dquarkus.package.type=uber-jar -DskipTests=true -Dquarkus.platform.group-id=${QUARKUS_PLATFORM_GROUP-ID} -Dquarkus.platform.version=${QUARKUS_VERSION} ")
private static final String TODO_REPO = "https://github.com/quarkusio/todo-demo-app.git";
private static final String VERSIONS = "-Dquarkus.platform.group-id=${QUARKUS_PLATFORM_GROUP-ID} -Dquarkus.platform.version=${QUARKUS_VERSION} ";
private static final String DEFAULT_OPTIONS = "-DskipTests=true " + VERSIONS;

@GitRepositoryQuarkusApplication(repo = TODO_REPO, mavenArgs = "-Dquarkus.package.type=uber-jar " + DEFAULT_OPTIONS)
static final RestService app = new RestService();

@GitRepositoryQuarkusApplication(repo = TODO_REPO, artifact = "todo-backend-1.0-SNAPSHOT.jar", mavenArgs = "-Dquarkus.package.type=uber-jar -Dquarkus.package.add-runner-suffix=false"
+ DEFAULT_OPTIONS)
static final RestService replaced = new RestService();

@Test
public void verify() {
public void startsSuccessfully() {
app.given()
.get()
.then()
.statusCode(HttpStatus.SC_OK);
}

@Test
public void replacedStartsSuccessfully() {
replaced.given()
.get()
.then()
.statusCode(HttpStatus.SC_OK);
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>999-SNAPSHOT</quarkus.platform.version>
<quarkus.qe.framework.version>1.3.0.Beta1</quarkus.qe.framework.version>
<quarkus.qe.framework.version>1.3.0.Beta3</quarkus.qe.framework.version>
<quarkus-qpid-jms.version>0.40.0</quarkus-qpid-jms.version>
<quarkus-ide-config.version>2.12.1.Final</quarkus-ide-config.version>
<apache-httpclient-fluent.version>4.5.14</apache-httpclient-fluent.version>
Expand Down

0 comments on commit 907043c

Please sign in to comment.