Skip to content

Commit 40b7c0f

Browse files
Build by Maven 4
1 parent 78664f4 commit 40b7c0f

File tree

25 files changed

+359
-36
lines changed

25 files changed

+359
-36
lines changed

.github/workflows/maven-verify.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ jobs:
2525
build:
2626
name: Verify
2727
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
28+
with:
29+
maven4-enabled: true

src/it/projects/list-repositories/verify.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ String buildLog = file.getText( "UTF-8" )
2424
assert buildLog.contains( 'Project remote repositories used by this build:')
2525
assert buildLog.contains( '* fake-remote-repository (http://localhost:2345, default, releases+snapshots)')
2626
assert buildLog.contains( '* sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots) mirrored by mrm-maven-plugin')
27-
assert buildLog.contains( '* central (https://repo.maven.apache.org/maven2, default, releases) mirrored by mrm-maven-plugin')
28-
27+
if (!mavenVersion.startsWith('4.')) {
28+
// Maven 4 drop central repo from default super pom - so model doesn't have it
29+
assert buildLog.contains('* central (https://repo.maven.apache.org/maven2, default, releases) mirrored by mrm-maven-plugin')
30+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
org.apache.maven.its.dependency:test:jar:1.0-SNAPSHOT
2+
\- org.apache.maven:maven-project:jar:2.0.6:compile
3+
+- org.apache.maven:maven-settings:jar:2.0.6:compile
4+
+- org.apache.maven:maven-profile:jar:2.0.6:compile
5+
+- org.apache.maven:maven-model:jar:2.0.6:compile
6+
+- org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
7+
| +- org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
8+
| \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
9+
+- org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
10+
+- org.apache.maven:maven-artifact:jar:2.0.6:compile
11+
\- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
12+
+- junit:junit:jar:3.8.1:compile
13+
\- classworlds:classworlds:jar:1.1:compile

src/it/projects/tree-excluded/verify.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919

2020
import static org.assertj.core.api.Assertions.assertThat
2121

22+
// Maven 4 use transitive dependency manager
23+
def expected = mavenVersion.startsWith('4.') ? "expected-v4.txt" : "expected.txt"
24+
2225
assertThat(new File(basedir, "target/tree.txt"))
23-
.hasSameTextualContentAs(new File(basedir, "expected.txt"))
26+
.hasSameTextualContentAs(new File(basedir, expected))
2427

2528
return true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
org.apache.maven.its.dependency:tree-multimodule-module-a:jar:1.0-SNAPSHOT
2+
\- org.apache.maven:maven-project:jar:2.0.6:compile
3+
+- org.apache.maven:maven-settings:jar:2.0.6:compile
4+
+- org.apache.maven:maven-profile:jar:2.0.6:compile
5+
+- org.apache.maven:maven-model:jar:2.0.6:compile
6+
+- org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
7+
| +- org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
8+
| \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
9+
+- org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
10+
+- org.codehaus.plexus:plexus-utils:jar:1.4.1:compile
11+
+- org.apache.maven:maven-artifact:jar:2.0.6:compile
12+
\- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
13+
+- junit:junit:jar:3.8.1:compile
14+
\- classworlds:classworlds:jar:1.1:compile
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
org.apache.maven.its.dependency:tree-multimodule-module-b:jar:1.0-SNAPSHOT
2+
\- org.apache.maven.its.dependency:tree-multimodule-module-a:jar:1.0-SNAPSHOT:compile
3+
\- org.apache.maven:maven-project:jar:2.0.6:compile
4+
+- org.apache.maven:maven-settings:jar:2.0.6:compile
5+
+- org.apache.maven:maven-profile:jar:2.0.6:compile
6+
+- org.apache.maven:maven-model:jar:2.0.6:compile
7+
+- org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
8+
| +- org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
9+
| \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
10+
+- org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
11+
+- org.codehaus.plexus:plexus-utils:jar:1.4.1:compile
12+
+- org.apache.maven:maven-artifact:jar:2.0.6:compile
13+
\- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
14+
+- junit:junit:jar:3.8.1:compile
15+
\- classworlds:classworlds:jar:1.1:compile

src/it/projects/tree-multimodule/test.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@
1616
# under the License.
1717

1818
outputFile = target/tree.txt
19-
maven.resolver.dependencyManagerTransitivity=false

src/it/projects/tree-multimodule/verify.groovy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@
1919

2020
import static org.assertj.core.api.Assertions.assertThat
2121

22+
// Maven 4 use transitive dependency manager
23+
def expected = mavenVersion.startsWith('4.') ? "expected-v4.txt" : "expected.txt"
24+
2225
assertThat(new File(basedir, "target/tree.txt"))
2326
.hasSameTextualContentAs(new File(basedir, "expected.txt"))
2427

2528
assertThat(new File(basedir, "module-a/target/tree.txt"))
26-
.hasSameTextualContentAs(new File(basedir, "module-a/expected.txt"))
29+
.hasSameTextualContentAs(new File(basedir, "module-a/" + expected))
2730

2831
assertThat(new File(basedir, "module-b/target/tree.txt"))
29-
.hasSameTextualContentAs(new File(basedir, "module-b/expected.txt"))
32+
.hasSameTextualContentAs(new File(basedir, "module-b/" + expected))
3033

3134
return true;
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
org.apache.maven.its.dependency:test:jar:1.0-SNAPSHOT
2+
\- org.apache.maven:maven-core:jar:3.6.3:compile
3+
+- org.apache.maven:maven-model:jar:3.6.3:compile
4+
+- org.apache.maven:maven-settings:jar:3.6.3:compile
5+
+- org.apache.maven:maven-settings-builder:jar:3.6.3:compile
6+
| +- org.codehaus.plexus:plexus-interpolation:jar:1.25:compile
7+
| \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
8+
| \- org.sonatype.plexus:plexus-cipher:jar:1.7:compile
9+
+- org.apache.maven:maven-builder-support:jar:3.6.3:compile
10+
+- org.apache.maven:maven-repository-metadata:jar:3.6.3:compile
11+
+- org.apache.maven:maven-artifact:jar:3.6.3:compile
12+
+- org.apache.maven:maven-plugin-api:jar:3.6.3:compile
13+
+- org.apache.maven:maven-model-builder:jar:3.6.3:compile
14+
+- org.apache.maven:maven-resolver-provider:jar:3.6.3:compile
15+
+- org.apache.maven.resolver:maven-resolver-impl:jar:1.4.1:compile
16+
+- org.apache.maven.resolver:maven-resolver-api:jar:1.4.1:compile
17+
+- org.apache.maven.resolver:maven-resolver-spi:jar:1.4.1:compile
18+
+- org.apache.maven.resolver:maven-resolver-util:jar:1.4.1:compile
19+
+- org.apache.maven.shared:maven-shared-utils:jar:3.2.1:compile
20+
| \- commons-io:commons-io:jar:2.5:compile
21+
+- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.4:compile
22+
| \- javax.enterprise:cdi-api:jar:1.0:compile
23+
| \- javax.annotation:jsr250-api:jar:1.0:compile
24+
+- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.4:compile
25+
+- com.google.inject:guice:jar:no_aop:4.2.1:compile
26+
| +- aopalliance:aopalliance:jar:1.0:compile
27+
| \- com.google.guava:guava:jar:25.1-android:compile
28+
| +- com.google.code.findbugs:jsr305:jar:3.0.1:compile
29+
| +- org.checkerframework:checker-compat-qual:jar:2.0.0:compile
30+
| +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
31+
| +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
32+
| \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
33+
+- javax.inject:javax.inject:jar:1:compile
34+
+- org.codehaus.plexus:plexus-utils:jar:3.2.1:compile
35+
+- org.codehaus.plexus:plexus-classworlds:jar:2.6.0:compile
36+
+- org.codehaus.plexus:plexus-component-annotations:jar:2.1.0:compile
37+
\- org.apache.commons:commons-lang3:jar:3.8.1:compile
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
org.apache.maven.its.dependency:test:jar:1.0-SNAPSHOT
2+
+- org.apache.maven:maven-core:jar:3.6.3:compile
3+
| +- org.apache.maven:maven-model:jar:3.6.3:compile
4+
| +- org.apache.maven:maven-settings:jar:3.6.3:compile
5+
| +- org.apache.maven:maven-settings-builder:jar:3.6.3:compile
6+
| | +- org.codehaus.plexus:plexus-interpolation:jar:1.25:compile
7+
| | \- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
8+
| | \- org.sonatype.plexus:plexus-cipher:jar:1.7:compile
9+
| +- org.apache.maven:maven-builder-support:jar:3.6.3:compile
10+
| +- org.apache.maven:maven-repository-metadata:jar:3.6.3:compile
11+
| +- org.apache.maven:maven-artifact:jar:3.6.3:compile
12+
| +- org.apache.maven:maven-plugin-api:jar:3.6.3:compile
13+
| +- org.apache.maven:maven-model-builder:jar:3.6.3:compile
14+
| +- org.apache.maven:maven-resolver-provider:jar:3.6.3:compile
15+
| +- org.apache.maven.resolver:maven-resolver-impl:jar:1.4.1:compile
16+
| +- org.apache.maven.resolver:maven-resolver-api:jar:1.4.1:compile
17+
| +- org.apache.maven.resolver:maven-resolver-spi:jar:1.4.1:compile
18+
| +- org.apache.maven.resolver:maven-resolver-util:jar:1.4.1:compile
19+
| +- org.apache.maven.shared:maven-shared-utils:jar:3.2.1:compile
20+
| | \- commons-io:commons-io:jar:2.5:compile
21+
| +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.4:compile
22+
| | \- javax.enterprise:cdi-api:jar:1.0:compile
23+
| | \- javax.annotation:jsr250-api:jar:1.0:compile
24+
| +- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.4:compile
25+
| +- com.google.inject:guice:jar:no_aop:4.2.1:compile
26+
| | +- aopalliance:aopalliance:jar:1.0:compile
27+
| | \- com.google.guava:guava:jar:25.1-android:compile
28+
| | +- com.google.code.findbugs:jsr305:jar:3.0.1:compile
29+
| | +- org.checkerframework:checker-compat-qual:jar:2.0.0:compile
30+
| | +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
31+
| | +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
32+
| | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
33+
| +- javax.inject:javax.inject:jar:1:compile
34+
| +- org.codehaus.plexus:plexus-utils:jar:3.2.1:compile
35+
| +- org.codehaus.plexus:plexus-classworlds:jar:2.6.0:compile
36+
| +- org.codehaus.plexus:plexus-component-annotations:jar:2.1.0:compile
37+
| \- org.apache.commons:commons-lang3:jar:3.8.1:compile
38+
\- org.slf4j:slf4j-simple:jar:2.0.13:test
39+
\- org.slf4j:slf4j-api:jar:2.0.13:compile

0 commit comments

Comments
 (0)