You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2015/07/23 11:39:27 UTC

zest-qi4j git commit: ZEST-25 More predictable go-offline helpers in binary distribution

Repository: zest-qi4j
Updated Branches:
  refs/heads/develop f2aeede45 -> 26a169d8a


ZEST-25 More predictable go-offline helpers in binary distribution

They now respect dependency resolution/substitution strategies in place
in the Zest build.


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/26a169d8
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/26a169d8
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/26a169d8

Branch: refs/heads/develop
Commit: 26a169d8a74505ad64dd31cb92ff3838132756fc
Parents: f2aeede
Author: Paul Merlin <pa...@apache.org>
Authored: Thu Jul 23 11:39:01 2015 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Thu Jul 23 11:39:01 2015 +0200

----------------------------------------------------------------------
 build.gradle     | 20 +++++++++++---------
 libraries.gradle |  4 ++++
 2 files changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/26a169d8/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index eb89fc1..7da47d6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -610,14 +610,11 @@ task generateBinDistGoOfflineHelpers {
 
     def handledDeps = []
     releaseApprovedProjects.each { p ->
-      p.configurations.runtime.allDependencies.each { dep ->
-        def depCoords = "${dep.group}:${dep.name}:${dep.version}"
-        if( !dep.group.startsWith( 'org.qi4j' ) && !handledDeps.contains( depCoords ) ) {
-
-          goOfflineGradle += "  download '$depCoords'\n"
-
-          goOfflinePom += "    <dependency><groupId>${dep.group}</groupId><artifactId>${dep.name}</artifactId><version>${dep.version}</version></dependency>\n"
-
+      p.configurations.runtime.incoming.resolutionResult.allComponents.each { comp ->
+        def depCoords = "${comp.moduleVersion.group}:${comp.moduleVersion.name}:${comp.moduleVersion.version}"
+        if( !comp.moduleVersion.group.startsWith( 'org.qi4j' ) && !handledDeps.contains( depCoords ) ) {
+          goOfflineGradle += "  download( '$depCoords' ) { transitive = false }\n"
+          goOfflinePom += "    <dependency><groupId>${comp.moduleVersion.group}</groupId><artifactId>${comp.moduleVersion.name}</artifactId><version>${comp.moduleVersion.version}</version></dependency>\n"
           handledDeps << depCoords
         }
       }
@@ -646,7 +643,10 @@ task download( type: Copy ) {
       <execution>
         <id>go-offline-jars</id><phase>validate</phase>
         <goals><goal>copy-dependencies</goal></goals>
-        <configuration><outputDirectory>\${project.basedir}/dependencies</outputDirectory></configuration>
+        <configuration>
+          <outputDirectory>\${project.basedir}/dependencies</outputDirectory>
+          <excludeTransitive>true</excludeTransitive>
+        </configuration>
       </execution>
       <execution>
         <id>go-offline-sources</id><phase>validate</phase>
@@ -654,6 +654,7 @@ task download( type: Copy ) {
         <configuration>
           <classifier>sources</classifier><failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
           <outputDirectory>\${project.basedir}/dependencies</outputDirectory>
+          <excludeTransitive>true</excludeTransitive>
         </configuration>
       </execution>
       <execution>
@@ -662,6 +663,7 @@ task download( type: Copy ) {
         <configuration>
           <classifier>javadoc</classifier><failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
           <outputDirectory>\${project.basedir}/dependencies</outputDirectory>
+          <excludeTransitive>true</excludeTransitive>
         </configuration>
       </execution>
     </executions>

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/26a169d8/libraries.gradle
----------------------------------------------------------------------
diff --git a/libraries.gradle b/libraries.gradle
index 100213a..c02a901 100644
--- a/libraries.gradle
+++ b/libraries.gradle
@@ -269,6 +269,10 @@ allprojects {
         if( dep.requested.module == 'commons-sandbox-parent' && dep.requested.version == '3-SNAPSHOT') {
           dep.useTarget group: dep.requested.group, name: dep.requested.module, version: '3'
         }
+        // GSON 2.3 POM is invalid, use 2.3.1 instead .. see https://github.com/google/gson/issues/588
+        if( dep.requested.group == 'com.google.code.gson' && dep.requested.module == 'gson' && dep.requested.version == '2.3' ) {
+          dep.useTarget group: dep.requested.group, name: dep.requested.module, version: '2.3.1'
+        }
         // Findbugs Annotation is LGPL, use https://github.com/stephenc/findbugs-annotations which is
         // Apache 2 licensed instead
         if( dep.requested.group == 'net.sourceforge.findbugs' && dep.requested.module == 'annotations' ) {