Skip to content

Commit

Permalink
Merge pull request #38834 from gsmet/more-build-cache-work
Browse files Browse the repository at this point in the history
More build cache work
  • Loading branch information
gsmet authored Feb 19, 2024
2 parents 73bd2e0 + 5cf84f7 commit 2bdb48b
Show file tree
Hide file tree
Showing 20 changed files with 285 additions and 466 deletions.
5 changes: 5 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@
<artifactId>quarkus-build-caching-extension</artifactId>
<version>0.10</version>
</extension>
<extension>
<groupId>io.quarkus.develocity</groupId>
<artifactId>quarkus-project-develocity-extension</artifactId>
<version>1.0.0</version>
</extension>
</extensions>
2 changes: 1 addition & 1 deletion .mvn/gradle-enterprise.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<enabled>#{env['GRADLE_LOCAL_BUILD_CACHE'] != null and env['RELEASE_GITHUB_TOKEN'] == null and properties['no-build-cache'] == null}</enabled>
</local>
<remote>
<enabled>#{env['RELEASE_GITHUB_TOKEN'] == null and properties['no-build-cache'] == null}</enabled>
<enabled>#{env['CI'] != null and env['RELEASE_GITHUB_TOKEN'] == null and properties['no-build-cache'] == null}</enabled>
<storeEnabled>#{env['CI'] != null and env['GRADLE_ENTERPRISE_ACCESS_KEY'] != null and env['GRADLE_ENTERPRISE_ACCESS_KEY'] != '' and env['RELEASE_GITHUB_TOKEN'] == null}</storeEnabled>
</remote>
</buildCache>
Expand Down
58 changes: 3 additions & 55 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@
<script.extension>sh</script.extension>
<docker-prune.location>${maven.multiModuleProjectDirectory}/.github/docker-prune.${script.extension}</docker-prune.location>

<enforce-test-deps-scope.skip>${enforcer.skip}</enforce-test-deps-scope.skip>

<surefire.argLine.additional></surefire.argLine.additional>
<failsafe.argLine.additional>${surefire.argLine.additional}</failsafe.argLine.additional>
<os-maven-plugin.version>1.7.0</os-maven-plugin.version>
Expand Down Expand Up @@ -501,71 +499,21 @@
<configuration>
<rules>
<dependencyConvergence/>
<externalRules>
<location>classpath:enforcer-rules/quarkus-require-java-version.xml</location>
</externalRules>
<externalRules>
<location>classpath:enforcer-rules/quarkus-require-maven-version.xml</location>
</externalRules>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies.xml</location>
</externalRules>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies-okhttp.xml</location>
</externalRules>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies-test.xml</location>
</externalRules>
</rules>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
<execution>
<id>enforce-test-deps-scope</id>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>io.quarkus:quarkus-test-*</exclude>
<exclude>io.rest-assured:*</exclude>
<exclude>org.assertj:*</exclude>
<exclude>junit:junit</exclude>
</excludes>
<includes>
<include>io.quarkus:quarkus-test-*:*:*:test</include>
<include>io.rest-assured:*:*:*:test</include>
<include>org.assertj:*:*:*:test</include>
<include>junit:junit:*:*:test</include>
</includes>
<message>Found test dependencies with wrong scope:</message>
</bannedDependencies>
</rules>
<skip>${enforce-test-deps-scope.skip}</skip>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
<execution>
<id>enforce-test-deps-junit-scope</id>
<configuration>
<rules>
<bannedDependencies>
<searchTransitive>false</searchTransitive>
<excludes>
<exclude>org.junit.jupiter:*</exclude>
</excludes>
<includes>
<include>org.junit.jupiter:*:*:*:test</include>
</includes>
<message>Found JUnit dependencies with wrong scope:</message>
</bannedDependencies>
</rules>
<skip>${enforce-test-deps-scope.skip}</skip>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
28 changes: 17 additions & 11 deletions core/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,30 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-test-deps-junit-scope</id>
<configuration>
<skip>true</skip>
</configuration>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
<execution>
<id>enforce-quarkus-core-deployment</id>
<configuration>
<rules>
<!--
This artifact contains JUnit dependencies so we need to override the rules
to avoid testing it.
Also we enforce some additional banned dependencies.
-->
<rules combine.self="override">
<dependencyConvergence/>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies.xml</location>
</externalRules>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies-okhttp.xml</location>
</externalRules>
<requiresMinimalDeploymentDependency implementation="io.quarkus.enforcer.RequiresMinimalDeploymentDependency"/>
<bannedDependencies>
<excludes>
<!-- findbugs is not required at runtime -->
Expand All @@ -180,9 +189,6 @@
</bannedDependencies>
</rules>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
Expand Down
29 changes: 25 additions & 4 deletions extensions/panache/panache-mock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
<name>Quarkus - Panache - Mock</name>
<description>Mocking with Panache</description>

<properties>
<enforce-test-deps-scope.skip>true</enforce-test-deps-scope.skip>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -47,6 +43,31 @@
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<!--
This is a test dependency and as such some test libraries don't have the test scope
which is perfectly fine.
We override the enforcer rules to avoid testing that.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce</id>
<configuration>
<rules combine.self="override">
<dependencyConvergence/>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies.xml</location>
</externalRules>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies-okhttp.xml</location>
</externalRules>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
11 changes: 2 additions & 9 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,17 @@
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-no-runtime-deps</id>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<rules combine.children="append">
<bansRuntimeDependency implementation="io.quarkus.enforcer.BansRuntimeDependency"/>
</rules>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-enforcer-rules</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<pluginManagement>
Expand Down
33 changes: 29 additions & 4 deletions extensions/security/test-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
<artifactId>quarkus-security-test-utils</artifactId>
<name>Quarkus - Security - Test Utilities</name>

<properties>
<enforce-test-deps-scope.skip>true</enforce-test-deps-scope.skip>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -56,4 +52,33 @@
</dependency>
</dependencies>

<build>
<plugins>
<!--
This is a test dependency and as such some test libraries don't have the test scope
which is perfectly fine.
We override the enforcer rules to avoid testing that.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce</id>
<configuration>
<rules combine.self="override">
<dependencyConvergence/>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies.xml</location>
</externalRules>
<externalRules>
<location>classpath:enforcer-rules/quarkus-banned-dependencies-okhttp.xml</location>
</externalRules>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<exclude>com.squareup.okhttp:*</exclude>
<exclude>com.squareup.okio:*</exclude>
</excludes>
<message>Found Okhttp dependencies:</message>
</bannedDependencies>
</rules>
</enforcer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<enforcer>
<rules>
<bannedDependencies>
<excludes>
<exclude>io.quarkus:quarkus-test-*</exclude>
<exclude>io.rest-assured:*</exclude>
<exclude>org.assertj:*</exclude>
<exclude>junit:junit</exclude>
</excludes>
<includes>
<include>io.quarkus:quarkus-test-*:*:*:test</include>
<include>io.rest-assured:*:*:*:test</include>
<include>org.assertj:*:*:*:test</include>
<include>junit:junit:*:*:test</include>
</includes>
<message>Found test dependencies with wrong scope:</message>
</bannedDependencies>
<bannedDependencies>
<searchTransitive>false</searchTransitive>
<excludes>
<exclude>org.junit.jupiter:*</exclude>
</excludes>
<includes>
<include>org.junit.jupiter:*:*:*:test</include>
</includes>
<message>Found JUnit 5 dependencies with wrong scope:</message>
</bannedDependencies>
</rules>
</enforcer>
Loading

0 comments on commit 2bdb48b

Please sign in to comment.