mirror of https://github.com/apache/maven.git
[MNG-6306] Replace use of Guava in maven-resolver-provider with a lighter weight alternative
This closes #138
This commit is contained in:
parent
909fb7c59b
commit
866582d296
|
@ -70,10 +70,6 @@ under the License.
|
|||
<groupId>javax.inject</groupId>
|
||||
<artifactId>javax.inject</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.inject</groupId>
|
||||
<artifactId>guice</artifactId>
|
||||
|
|
|
@ -23,11 +23,10 @@ import java.io.File;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterables;
|
||||
import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.model.Parent;
|
||||
import org.apache.maven.model.Repository;
|
||||
|
@ -145,14 +144,15 @@ class DefaultModelResolver
|
|||
|
||||
private static void removeMatchingRepository( Iterable<RemoteRepository> repositories, final String id )
|
||||
{
|
||||
Iterables.removeIf( repositories, new Predicate<RemoteRepository>()
|
||||
Iterator<RemoteRepository> iterator = repositories.iterator();
|
||||
while ( iterator.hasNext() )
|
||||
{
|
||||
@Override
|
||||
public boolean apply( RemoteRepository remoteRepository )
|
||||
RemoteRepository remoteRepository = iterator.next();
|
||||
if ( remoteRepository.getId().equals( id ) )
|
||||
{
|
||||
return remoteRepository.getId().equals( id );
|
||||
iterator.remove();
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue