Port to Gradle 2.5-rc-1
This commit is contained in:
parent
7e97781475
commit
5aa82c8a53
@ -1,7 +1,7 @@
|
||||
From 299ce2028ebaaab177290b569498ce36104bf762 Mon Sep 17 00:00:00 2001
|
||||
From 47e01b8dc3b41ef1e56de14d15672aaab43364c9 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Mon, 11 May 2015 15:52:58 +0200
|
||||
Subject: [PATCH 1/2] Fix NPE in DefaultResolver
|
||||
Subject: [PATCH 1/3] Fix NPE in DefaultResolver
|
||||
|
||||
---
|
||||
.../main/java/org/fedoraproject/xmvn/resolver/impl/DefaultResolver.java | 2 +-
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 21eef845a4b7873946c71f1fd1880c5e4cad1111 Mon Sep 17 00:00:00 2001
|
||||
From 9d9057fb17aa05bcf7df5717b1594eb14cb201e0 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Mon, 11 May 2015 16:05:16 +0200
|
||||
Subject: [PATCH 2/2] Prevent slashes from sneaking into artifact filename
|
||||
Subject: [PATCH 2/3] Prevent slashes from sneaking into artifact filename
|
||||
|
||||
---
|
||||
.../org/fedoraproject/xmvn/resolver/impl/EffectivePomGenerator.java | 4 +++-
|
||||
|
93
0003-Port-to-Gradle-2.5-rc-1.patch
Normal file
93
0003-Port-to-Gradle-2.5-rc-1.patch
Normal file
@ -0,0 +1,93 @@
|
||||
From a6079e71c3913ff6f947dd80e6498832efb1f4d5 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Tue, 30 Jun 2015 20:10:18 +0200
|
||||
Subject: [PATCH 3/3] Port to Gradle 2.5-rc-1
|
||||
|
||||
---
|
||||
.../xmvn/connector/gradle/GradleResolver.java | 18 ++++++++++--------
|
||||
xmvn-parent/pom.xml | 2 +-
|
||||
2 files changed, 11 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
|
||||
index 5fa7996..6fe4340 100644
|
||||
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
|
||||
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
|
||||
@@ -37,6 +37,7 @@ import org.gradle.internal.component.external.model.DefaultModuleComponentArtifa
|
||||
import org.gradle.internal.component.external.model.ModuleComponentResolveMetaData;
|
||||
import org.gradle.internal.component.external.model.MutableModuleComponentResolveMetaData;
|
||||
import org.gradle.internal.component.model.ComponentArtifactMetaData;
|
||||
+import org.gradle.internal.component.model.ComponentOverrideMetadata;
|
||||
import org.gradle.internal.component.model.ComponentResolveMetaData;
|
||||
import org.gradle.internal.component.model.ComponentUsage;
|
||||
import org.gradle.internal.component.model.DefaultIvyArtifactName;
|
||||
@@ -184,7 +185,7 @@ public class GradleResolver
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void resolveComponentMetaData( DependencyMetaData dependency, ModuleComponentIdentifier id,
|
||||
+ public void resolveComponentMetaData( ModuleComponentIdentifier id, ComponentOverrideMetadata request,
|
||||
BuildableModuleComponentMetaDataResolveResult result )
|
||||
{
|
||||
logger.debug( "Trying to resolve model for {}:{}:{}", id.getGroup(), id.getModule(), id.getVersion() );
|
||||
@@ -206,7 +207,7 @@ public class GradleResolver
|
||||
else
|
||||
{
|
||||
logger.debug( "POM not found, trying non-POM artifacts" );
|
||||
- for ( IvyArtifactName artifact : getDependencyArtifactNames( dependency ) )
|
||||
+ for ( IvyArtifactName artifact : getDependencyArtifactNames( request ) )
|
||||
{
|
||||
String groupId = id.getGroup();
|
||||
String artifactId = artifact.getName();
|
||||
@@ -220,7 +221,8 @@ public class GradleResolver
|
||||
if ( path != null )
|
||||
{
|
||||
logger.debug( "Artifact {} found, returning minimal model", artifact3 );
|
||||
- MutableModuleComponentResolveMetaData metaData = new DefaultMavenModuleResolveMetaData( dependency );
|
||||
+ MutableModuleComponentResolveMetaData metaData =
|
||||
+ new DefaultMavenModuleResolveMetaData( id, request.getArtifacts() );
|
||||
result.resolved( metaData );
|
||||
return;
|
||||
}
|
||||
@@ -231,11 +233,11 @@ public class GradleResolver
|
||||
result.failed( new ModuleVersionResolveException( id, "XMvn was unable to resolve artifact " + artifact2 ) );
|
||||
}
|
||||
|
||||
- private Set<IvyArtifactName> getDependencyArtifactNames( DependencyMetaData dependency )
|
||||
+ private Set<IvyArtifactName> getDependencyArtifactNames( ComponentOverrideMetadata request )
|
||||
{
|
||||
- String moduleName = dependency.getRequested().getName();
|
||||
+ String moduleName = request.getClientModule().getName();
|
||||
Set<IvyArtifactName> artifactSet = new LinkedHashSet<>();
|
||||
- artifactSet.addAll( dependency.getArtifacts() );
|
||||
+ artifactSet.addAll( request.getArtifacts() );
|
||||
|
||||
if ( artifactSet.isEmpty() )
|
||||
{
|
||||
@@ -273,9 +275,9 @@ public class GradleResolver
|
||||
}
|
||||
|
||||
@Override
|
||||
- public LocallyAvailableExternalResource getMetaDataArtifact( ModuleVersionIdentifier id, ArtifactType type )
|
||||
+ public LocallyAvailableExternalResource getMetaDataArtifact( ModuleComponentIdentifier id, ArtifactType type )
|
||||
{
|
||||
- Path pomPath = resolve( new DefaultArtifact( id.getGroup(), id.getName(), "pom", id.getVersion() ) );
|
||||
+ Path pomPath = resolve( new DefaultArtifact( id.getGroup(), id.getModule(), "pom", id.getVersion() ) );
|
||||
|
||||
if ( pomPath == null )
|
||||
return null;
|
||||
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
|
||||
index 251d696..047665e 100644
|
||||
--- a/xmvn-parent/pom.xml
|
||||
+++ b/xmvn-parent/pom.xml
|
||||
@@ -79,7 +79,7 @@
|
||||
<atinjectVersion>1</atinjectVersion>
|
||||
<ivyVersion>2.4.0</ivyVersion>
|
||||
<jcommanderVersion>1.48</jcommanderVersion>
|
||||
- <gradleVersion>2.4-rc-1</gradleVersion>
|
||||
+ <gradleVersion>2.5-rc-1</gradleVersion>
|
||||
<guiceVersion>3.2.5</guiceVersion>
|
||||
<guavaVersion>18.0</guavaVersion>
|
||||
<mavenInvokerVersion>2.2</mavenInvokerVersion>
|
||||
--
|
||||
2.1.0
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Name: xmvn
|
||||
Version: 2.4.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Local Extensions for Apache Maven
|
||||
License: ASL 2.0
|
||||
URL: http://mizdebsk.fedorapeople.org/xmvn
|
||||
@ -14,6 +14,7 @@ Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar
|
||||
|
||||
Patch0: 0001-Fix-NPE-in-DefaultResolver.patch
|
||||
Patch1: 0002-Prevent-slashes-from-sneaking-into-artifact-filename.patch
|
||||
Patch2: 0003-Port-to-Gradle-2.5-rc-1.patch
|
||||
|
||||
BuildRequires: maven >= 3.3
|
||||
BuildRequires: maven-local
|
||||
@ -30,7 +31,7 @@ BuildRequires: xmlunit
|
||||
BuildRequires: apache-ivy
|
||||
BuildRequires: sisu-mojos
|
||||
BuildRequires: junit
|
||||
BuildRequires: gradle >= 2.4
|
||||
BuildRequires: gradle >= 2.5
|
||||
|
||||
Requires: maven >= 3.2.5-2
|
||||
Requires: xmvn-api = %{version}-%{release}
|
||||
@ -155,6 +156,7 @@ This package provides %{summary}.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%mvn_package ":xmvn{,-it}" __noinstall
|
||||
|
||||
@ -300,6 +302,9 @@ cp -P %{_datadir}/maven/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
* Tue Jun 30 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4.0-4
|
||||
- Port to Gradle 2.5-rc-1
|
||||
|
||||
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user