From b2dde94338c99c6c881ec50265d2555975210f29 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 25 Mar 2015 10:24:30 +0100 Subject: [PATCH] Port to Gradle 2.3 --- 0001-Port-to-Gradle-2.3.patch | 47 +++++++++++++++++++++++++++++++++++ xmvn.spec | 10 ++++++-- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 0001-Port-to-Gradle-2.3.patch diff --git a/0001-Port-to-Gradle-2.3.patch b/0001-Port-to-Gradle-2.3.patch new file mode 100644 index 0000000..7038b57 --- /dev/null +++ b/0001-Port-to-Gradle-2.3.patch @@ -0,0 +1,47 @@ +From bccb95235f4d177552820f752f20e44b4a00b91b Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Wed, 25 Mar 2015 10:23:13 +0100 +Subject: [PATCH] Port to Gradle 2.3 + +--- + .../java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java | 3 ++- + xmvn-parent/pom.xml | 2 +- + 2 files changed, 3 insertions(+), 2 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 af4d068..94a6119 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 +@@ -36,6 +36,7 @@ import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ModuleComponentRe + import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.DescriptorParseContext; + import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.GradlePomModuleDescriptorParser; + import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParser; ++import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionSelectorScheme; + import org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository; + import org.gradle.api.internal.component.ArtifactType; + import org.gradle.internal.component.external.model.DefaultMavenModuleResolveMetaData; +@@ -207,7 +208,7 @@ public class GradleResolver + Path fakePom = fakePom( pomPath, id ); + logger.debug( "Created fake POM: {}", fakePom ); + +- MetaDataParser parser = new GradlePomModuleDescriptorParser(); ++ MetaDataParser parser = new GradlePomModuleDescriptorParser( new DefaultVersionSelectorScheme() ); + MutableModuleComponentResolveMetaData metaData = parser.parseMetaData( this, fakePom.toFile() ); + + result.resolved( metaData ); +diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml +index 294d0ce..d971817 100644 +--- a/xmvn-parent/pom.xml ++++ b/xmvn-parent/pom.xml +@@ -79,7 +79,7 @@ + 1 + 2.4.0 + 1.47 +- 2.2.1 ++ 2.3 + 3.2.5 + 18.0 + 2.1.1 +-- +2.1.0 + diff --git a/xmvn.spec b/xmvn.spec index b95102f..579403c 100644 --- a/xmvn.spec +++ b/xmvn.spec @@ -4,7 +4,7 @@ Name: xmvn Version: 2.3.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Local Extensions for Apache Maven License: ASL 2.0 URL: http://mizdebsk.fedorapeople.org/xmvn @@ -12,6 +12,8 @@ BuildArch: noarch Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz +Patch0: 0001-Port-to-Gradle-2.3.patch + BuildRequires: maven >= 3.3 BuildRequires: maven-local BuildRequires: beust-jcommander @@ -27,7 +29,7 @@ BuildRequires: xmlunit BuildRequires: apache-ivy BuildRequires: sisu-mojos BuildRequires: junit -BuildRequires: gradle >= 2.2.1-2 +BuildRequires: gradle >= 2.3 Requires: maven >= 3.2.5-2 Requires: xmvn-api = %{version}-%{release} @@ -150,6 +152,7 @@ This package provides %{summary}. %prep %setup -q +%patch0 -p1 %mvn_package :xmvn __noinstall @@ -300,6 +303,9 @@ end %doc LICENSE NOTICE %changelog +* Wed Mar 25 2015 Mikolaj Izdebski - 2.3.2-4 +- Port to Gradle 2.3 + * Mon Mar 16 2015 Mikolaj Izdebski - 2.3.2-3 - Build with Maven 3.3.0