Skip to content

Commit 97b38c7

Browse files
committed
Add Maven Build Cache plugin
The build cache extension caches the results of maven goal executions and skips re-running them if the same inputs are detected again. This helps both local development (re run tests of affected modules only) and CI builds eventually (a subsequent commit will introduce sharing of the cache between CI runs) Signed-off-by: Eric Bottard <[email protected]>
1 parent 89a3b32 commit 97b38c7

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.mvn/extensions.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@
2121
<artifactId>maven-profiler</artifactId>
2222
<version>3.2</version>
2323
</extension>
24+
<extension>
25+
<groupId>org.apache.maven.extensions</groupId>
26+
<artifactId>maven-build-cache-extension</artifactId>
27+
<version>1.2.1</version>
28+
</extension>
2429
</extensions>

.mvn/maven-build-cache-config.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.2.0 https://maven.apache.org/xsd/build-cache-config-1.2.0.xsd">
2+
<configuration>
3+
<attachedOutputs>
4+
<dirNames>
5+
<dirName>antora</dirName>
6+
</dirNames>
7+
</attachedOutputs>
8+
</configuration>
9+
<input>
10+
<global>
11+
<includes>
12+
<!-- By default, project sources and resources directories are included (src/main/java and src/main/resources) -->
13+
<!-- Here, the goal is to include a wider range of src directories (like src/main/assembly or src/main/antora) -->
14+
<include>src/</include>
15+
</includes>
16+
</global>
17+
</input>
18+
<executionControl>
19+
<reconcile>
20+
<plugins>
21+
<plugin artifactId="maven-surefire-plugin" goal="test">
22+
<reconciles>
23+
<reconcile propertyName="skip" skipValue="true"/>
24+
<reconcile propertyName="skipExec" skipValue="true"/>
25+
<reconcile propertyName="skipTests" skipValue="true"/>
26+
<reconcile propertyName="testFailureIgnore" skipValue="true"/>
27+
</reconciles>
28+
</plugin>
29+
</plugins>
30+
</reconcile>
31+
</executionControl>
32+
</cache>

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
16+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip
1717
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

0 commit comments

Comments
 (0)