-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19462 from glefloch/fix/19386
Make sure super-configuration are used for dependency resolution
- Loading branch information
Showing
6 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
integration-tests/gradle/src/main/resources/configuration-inheritance-project/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
plugins { | ||
id 'java' | ||
id 'io.quarkus' | ||
} | ||
|
||
group = 'com.quarkus.demo' | ||
version = '1.0' | ||
|
||
repositories { | ||
mavenCentral() | ||
if (System.properties.containsKey('maven.repo.local')) { | ||
maven { | ||
url System.properties.get('maven.repo.local') | ||
} | ||
} else { | ||
mavenLocal() | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}") | ||
|
||
implementation 'io.quarkus:quarkus-resteasy' | ||
testImplementation 'io.quarkus:quarkus-junit5' | ||
testImplementation 'io.rest-assured:rest-assured' | ||
|
||
implementation 'org.apache.commons:commons-collections4:4.4' | ||
testImplementation 'org.apache.commons:commons-collections4::tests' | ||
} | ||
|
2 changes: 2 additions & 0 deletions
2
...ation-tests/gradle/src/main/resources/configuration-inheritance-project/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
quarkusPlatformArtifactId=quarkus-bom | ||
quarkusPlatformGroupId=io.quarkus |
21 changes: 21 additions & 0 deletions
21
...gration-tests/gradle/src/main/resources/configuration-inheritance-project/settings.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
pluginManagement { | ||
repositories { | ||
if (System.properties.containsKey('maven.repo.local')) { | ||
maven { | ||
url System.properties.get('maven.repo.local') | ||
} | ||
} else { | ||
mavenLocal() | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
//noinspection GroovyAssignabilityCheck | ||
plugins { | ||
id 'io.quarkus' version "${quarkusPluginVersion}" | ||
} | ||
} | ||
|
||
rootProject.name = 'quarkus-configuration-inheritance' | ||
|
||
|
17 changes: 17 additions & 0 deletions
17
...onfiguration-inheritance-project/src/main/java/org/acme/quarkus/sample/HelloResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.acme.quarkus.sample; | ||
|
||
import javax.inject.Inject; | ||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
@Path("/hello") | ||
public class HelloResource { | ||
|
||
@GET | ||
@Produces(MediaType.TEXT_PLAIN) | ||
public String hello() { | ||
return "hello"; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
integration-tests/gradle/src/test/java/io/quarkus/gradle/DependencyResolutionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.quarkus.gradle; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.net.URISyntaxException; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class DependencyResolutionTest extends QuarkusGradleWrapperTestBase { | ||
@Test | ||
public void shouldResolveDependencyVersionFromSuperConfigurationProject() | ||
throws IOException, URISyntaxException, InterruptedException { | ||
final File projectDir = getProjectDir("configuration-inheritance-project"); | ||
|
||
final BuildResult result = runGradleWrapper(projectDir, "clean", "quarkusBuild"); | ||
|
||
assertThat(result.getTasks().get(":quarkusBuild")).isEqualTo(BuildResult.SUCCESS_OUTCOME); | ||
} | ||
} |