Skip to content

Bump parent from 37 to 39 #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
Expand All @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-components</artifactId>
<version>37</version>
<version>39</version>
<relativePath />
</parent>

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

<contributors>
<contributor>
<name>Tuomas Kiviaho</name>
</contributor>
</contributors>

<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/maven-dependency-tree.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-dependency-tree.git</developerConnection>
<url>https://github.com/apache/maven-dependency-tree/tree/${project.scm.tag}</url>
<tag>HEAD</tag>
<url>https://github.com/apache/maven-dependency-tree/tree/${project.scm.tag}</url>
</scm>
<issueManagement>
<system>jira</system>
Expand All @@ -61,12 +67,6 @@
<project.build.outputTimestamp>2022-11-16T01:25:26Z</project.build.outputTimestamp>
</properties>

<contributors>
<contributor>
<name>Tuomas Kiviaho</name>
</contributor>
</contributors>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.shared.dependency.graph;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -9,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
Expand All @@ -18,33 +16,32 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.shared.dependency.graph;

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

/**
* Maven project dependency raw dependency collector API, providing an abstraction layer against Maven 3 and Maven 3.1+
* particular Aether implementations.
*
*
* @author Gabriel Belingueres
* @since 3.1.0
*/
public interface DependencyCollectorBuilder
{
public interface DependencyCollectorBuilder {

/**
* collect the project's raw dependency graph, with information to allow the API client to reason on its own about
* dependencies.
*
*
* @param buildingRequest the request with the project to process its dependencies.
* @param filter an artifact filter if not all dependencies are required (can be <code>null</code>)
* @return the raw dependency tree
* @throws DependencyCollectorBuilderException if some of the dependencies could not be collected.
*/
default DependencyNode collectDependencyGraph( ProjectBuildingRequest buildingRequest, ArtifactFilter filter )
throws DependencyCollectorBuilderException
{
return collectDependencyGraph( new DependencyCollectorRequest( buildingRequest, filter ) );
default DependencyNode collectDependencyGraph(ProjectBuildingRequest buildingRequest, ArtifactFilter filter)
throws DependencyCollectorBuilderException {
return collectDependencyGraph(new DependencyCollectorRequest(buildingRequest, filter));
}

/**
Expand All @@ -56,7 +53,6 @@ default DependencyNode collectDependencyGraph( ProjectBuildingRequest buildingRe
* @throws DependencyCollectorBuilderException if some of the dependencies could not be collected.
* @since 3.2.1
*/
DependencyNode collectDependencyGraph( DependencyCollectorRequest dependencyCollectorRequest )
DependencyNode collectDependencyGraph(DependencyCollectorRequest dependencyCollectorRequest)
throws DependencyCollectorBuilderException;

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.shared.dependency.graph;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -9,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
Expand All @@ -18,18 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.shared.dependency.graph;

/**
* Indicates an issue with the DependencyCollectorBuilder
*
*
* @author Robert Scholte
* @since 3.1.0
*/
public class DependencyCollectorBuilderException
extends Exception
{
public class DependencyCollectorBuilderException extends Exception {
/**
*
*
*/
private static final long serialVersionUID = 1305852327231950979L;

Expand All @@ -38,17 +35,15 @@ public class DependencyCollectorBuilderException
/**
* @param message Message indicating why dependency graph could not be resolved.
*/
public DependencyCollectorBuilderException( String message )
{
super( message );
public DependencyCollectorBuilderException(String message) {
super(message);
}

/**
* @param message Message indicating why dependency graph could not be resolved.
* @param cause Throwable indicating at which point the graph failed to be resolved.
*/
public DependencyCollectorBuilderException( String message, Throwable cause )
{
super( message, cause );
public DependencyCollectorBuilderException(String message, Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.shared.dependency.graph;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -9,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
Expand All @@ -18,6 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.shared.dependency.graph;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.project.ProjectBuildingRequest;
Expand All @@ -35,10 +38,6 @@
import org.eclipse.aether.util.graph.transformer.NearestVersionSelector;
import org.eclipse.aether.util.graph.transformer.SimpleOptionalitySelector;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* <div>
* This class will carry various options used by
Expand Down Expand Up @@ -77,8 +76,7 @@
* </div>
* @since 3.2.1
*/
public class DependencyCollectorRequest
{
public class DependencyCollectorRequest {

private final ProjectBuildingRequest buildingRequest;

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

private DependencySelector dependencySelector = new AndDependencySelector(
new DirectScopeDependencySelector( JavaScopes.TEST ),
new DirectScopeDependencySelector( JavaScopes.PROVIDED ),
new DirectScopeDependencySelector(JavaScopes.TEST),
new DirectScopeDependencySelector(JavaScopes.PROVIDED),
new OptionalDependencySelector(),
new ExclusionDependencySelector() );
new ExclusionDependencySelector());

private DependencyGraphTransformer dependencyGraphTransformer = new ConflictResolver(
new NearestVersionSelector(),
new VerboseJavaScopeSelector(),
new SimpleOptionalitySelector(),
new JavaScopeDeriver() );
new JavaScopeDeriver());

public DependencyCollectorRequest( ProjectBuildingRequest buildingRequest )
{
this( buildingRequest, null );
public DependencyCollectorRequest(ProjectBuildingRequest buildingRequest) {
this(buildingRequest, null);
}

public DependencyCollectorRequest( ProjectBuildingRequest buildingRequest, ArtifactFilter filter )
{
Objects.requireNonNull( buildingRequest, "ProjectBuildingRequest cannot be null" );
public DependencyCollectorRequest(ProjectBuildingRequest buildingRequest, ArtifactFilter filter) {
Objects.requireNonNull(buildingRequest, "ProjectBuildingRequest cannot be null");
this.buildingRequest = buildingRequest;
this.filter = filter;
configProperties.put( ConflictResolver.CONFIG_PROP_VERBOSE, true );
configProperties.put( DependencyManagerUtils.CONFIG_PROP_VERBOSE, true );
configProperties.put(ConflictResolver.CONFIG_PROP_VERBOSE, true);
configProperties.put(DependencyManagerUtils.CONFIG_PROP_VERBOSE, true);
}

public ProjectBuildingRequest getBuildingRequest()
{
public ProjectBuildingRequest getBuildingRequest() {
return buildingRequest;
}

public ArtifactFilter getFilter()
{
public ArtifactFilter getFilter() {
return filter;
}

public DependencySelector getDependencySelector()
{
public DependencySelector getDependencySelector() {
return dependencySelector;
}

public DependencyCollectorRequest dependencySelector( DependencySelector dependencySelector )
{
public DependencyCollectorRequest dependencySelector(DependencySelector dependencySelector) {
this.dependencySelector = dependencySelector;
return this;
}

public DependencyGraphTransformer getDependencyGraphTransformer()
{
public DependencyGraphTransformer getDependencyGraphTransformer() {
return dependencyGraphTransformer;
}

public DependencyCollectorRequest dependencyGraphTransformer(
DependencyGraphTransformer dependencyGraphTransformer )
{
DependencyGraphTransformer dependencyGraphTransformer) {
this.dependencyGraphTransformer = dependencyGraphTransformer;
return this;
}

public Map<String, Object> getConfigProperties()
{
public Map<String, Object> getConfigProperties() {
return this.configProperties;
}

public void addConfigProperty( String key, Object value )
{
this.configProperties.put( key, value );
public void addConfigProperty(String key, Object value) {
this.configProperties.put(key, value);
}

public void removeConfigProperty( String key )
{
this.configProperties.remove( key );
public void removeConfigProperty(String key) {
this.configProperties.remove(key);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.shared.dependency.graph;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -9,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
Expand All @@ -18,21 +16,21 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.shared.dependency.graph;

import java.util.Collection;

import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingRequest;

import java.util.Collection;

/**
* Maven project dependency graph builder API, neutral against Maven 2 or Maven 3.
*
* @author Hervé Boutemy
* @since 2.0
*/
public interface DependencyGraphBuilder
{
public interface DependencyGraphBuilder {
/**
* Build the dependency graph.
*
Expand All @@ -41,8 +39,8 @@ public interface DependencyGraphBuilder
* @return the dependency graph
* @throws DependencyGraphBuilderException if some of the dependencies could not be resolved.
*/
DependencyNode buildDependencyGraph( ProjectBuildingRequest buildingRequest, ArtifactFilter filter )
throws DependencyGraphBuilderException;
DependencyNode buildDependencyGraph(ProjectBuildingRequest buildingRequest, ArtifactFilter filter)
throws DependencyGraphBuilderException;

/**
*
Expand All @@ -54,10 +52,9 @@ DependencyNode buildDependencyGraph( ProjectBuildingRequest buildingRequest, Art
* @deprecated Use {@link #buildDependencyGraph(ProjectBuildingRequest, ArtifactFilter)} instead
*/
@Deprecated
default DependencyNode buildDependencyGraph( ProjectBuildingRequest buildingRequest, ArtifactFilter filter,
Collection<MavenProject> reactorProjects )
throws DependencyGraphBuilderException
{
return buildDependencyGraph( buildingRequest, filter );
default DependencyNode buildDependencyGraph(
ProjectBuildingRequest buildingRequest, ArtifactFilter filter, Collection<MavenProject> reactorProjects)
throws DependencyGraphBuilderException {
return buildDependencyGraph(buildingRequest, filter);
}
}
Loading