Skip to content

Commit cda2ea3

Browse files
authored
Bump parent from 37 to 39 (#36)
1 parent 1835184 commit cda2ea3

23 files changed

+554
-766
lines changed

pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version='1.0' encoding='UTF-8'?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
Licensed to the Apache Software Foundation (ASF) under one
44
or more contributor license agreements. See the NOTICE file
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>org.apache.maven.shared</groupId>
2525
<artifactId>maven-shared-components</artifactId>
26-
<version>37</version>
26+
<version>39</version>
2727
<relativePath />
2828
</parent>
2929

@@ -33,11 +33,17 @@
3333
<name>Apache Maven Dependency Tree</name>
3434
<description>A tree-based API for resolution of Maven project dependencies</description>
3535

36+
<contributors>
37+
<contributor>
38+
<name>Tuomas Kiviaho</name>
39+
</contributor>
40+
</contributors>
41+
3642
<scm>
3743
<connection>scm:git:https://gitbox.apache.org/repos/asf/maven-dependency-tree.git</connection>
3844
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-dependency-tree.git</developerConnection>
39-
<url>https://github.com/apache/maven-dependency-tree/tree/${project.scm.tag}</url>
4045
<tag>HEAD</tag>
46+
<url>https://github.com/apache/maven-dependency-tree/tree/${project.scm.tag}</url>
4147
</scm>
4248
<issueManagement>
4349
<system>jira</system>
@@ -61,12 +67,6 @@
6167
<project.build.outputTimestamp>2022-11-16T01:25:26Z</project.build.outputTimestamp>
6268
</properties>
6369

64-
<contributors>
65-
<contributor>
66-
<name>Tuomas Kiviaho</name>
67-
</contributor>
68-
</contributors>
69-
7070
<dependencies>
7171
<dependency>
7272
<groupId>org.apache.maven</groupId>
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.apache.maven.shared.dependency.graph;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
97
* "License"); you may not use this file except in compliance
108
* with the License. You may obtain a copy of the License at
119
*
12-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* http://www.apache.org/licenses/LICENSE-2.0
1311
*
1412
* Unless required by applicable law or agreed to in writing,
1513
* software distributed under the License is distributed on an
@@ -18,33 +16,32 @@
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
19+
package org.apache.maven.shared.dependency.graph;
2120

2221
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
2322
import org.apache.maven.project.ProjectBuildingRequest;
2423

