Skip to content

Commit 39490fc

Browse files
authored
[MBUILDCACHE-58] document workaround to save cache with 3.9.1 and 4.0.0-alpha-5 and run IT test with Maven 3.9.1 and 4.0.0-alpha5 (#72)
--------- Signed-off-by: Olivier Lamy <olamy@apache.org>
1 parent 1598733 commit 39490fc

File tree

6 files changed

+96
-12
lines changed

6 files changed

+96
-12
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Verify 3.9.x
19+
20+
on:
21+
push:
22+
pull_request:
23+
24+
jobs:
25+
build:
26+
name: Verify
27+
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3
28+
with:
29+
maven-args: '-D"maven.test.redirectTestOutputToFile=false -Pmaven3"'
30+
maven-matrix: '[ "3.9.1", "4.0.0-alpha-5" ]'
31+
matrix-exclude: >
32+
[
33+
{"jdk": "8"}
34+
]

.github/workflows/maven-verify.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
name: Verify
18+
name: Verify 4.x
1919

2020
on:
2121
push:
@@ -27,8 +27,8 @@ jobs:
2727
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3
2828
with:
2929
maven-args: '-D"maven.test.redirectTestOutputToFile=false"'
30-
maven-matrix: '[ "3.9.0", "4.0.0-alpha-4" ]'
30+
maven-matrix: '[ "3.9.1", "4.0.0-alpha-5" ]'
3131
matrix-exclude: >
3232
[
3333
{"jdk": "8"}
34-
]
34+
]

pom.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ under the License.
6464
<minimalJavaBuildVersion>11</minimalJavaBuildVersion>
6565
<classWorldsVersion>2.6.0</classWorldsVersion>
6666

67-
<!-- default maven version, can be override by maven3 profile -->
68-
<mavenVersion>4.0.0-alpha-4</mavenVersion>
67+
<!-- default maven version, will be override by maven3 profile -->
68+
<mavenVersion>4.0.0-alpha-5</mavenVersion>
6969
<maven.dir>maven4</maven.dir>
7070
<maven.basedir>${project.build.directory}/${maven.dir}</maven.basedir>
7171

@@ -79,14 +79,11 @@ under the License.
7979
<cipherVersion>2.0</cipherVersion>
8080
<modelloVersion>1.11</modelloVersion>
8181
<jxpathVersion>1.3</jxpathVersion>
82-
<resolverVersion>1.8.0</resolverVersion>
82+
<resolverVersion>1.9.7</resolverVersion>
8383
<slf4jVersion>1.7.32</slf4jVersion>
8484
<xmlunitVersion>2.6.4</xmlunitVersion>
8585
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
86-
8786
<maven.site.path>extensions-archives/${project.artifactId}-LATEST</maven.site.path>
88-
<!-- TODO remove when switching parent to maven-extensions:35 -->
89-
<project.build.outputTimestamp>2022-10-27T09:45:25Z</project.build.outputTimestamp>
9087
</properties>
9188

9289
<dependencyManagement>
@@ -423,7 +420,7 @@ under the License.
423420
<profile>
424421
<id>maven3</id>
425422
<properties>
426-
<mavenVersion>3.9.0</mavenVersion>
423+
<mavenVersion>3.9.1</mavenVersion>
427424
<maven.dir>maven3</maven.dir>
428425
<maven.basedir>${project.build.directory}/${maven.dir}</maven.basedir>
429426
</properties>

src/site/markdown/remote-cache.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@ Review `buildsdiff.xml` file and eliminate detected discrepancies. You can also
125125
low level insights. See techniques to configure cache in [How-To](how-to.md) and troubleshooting of typical issues
126126
in the section below.
127127

128+
If you are using a webdav remote server (which is the most easiest to use to create directories on a remote server), from Maven 3.9.1 and 4.0.0-alpha5, support of webdav has been removed per default.
129+
You need to use the following extra configuration:
130+
```bash
131+
-Daether.connector.http.supportWebDav=true
132+
OR
133+
-Dmaven.resolver.transport=wagon
134+
```
135+
136+
Or configure your remote with the following configuration (`dav:url`)
137+
```xml
138+
<remote enabled="true">
139+
<url>dav:http://your-buildcache-url</url>
140+
</remote>
141+
```
142+
128143
## Common issues
129144

130145
### Issue 1: Local checkout is with different line endings

src/test/java/org/apache/maven/buildcache/its/RemoteCacheDavTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ public void doTestRemoteCache(String transport) throws VerificationException, IO
183183

184184
verifier.getCliOptions().clear();
185185
verifier.addCliOption("--settings=" + settings);
186+
if (!"wagon".equals(transport)) {
187+
verifier.setSystemProperty("aether.connector.http.supportWebDav", "true");
188+
}
186189
verifier.addCliOption("-D" + HTTP_TRANSPORT_PRIORITY + "=" + ("wagon".equals(transport) ? "0" : "10"));
187190
verifier.addCliOption("-D" + WAGON_TRANSPORT_PRIORITY + "=" + ("wagon".equals(transport) ? "10" : "0"));
188191
verifier.addCliOption("-D" + MAVEN_BUILD_CACHE_REMOTE_SAVE_ENABLED + "=true");
@@ -197,6 +200,9 @@ public void doTestRemoteCache(String transport) throws VerificationException, IO
197200

198201
verifier.getCliOptions().clear();
199202
verifier.addCliOption("--settings=" + settings);
203+
if (!"wagon".equals(transport)) {
204+
verifier.setSystemProperty("aether.connector.http.supportWebDav", "true");
205+
}
200206
verifier.addCliOption("-D" + HTTP_TRANSPORT_PRIORITY + "=" + ("wagon".equals(transport) ? "0" : "10"));
201207
verifier.addCliOption("-D" + WAGON_TRANSPORT_PRIORITY + "=" + ("wagon".equals(transport) ? "10" : "0"));
202208
verifier.addCliOption("-D" + MAVEN_BUILD_CACHE_REMOTE_SAVE_ENABLED + "=false");

src/test/projects/remote-cache-dav/pom.xml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,40 @@
2727
<maven.compiler.source>1.8</maven.compiler.source>
2828
<maven.compiler.target>1.8</maven.compiler.target>
2929
</properties>
30-
31-
3230
<build>
31+
<pluginManagement>
32+
<plugins>
33+
<plugin>
34+
<groupId>org.apache.maven.plugins</groupId>
35+
<artifactId>maven-clean-plugin</artifactId>
36+
<version>3.2.0</version>
37+
</plugin>
38+
<plugin>
39+
<groupId>org.apache.maven.plugins</groupId>
40+
<artifactId>maven-resources-plugin</artifactId>
41+
<version>3.3.1</version>
42+
</plugin>
43+
<plugin>
44+
<groupId>org.apache.maven.plugins</groupId>
45+
<artifactId>maven-compiler-plugin</artifactId>
46+
<version>3.11.0</version>
47+
</plugin>
48+
<plugin>
49+
<groupId>org.apache.maven.plugins</groupId>
50+
<artifactId>maven-surefire-plugin</artifactId>
51+
<version>3.0.0</version>
52+
</plugin>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-jar-plugin</artifactId>
56+
<version>3.3.0</version>
57+
</plugin>
58+
<plugin>
59+
<groupId>org.apache.maven.plugins</groupId>
60+
<artifactId>maven-install-plugin</artifactId>
61+
<version>3.1.1</version>
62+
</plugin>
63+
</plugins>
64+
</pluginManagement>
3365
</build>
3466
</project>

0 commit comments

Comments
 (0)