update to version 1.4.1
This commit is contained in:
parent
032d851327
commit
3127115011
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,5 +1,9 @@
|
||||
/results_*
|
||||
/*.src.rpm
|
||||
|
||||
/maven-resolver-1.0.3-source-release.zip
|
||||
/maven-resolver-1.1.0-source-release.zip
|
||||
/maven-resolver-1.1.1-source-release.zip
|
||||
/maven-resolver-1.3.1-source-release.zip
|
||||
/maven-resolver-1.3.3-source-release.zip
|
||||
/maven-resolver-1.4.1-source-release.zip
|
||||
|
147
00-keep-deprecated-aether-CacheUtils.patch
Normal file
147
00-keep-deprecated-aether-CacheUtils.patch
Normal file
@ -0,0 +1,147 @@
|
||||
diff --git a/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/CacheUtils.java b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/CacheUtils.java
|
||||
new file mode 100644
|
||||
index 0000000..d7e8f01
|
||||
--- /dev/null
|
||||
+++ b/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/CacheUtils.java
|
||||
@@ -0,0 +1,141 @@
|
||||
+package org.eclipse.aether.internal.impl;
|
||||
+
|
||||
+/*
|
||||
+ * Licensed to the Apache Software Foundation (ASF) under one
|
||||
+ * or more contributor license agreements. See the NOTICE file
|
||||
+ * distributed with this work for additional information
|
||||
+ * regarding copyright ownership. The ASF licenses this file
|
||||
+ * to you under the Apache License, Version 2.0 (the
|
||||
+ * "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
|
||||
+ *
|
||||
+ * Unless required by applicable law or agreed to in writing,
|
||||
+ * software distributed under the License is distributed on an
|
||||
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
+ * KIND, either express or implied. See the License for the
|
||||
+ * specific language governing permissions and limitations
|
||||
+ * under the License.
|
||||
+ */
|
||||
+
|
||||
+import java.util.Iterator;
|
||||
+import java.util.List;
|
||||
+
|
||||
+import org.eclipse.aether.RepositorySystemSession;
|
||||
+import org.eclipse.aether.repository.ArtifactRepository;
|
||||
+import org.eclipse.aether.repository.LocalRepository;
|
||||
+import org.eclipse.aether.repository.RemoteRepository;
|
||||
+import org.eclipse.aether.repository.RepositoryPolicy;
|
||||
+import org.eclipse.aether.repository.WorkspaceReader;
|
||||
+import org.eclipse.aether.repository.WorkspaceRepository;
|
||||
+
|
||||
+/**
|
||||
+ * @deprecated To be deleted without replacement.
|
||||
+ */
|
||||
+@Deprecated
|
||||
+public final class CacheUtils
|
||||
+{
|
||||
+
|
||||
+ public static <T> boolean eq( T s1, T s2 )
|
||||
+ {
|
||||
+ return s1 != null ? s1.equals( s2 ) : s2 == null;
|
||||
+ }
|
||||
+
|
||||
+ public static int hash( Object obj )
|
||||
+ {
|
||||
+ return obj != null ? obj.hashCode() : 0;
|
||||
+ }
|
||||
+
|
||||
+ public static int repositoriesHashCode( List<RemoteRepository> repositories )
|
||||
+ {
|
||||
+ int result = 17;
|
||||
+ for ( RemoteRepository repository : repositories )
|
||||
+ {
|
||||
+ result = 31 * result + repositoryHashCode( repository );
|
||||
+ }
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ private static int repositoryHashCode( RemoteRepository repository )
|
||||
+ {
|
||||
+ int result = 17;
|
||||
+ result = 31 * result + hash( repository.getUrl() );
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ private static boolean repositoryEquals( RemoteRepository r1, RemoteRepository r2 )
|
||||
+ {
|
||||
+ if ( r1 == r2 )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return eq( r1.getId(), r2.getId() ) && eq( r1.getUrl(), r2.getUrl() )
|
||||
+ && policyEquals( r1.getPolicy( false ), r2.getPolicy( false ) )
|
||||
+ && policyEquals( r1.getPolicy( true ), r2.getPolicy( true ) );
|
||||
+ }
|
||||
+
|
||||
+ private static boolean policyEquals( RepositoryPolicy p1, RepositoryPolicy p2 )
|
||||
+ {
|
||||
+ if ( p1 == p2 )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ // update policy doesn't affect contents
|
||||
+ return p1.isEnabled() == p2.isEnabled() && eq( p1.getChecksumPolicy(), p2.getChecksumPolicy() );
|
||||
+ }
|
||||
+
|
||||
+ public static boolean repositoriesEquals( List<RemoteRepository> r1, List<RemoteRepository> r2 )
|
||||
+ {
|
||||
+ if ( r1.size() != r2.size() )
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ for ( Iterator<RemoteRepository> it1 = r1.iterator(), it2 = r2.iterator(); it1.hasNext(); )
|
||||
+ {
|
||||
+ if ( !repositoryEquals( it1.next(), it2.next() ) )
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public static WorkspaceRepository getWorkspace( RepositorySystemSession session )
|
||||
+ {
|
||||
+ WorkspaceReader reader = session.getWorkspaceReader();
|
||||
+ return ( reader != null ) ? reader.getRepository() : null;
|
||||
+ }
|
||||
+
|
||||
+ public static ArtifactRepository getRepository( RepositorySystemSession session,
|
||||
+ List<RemoteRepository> repositories, Class<?> repoClass,
|
||||
+ String repoId )
|
||||
+ {
|
||||
+ if ( repoClass != null )
|
||||
+ {
|
||||
+ if ( WorkspaceRepository.class.isAssignableFrom( repoClass ) )
|
||||
+ {
|
||||
+ return session.getWorkspaceReader().getRepository();
|
||||
+ }
|
||||
+ else if ( LocalRepository.class.isAssignableFrom( repoClass ) )
|
||||
+ {
|
||||
+ return session.getLocalRepository();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ for ( RemoteRepository repository : repositories )
|
||||
+ {
|
||||
+ if ( repoId.equals( repository.getId() ) )
|
||||
+ {
|
||||
+ return repository;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+}
|
@ -1,11 +1,16 @@
|
||||
Name: maven-resolver
|
||||
Epoch: 1
|
||||
Version: 1.3.3
|
||||
Release: 2%{?dist}
|
||||
Version: 1.4.1
|
||||
Release: 1%{?dist}
|
||||
License: ASL 2.0
|
||||
Summary: Apache Maven Artifact Resolver library
|
||||
URL: http://maven.apache.org/resolver/
|
||||
Source0: http://archive.apache.org/dist/maven/resolver/%{name}-%{version}-source-release.zip
|
||||
|
||||
# keep deprecated and removed aether CacheUtils for a while longer
|
||||
# some packages still depend on this and things break without it
|
||||
Patch0: 00-keep-deprecated-aether-CacheUtils.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: maven-local
|
||||
@ -104,6 +109,7 @@ This package provides %{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
# tests require jetty 7
|
||||
%pom_remove_dep :::test maven-resolver-transport-http
|
||||
@ -166,6 +172,9 @@ done
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
* Sun Nov 03 2019 Fabio Valentini <decathorpe@gmail.com> - 1:1.4.1-1
|
||||
- Update to version 1.4.1.
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (maven-resolver-1.3.3-source-release.zip) = d87a5257edf0feef813bd48d14c1bce3f64efbbed8d05df1e38d3cc9ca195f73932ac06751465c329bd1f22708d9743d9f34811ebe720266e090ca586ff8a3d3
|
||||
SHA512 (maven-resolver-1.4.1-source-release.zip) = e90430f551513603b40de8401fec66998959c5e1744ccd1241228dec062334f51eb4395ef2c0afd9550d092017bf5431cc69985e8c410bd7e1d46c77fb50ffb0
|
||||
|
Loading…
Reference in New Issue
Block a user