2524
/**
2625
* Maven project dependency raw dependency collector API, providing an abstraction layer against Maven 3 and Maven 3.1+
2726
* particular Aether implementations.
28-
*
27+
*
2928
* @author Gabriel Belingueres
3029
* @since 3.1.0
3130
*/
32-
public interface DependencyCollectorBuilder
33-
{
31+
public interface DependencyCollectorBuilder {
3432

3533
/**
3634
* collect the project's raw dependency graph, with information to allow the API client to reason on its own about
3735
* dependencies.
38-
*
36+
*
3937
* @param buildingRequest the request with the project to process its dependencies.
4038
* @param filter an artifact filter if not all dependencies are required (can be <code>null</code>)
4139
* @return the raw dependency tree
4240
* @throws DependencyCollectorBuilderException if some of the dependencies could not be collected.
4341
*/
44-
default DependencyNode collectDependencyGraph( ProjectBuildingRequest buildingRequest, ArtifactFilter filter )
45-
throws DependencyCollectorBuilderException
46-
{
47-
return collectDependencyGraph( new DependencyCollectorRequest( buildingRequest, filter ) );
42+
default DependencyNode collectDependencyGraph(ProjectBuildingRequest buildingRequest, ArtifactFilter filter)
43+
throws DependencyCollectorBuilderException {
44+
return collectDependencyGraph(new DependencyCollectorRequest(buildingRequest, filter));
4845
}
4946

5047
/**
@@ -56,7 +53,6 @@ default DependencyNode collectDependencyGraph( ProjectBuildingRequest buildingRe
5653
* @throws DependencyCollectorBuilderException if some of the dependencies could not be collected.
5754
* @since 3.2.1
5855
*/
59-
DependencyNode collectDependencyGraph( DependencyCollectorRequest dependencyCollectorRequest )
56+
DependencyNode collectDependencyGraph(DependencyCollectorRequest dependencyCollectorRequest)
6057
throws DependencyCollectorBuilderException;
61-
6258
}
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.apache.maven.shared.dependency.graph;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
97
* "License"); you may not use this file except in compliance
108
* with the License. You may obtain a copy of the License at
119
*
12-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* http://www.apache.org/licenses/LICENSE-2.0
1311
*
1412
* Unless required by applicable law or agreed to in writing,
1513
* software distributed under the License is distributed on an
@@ -18,18 +16,17 @@
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
19+
package org.apache.maven.shared.dependency.graph;
2120

2221
/**
2322
* Indicates an issue with the DependencyCollectorBuilder
24-
*
23+
*
2524
* @author Robert Scholte
2625
* @since 3.1.0
2726
*/
28-
public class DependencyCollectorBuilderException
29-
extends Exception
30-
{
27+
public class DependencyCollectorBuilderException extends Exception {
3128
/**
32-
*
29+
*
3330
*/
3431
private static final long serialVersionUID = 1305852327231950979L;
3532

@@ -38,17 +35,15 @@ public class DependencyCollectorBuilderException
3835
/**
3936
* @param message Message indicating why dependency graph could not be resolved.
4037
*/
41-
public DependencyCollectorBuilderException( String message )
42-
{
43-
super( message );
38+
public DependencyCollectorBuilderException(String message) {
39+
super(message);
4440
}
4541

4642
/**
4743
* @param message Message indicating why dependency graph could not be resolved.
4844
* @param cause Throwable indicating at which point the graph failed to be resolved.
4945
*/
50-
public DependencyCollectorBuilderException( String message, Throwable cause )
51-
{
52-
super( message, cause );
46+
public DependencyCollectorBuilderException(String message, Throwable cause) {
47+
super(message, cause);
5348
}
5449
}

src/main/java/org/apache/maven/shared/dependency/graph/DependencyCollectorRequest.java

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.apache.maven.shared.dependency.graph;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
97
* "License"); you may not use this file except in compliance
108
* with the License. You may obtain a copy of the License at
119
*
12-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* http://www.apache.org/licenses/LICENSE-2.0
1311
*
1412
* Unless required by applicable law or agreed to in writing,
1513
* software distributed under the License is distributed on an
@@ -18,6 +16,11 @@
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
19+
package org.apache.maven.shared.dependency.graph;
20+
21+
import java.util.HashMap;
22+
import java.util.Map;
23+
import java.util.Objects;
2124

2225
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
2326
import org.apache.maven.project.ProjectBuildingRequest;
@@ -35,10 +38,6 @@
3538
import org.eclipse.aether.util.graph.transformer.NearestVersionSelector;
3639
import org.eclipse.aether.util.graph.transformer.SimpleOptionalitySelector;
3740

38-
import java.util.HashMap;
39-
import java.util.Map;
40-
import java.util.Objects;
41-
4241
/**
4342
* <div>
4443
* This class will carry various options used by
@@ -77,8 +76,7 @@
7776
* </div>
7877
* @since 3.2.1
7978
*/
80-
public class DependencyCollectorRequest
81-
{
79+
public class DependencyCollectorRequest {
8280

8381
private final ProjectBuildingRequest buildingRequest;
8482

@@ -87,76 +85,65 @@ public class DependencyCollectorRequest
8785
private Map<String, Object> configProperties = new HashMap<>();
8886

8987
private DependencySelector dependencySelector = new AndDependencySelector(
90-
new DirectScopeDependencySelector( JavaScopes.TEST ),
91-
new DirectScopeDependencySelector( JavaScopes.PROVIDED ),
88+
new DirectScopeDependencySelector(JavaScopes.TEST),
89+
new DirectScopeDependencySelector(JavaScopes.PROVIDED),
9290
new OptionalDependencySelector(),
93-
new ExclusionDependencySelector() );
91+
new ExclusionDependencySelector());
9492

9593
private DependencyGraphTransformer dependencyGraphTransformer = new ConflictResolver(
9694
new NearestVersionSelector(),
9795
new VerboseJavaScopeSelector(),
9896
new SimpleOptionalitySelector(),
99-
new JavaScopeDeriver() );
97+
new JavaScopeDeriver());
10098

101-
public DependencyCollectorRequest( ProjectBuildingRequest buildingRequest )
102-
{
103-
this( buildingRequest, null );
99+
public DependencyCollectorRequest(ProjectBuildingRequest buildingRequest) {
100+
this(buildingRequest, null);
104101
}
105102

106-
public DependencyCollectorRequest( ProjectBuildingRequest buildingRequest, ArtifactFilter filter )
107-
{
108-
Objects.requireNonNull( buildingRequest, "ProjectBuildingRequest cannot be null" );
103+
public DependencyCollectorRequest(ProjectBuildingRequest buildingRequest, ArtifactFilter filter) {
104+
Objects.requireNonNull(buildingRequest, "ProjectBuildingRequest cannot be null");
109105
this.buildingRequest = buildingRequest;
110106
this.filter = filter;
111-
configProperties.put( ConflictResolver.CONFIG_PROP_VERBOSE, true );
112-
configProperties.put( DependencyManagerUtils.CONFIG_PROP_VERBOSE, true );
107+
configProperties.put(ConflictResolver.CONFIG_PROP_VERBOSE, true);
108+
configProperties.put(DependencyManagerUtils.CONFIG_PROP_VERBOSE, true);
113109
}
114110

115-
public ProjectBuildingRequest getBuildingRequest()
116-
{
111+
public ProjectBuildingRequest getBuildingRequest() {
117112
return buildingRequest;
118113
}
119114

120-
public ArtifactFilter getFilter()
121-
{
115+
public ArtifactFilter getFilter() {
122116
return filter;
123117
}
124118

125-
public DependencySelector getDependencySelector()
126-
{
119+
public DependencySelector getDependencySelector() {
127120
return dependencySelector;
128121
}
129122

130-
public DependencyCollectorRequest dependencySelector( DependencySelector dependencySelector )
131-
{
123+
public DependencyCollectorRequest dependencySelector(DependencySelector dependencySelector) {
132124
this.dependencySelector = dependencySelector;
133125
return this;
134126
}
135127

136-
public DependencyGraphTransformer getDependencyGraphTransformer()
137-
{
128+
public DependencyGraphTransformer getDependencyGraphTransformer() {
138129
return dependencyGraphTransformer;
139130
}
140131

141132
public DependencyCollectorRequest dependencyGraphTransformer(
142-
DependencyGraphTransformer dependencyGraphTransformer )
143-
{
133+
DependencyGraphTransformer dependencyGraphTransformer) {
144134
this.dependencyGraphTransformer = dependencyGraphTransformer;
145135
return this;
146136
}
147137

148-
public Map<String, Object> getConfigProperties()
149-
{
138+
public Map<String, Object> getConfigProperties() {
150139
return this.configProperties;
151140
}
152141

153-
public void addConfigProperty( String key, Object value )
154-
{
155-
this.configProperties.put( key, value );
142+
public void addConfigProperty(String key, Object value) {
143+
this.configProperties.put(key, value);
156144
}
157145

158-
public void removeConfigProperty( String key )
159-
{
160-
this.configProperties.remove( key );
146+
public void removeConfigProperty(String key) {
147+
this.configProperties.remove(key);
161148
}
162149
}
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
package org.apache.maven.shared.dependency.graph;
2-
31
/*
42
* Licensed to the Apache Software Foundation (ASF) under one
53
* or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
97
* "License"); you may not use this file except in compliance
108
* with the License. You may obtain a copy of the License at
119
*
12-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* http://www.apache.org/licenses/LICENSE-2.0
1311
*
1412
* Unless required by applicable law or agreed to in writing,
1513
* software distributed under the License is distributed on an
@@ -18,21 +16,21 @@
1816
* specific language governing permissions and limitations
1917
* under the License.
2018
*/
19+
package org.apache.maven.shared.dependency.graph;
20+
21+
import java.util.Collection;
2122

2223
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
2324
import org.apache.maven.project.MavenProject;
2425
import org.apache.maven.project.ProjectBuildingRequest;
2526

26-
import java.util.Collection;
27-
2827
/**
2928
* Maven project dependency graph builder API, neutral against Maven 2 or Maven 3.
3029
*
3130
* @author Hervé Boutemy
3231
* @since 2.0
3332
*/
34-
public interface DependencyGraphBuilder
35-
{
33+
public interface DependencyGraphBuilder {
3634
/**
3735
* Build the dependency graph.
3836
*
@@ -41,8 +39,8 @@ public interface DependencyGraphBuilder
4139
* @return the dependency graph
4240
* @throws DependencyGraphBuilderException if some of the dependencies could not be resolved.
4341
*/
44-
DependencyNode buildDependencyGraph( ProjectBuildingRequest buildingRequest, ArtifactFilter filter )
45-
throws DependencyGraphBuilderException;
42+
DependencyNode buildDependencyGraph(ProjectBuildingRequest buildingRequest, ArtifactFilter filter)
43+
throws DependencyGraphBuilderException;
4644

4745
/**
4846
*
@@ -54,10 +52,9 @@ DependencyNode buildDependencyGraph( ProjectBuildingRequest buildingRequest, Art
5452
* @deprecated Use {@link #buildDependencyGraph(ProjectBuildingRequest, ArtifactFilter)} instead
5553
*/
5654
@Deprecated
57-
default DependencyNode buildDependencyGraph( ProjectBuildingRequest buildingRequest, ArtifactFilter filter,
58-
Collection<MavenProject> reactorProjects )
59-
throws DependencyGraphBuilderException
60-
{
61-
return buildDependencyGraph( buildingRequest, filter );
55+
default DependencyNode buildDependencyGraph(
56+
ProjectBuildingRequest buildingRequest, ArtifactFilter filter, Collection<MavenProject> reactorProjects)
57+
throws DependencyGraphBuilderException {
58+
return buildDependencyGraph(buildingRequest, filter);
6259
}
6360
}

0 commit comments

Comments
 (0)