Skip to content

Commit c2cfe75

Browse files
authored
[MRESOLVER-669] Clean up (#51)
Changes: * clean up hamcrest deps * drop use of commons-lang (was never dep, upstream dropped it) * align resolver with maven 3.9.9 * reformat --- https://issues.apache.org/jira/browse/MRESOLVER-669
1 parent daae339 commit c2cfe75

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

.mvn/placeholder.txt

Whitespace-only changes.

pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</distributionManagement>
5858

5959
<properties>
60-
<mavenVersion>3.9.6</mavenVersion>
60+
<mavenVersion>3.9.9</mavenVersion>
6161
<resolverVersion>1.9.22</resolverVersion>
6262
<antVersion>1.10.15</antVersion>
6363
<javaVersion>8</javaVersion>
@@ -213,6 +213,12 @@
213213
<artifactId>junit</artifactId>
214214
<version>${junitVersion}</version>
215215
<scope>test</scope>
216+
<exclusions>
217+
<exclusion>
218+
<groupId>org.hamcrest</groupId>
219+
<artifactId>hamcrest-core</artifactId>
220+
</exclusion>
221+
</exclusions>
216222
</dependency>
217223
<dependency>
218224
<groupId>org.apache.ant</groupId>
@@ -228,13 +234,7 @@
228234
</dependency>
229235
<dependency>
230236
<groupId>org.hamcrest</groupId>
231-
<artifactId>hamcrest-library</artifactId>
232-
<version>${hamcrestVersion}</version>
233-
<scope>test</scope>
234-
</dependency>
235-
<dependency>
236-
<groupId>org.hamcrest</groupId>
237-
<artifactId>hamcrest-core</artifactId>
237+
<artifactId>hamcrest</artifactId>
238238
<version>${hamcrestVersion}</version>
239239
<scope>test</scope>
240240
</dependency>

src/main/java/org/apache/maven/resolver/internal/ant/ConverterUtils.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.Map;
2727
import java.util.Properties;
2828

29-
import org.apache.commons.lang3.ObjectUtils;
3029
import org.apache.maven.resolver.internal.ant.types.Authentication;
3130
import org.apache.maven.resolver.internal.ant.types.Dependency;
3231
import org.apache.maven.resolver.internal.ant.types.Exclusion;
@@ -86,13 +85,13 @@ public static org.eclipse.aether.graph.Dependency toDependency(
8685
String scope = dependency.getScope();
8786
return new org.eclipse.aether.graph.Dependency(
8887
toArtifact(dependency, session.getArtifactTypeRegistry()),
89-
ObjectUtils.isEmpty(scope) ? "compile" : scope,
88+
scope == null || scope.trim().isEmpty() ? "compile" : scope,
9089
false,
9190
toExclusions(dependency.getExclusions(), exclusions));
9291
}
9392

9493
public static org.eclipse.aether.graph.Dependency toManagedDependency(
95-
Dependency dependency, List<Exclusion> exclusions, RepositorySystemSession session) {
94+
Dependency dependency, List<Exclusion> exclusions, RepositorySystemSession session) {
9695
return new org.eclipse.aether.graph.Dependency(
9796
toArtifact(dependency, session.getArtifactTypeRegistry()),
9897
dependency.getScope(),

0 commit comments

Comments
 (0)