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/06/24 16:43:50 UTC

[1/5] zest-qi4j git commit: Minor: fix some javadoc warnings

Repository: zest-qi4j
Updated Branches:
  refs/heads/develop 5e2b13934 -> ac7d88a72


Minor: fix some javadoc warnings


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

Branch: refs/heads/develop
Commit: cb10393a3c2129b1f6904a7ada66a4b8b146408a
Parents: 5e2b139
Author: Paul Merlin <pa...@nosphere.org>
Authored: Wed Jun 24 16:37:17 2015 +0200
Committer: Paul Merlin <pa...@nosphere.org>
Committed: Wed Jun 24 16:37:17 2015 +0200

----------------------------------------------------------------------
 .../java/org/qi4j/spi/value/ValueSerializerAdapter.java     | 2 +-
 .../src/main/java/org/qi4j/entitystore/leveldb/package.html | 2 +-
 .../org/qi4j/library/rest/server/api/ContextResource.java   | 9 ++++++---
 .../src/main/java/org/qi4j/library/servlet/package.html     | 4 ++--
 4 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/cb10393a/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java b/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java
index 3625a21..1a12a8a 100644
--- a/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java
+++ b/core/spi/src/main/java/org/qi4j/spi/value/ValueSerializerAdapter.java
@@ -73,7 +73,7 @@ import static org.qi4j.functional.Iterables.first;
  * Some other Plain values are transformed before being handed to implementations:
  * </p>
  * <ul>
- * <li>BigInteger and BigDecimal depends on ValueSerializer.{@link Options};</li>
+ * <li>BigInteger and BigDecimal depends on ValueSerializer.{@link org.qi4j.api.value.ValueSerializer.Options};</li>
  * <li>Date as a ISO-8601 UTC String;</li>
  * <li>DateTime (JodaTime) as a ISO-8601 String with timezone offset or Z for UTC;</li>
  * <li>LocalDateTime (JodaTime) as a ISO-8601 String with no timezone offset;</li>

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/cb10393a/extensions/entitystore-leveldb/src/main/java/org/qi4j/entitystore/leveldb/package.html
----------------------------------------------------------------------
diff --git a/extensions/entitystore-leveldb/src/main/java/org/qi4j/entitystore/leveldb/package.html b/extensions/entitystore-leveldb/src/main/java/org/qi4j/entitystore/leveldb/package.html
index 3e56136..720a3ff 100644
--- a/extensions/entitystore-leveldb/src/main/java/org/qi4j/entitystore/leveldb/package.html
+++ b/extensions/entitystore-leveldb/src/main/java/org/qi4j/entitystore/leveldb/package.html
@@ -24,7 +24,7 @@ limitations under the License.
         <p>
             By default use the native implementation through JNI bindings and fallback to the pure java implementation
             if not available on the current platform. Used implementation can be forced using the
-            {@link LevelDBEntityStoreConfiguration#flavour()} property.
+            {@link org.qi4j.entitystore.leveldb.LevelDBEntityStoreConfiguration#flavour()} property.
         </p>
         <p>See:</p>
         <ul>

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/cb10393a/libraries/rest-server/src/main/java/org/qi4j/library/rest/server/api/ContextResource.java
----------------------------------------------------------------------
diff --git a/libraries/rest-server/src/main/java/org/qi4j/library/rest/server/api/ContextResource.java b/libraries/rest-server/src/main/java/org/qi4j/library/rest/server/api/ContextResource.java
index 054b8ab..b7191d2 100644
--- a/libraries/rest-server/src/main/java/org/qi4j/library/rest/server/api/ContextResource.java
+++ b/libraries/rest-server/src/main/java/org/qi4j/library/rest/server/api/ContextResource.java
@@ -449,14 +449,17 @@ public class ContextResource
 
     /**
      * Transform a Java name to a human readable string by replacing uppercase characters
-     * with space+toLowerCase(char)
+     * with space+toLowerCase(char).
+     * <p>
      * Example:
+     * <pre><code>
      * changeDescription -> Change description
      * doStuffNow -> Do stuff now
+     * </code></pre>
      *
-     * @param name
+     * @param name Java name
      *
-     * @return
+     * @return Human readable name
      */
     private String humanReadable( String name )
     {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/cb10393a/libraries/servlet/src/main/java/org/qi4j/library/servlet/package.html
----------------------------------------------------------------------
diff --git a/libraries/servlet/src/main/java/org/qi4j/library/servlet/package.html b/libraries/servlet/src/main/java/org/qi4j/library/servlet/package.html
index ed87ada..dfc553b 100644
--- a/libraries/servlet/src/main/java/org/qi4j/library/servlet/package.html
+++ b/libraries/servlet/src/main/java/org/qi4j/library/servlet/package.html
@@ -33,8 +33,8 @@ limitations under the License.
             {@link org.qi4j.api.structure.Application} activation/passivation to your webapp lifecycle.
         </p>
         <p>
-            Use {@link Qi4jServletSupport#application(javax.servlet.ServletContext)} to get a handle on the
-            {@link org.qi4j.api.structure.Application} from the {@link javax.servlet.ServletContext}.
+            Use {@link org.qi4j.library.servlet.Qi4jServletSupport#application(javax.servlet.ServletContext)} to get
+            a handle on the {@link org.qi4j.api.structure.Application} from the {@link javax.servlet.ServletContext}.
         </p>
 
         <h3>Facilities</h3>


[2/5] zest-qi4j git commit: Build, minor: rename task `gooffline` to `goOffline` task

Posted by pa...@apache.org.
Build, minor: rename task `gooffline` to `goOffline` task


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

Branch: refs/heads/develop
Commit: 7a0b4b9dde9c5588c9ef2fe9963cfb2037ab1532
Parents: cb10393
Author: Paul Merlin <pa...@nosphere.org>
Authored: Wed Jun 24 16:39:45 2015 +0200
Committer: Paul Merlin <pa...@nosphere.org>
Committed: Wed Jun 24 16:39:45 2015 +0200

----------------------------------------------------------------------
 build.gradle                                     | 4 ++--
 manual/src/docs/tutorials/howto-build-system.txt | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/7a0b4b9d/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index b7110a0..501171a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -396,8 +396,8 @@ allprojects {
 } // allprojects END -------------------------------------------------------
 
 // Allow easy download of all dependencies to go offline
-// ./gradlew gooffline
-task gooffline {
+// ./gradlew goOffline
+task goOffline {
   doLast {
     allprojects.configurations.flatten()*.resolvedConfiguration
   }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/7a0b4b9d/manual/src/docs/tutorials/howto-build-system.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/tutorials/howto-build-system.txt b/manual/src/docs/tutorials/howto-build-system.txt
index 5d036a9..cf6b7ea 100644
--- a/manual/src/docs/tutorials/howto-build-system.txt
+++ b/manual/src/docs/tutorials/howto-build-system.txt
@@ -55,7 +55,7 @@ A quick way to check that nothing broke.
 
 Here are some of theses global tasks we defined:
 
-gooffline::
+goOffline::
 +
 --
 Resolve, download and cache all needed dependencies.


[4/5] zest-qi4j git commit: ZEST-25 & ZEST-15 Introduce NOTICE & README for binary distribution

Posted by pa...@apache.org.
ZEST-25 & ZEST-15 Introduce NOTICE & README for binary distribution


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

Branch: refs/heads/develop
Commit: 18467753b622a68cd3147fc3fa5537afacf9c067
Parents: 02f8971
Author: Paul Merlin <pa...@nosphere.org>
Authored: Wed Jun 24 16:42:20 2015 +0200
Committer: Paul Merlin <pa...@nosphere.org>
Committed: Wed Jun 24 16:42:20 2015 +0200

----------------------------------------------------------------------
 src/bin-dist/NOTICE.txt |  5 +++++
 src/bin-dist/README.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/18467753/src/bin-dist/NOTICE.txt
----------------------------------------------------------------------
diff --git a/src/bin-dist/NOTICE.txt b/src/bin-dist/NOTICE.txt
new file mode 100644
index 0000000..7a0eb20
--- /dev/null
+++ b/src/bin-dist/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache Zest Qi4j SDK Binary Distribution
+Copyright 2015 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/18467753/src/bin-dist/README.txt
----------------------------------------------------------------------
diff --git a/src/bin-dist/README.txt b/src/bin-dist/README.txt
new file mode 100644
index 0000000..259f7ee
--- /dev/null
+++ b/src/bin-dist/README.txt
@@ -0,0 +1,50 @@
+
+Welcome to the world of Apache Zest Qi4j
+   - Composite Oriented Programming on the Java platform.
+
+
+This Apache Zest Qi4j Binary Distribution contains everything you need to
+create Qi4j applications.
+
+
+Qi4j started in 2007, and is still in heavy development under the umbrella of
+the Apache Zest project at the Apache Software Foundation. We would like
+developers around the world to participate in the advancement of this
+cool, new and challenging technology. We are especially interested in
+people willing to help improve the SDK, samples, tutorials, documentation
+and other supporting material.
+
+Please see https://zest.apache.org for more information.
+
+
+Licensing
+---------
+All Apache Zest Qi4j code is licensed under an Apache License.
+
+Third-Party Dependencies may be licensed under other terms. The only
+required dependencies are SLF4J (MIT Licence), ASM (BSD Licence) and
+Joda-Time (Apache Licence).
+
+Finally, Qi4j TestSupport depends on JUnit 4.x and its dependencies, which
+is also not included in the SDK itself, as it is present among most Java
+developers.
+
+
+Dependencies not included
+-------------------------
+The binary distributions contains Qi4j artifacts only to keep the download
+size small. Each Qi4j artifact comes with a file prefixed ..-runtime-deps.txt
+that contains the list of its dependencies. Moreover, at the binary
+distribution's root, you'll find both Maven (go-offline.pom) and Gradle
+(go-offline.gradle) build files whoses sole purpose is to easily download all
+needed dependencies jars. Instructions are given into theses files.
+
+If you prefer to use a dependency management system, go to:
+https://zest.apache.org/qi4j/latest/howto-depend-on-qi4j.html
+
+
+Thank you for trying out Apache Zest Qi4j and Composite Oriented Programming.
+
+
+-- Apache Zest Qi4j Team
+


[3/5] zest-qi4j git commit: ZEST-25 README.txt Zest! and tailored for source release distribution

Posted by pa...@apache.org.
ZEST-25 README.txt Zest! and tailored for source release distribution


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

Branch: refs/heads/develop
Commit: 02f89716e35c470160b327f3f2256acb690ce43f
Parents: 7a0b4b9
Author: Paul Merlin <pa...@nosphere.org>
Authored: Wed Jun 24 16:41:31 2015 +0200
Committer: Paul Merlin <pa...@nosphere.org>
Committed: Wed Jun 24 16:41:31 2015 +0200

----------------------------------------------------------------------
 README.txt | 40 ++++++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/02f89716/README.txt
----------------------------------------------------------------------
diff --git a/README.txt b/README.txt
index 636970e..24711c6 100644
--- a/README.txt
+++ b/README.txt
@@ -1,18 +1,20 @@
 
-Welcome to the world of Qi4j
+Welcome to the world of Apache Zest Qi4j
    - Composite Oriented Programming on the Java platform.
 
 
-This Qi4j SDK contains everything you need to create Qi4j applications.
+This Apache Zest Qi4j Source Distribution contains everything you need to
+create Qi4j applications.
 
 
-Qi4j started in 2007, and is still in heavy development. We would like
+Qi4j started in 2007, and is still in heavy development under the umbrella of
+the Apache Zest project at the Apache Software Foundation. We would like
 developers around the world to participate in the advancement of this
 cool, new and challenging technology. We are especially interested in
 people willing to help improve the SDK, samples, tutorials, documentation
 and other supporting material.
 
-Please see http://qi4j.org for more information.
+Please see https://zest.apache.org for more information.
 
 
 Licensing
@@ -23,31 +25,33 @@ Third-Party Dependencies may be licensed under other terms. The only
 required dependencies are SLF4J (MIT Licence), ASM (BSD Licence) and
 Joda-Time (Apache Licence).
 
+Finally, Qi4j TestSupport depends on JUnit 4.x and its dependencies, which
+is also not included in the SDK itself, as it is present among most Java
+developers.
+
 
 Dependencies not included
 -------------------------
-The source distributions contains Qi4j sources only to keep the download
+The source distribution contains Qi4j sources only to keep the download
 size small. The Gradle build automatically downloads needed dependencies.
 If you need to go offline type `./gradlew gooffline` to ensure all needed
 dependencies are cached by Gradle.
 
-The binary distributions contains Qi4j artifacts only to keep the download
-size small. Each Qi4j artifact comes with a file prefixed ..-runtime-deps.txt
-that contains the list of its dependencies. Moreover, at the SDK root you'll
-find a Metalink file named qi4j-sdk-runtime-deps.metalink that you can use to
-download all needed dependencies jars. Metalink files can be downloaded using
-curl, aria2 and a lot of other download tools. Support in wget is coming.
+If you prefer to use a dependency management system, go to:
+https://zest.apache.org/qi4j/latest/howto-depend-on-qi4j.html
 
-Finally, Qi4j TestSupport depends on JUnit 4.x and its dependencies, which
-is also not included in the SDK itself, as it is present among most Java
-developers.
 
-If you prefer to use a dependency management system, go to:
-http://qi4j.org/latest/howto-depend-on-qi4j.html
+Building Apache Zest Qi4j
+-------------------------
+To build Qi4j from sources you only need to have a valid Java JDK >= 7
+installation.
+
+This document the Qi4j build system and its usage:
+https://zest.apache.org/qi4j/latest/build-system.html
 
 
-Thank you for trying out Qi4j and Composite Oriented Programming.
+Thank you for trying out Apache Zest Qi4j and Composite Oriented Programming.
 
 
--- Qi4j Core Dev Team
+-- Apache Zest Qi4j Team
 


[5/5] zest-qi4j git commit: ZEST-25 Better binary distribution + checklists build task!

Posted by pa...@apache.org.
ZEST-25 Better binary distribution + checklists build task!


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

Branch: refs/heads/develop
Commit: ac7d88a722d1a6d8af36d7f525b78ed9922e110b
Parents: 1846775
Author: Paul Merlin <pa...@nosphere.org>
Authored: Wed Jun 24 16:43:37 2015 +0200
Committer: Paul Merlin <pa...@nosphere.org>
Committed: Wed Jun 24 16:43:37 2015 +0200

----------------------------------------------------------------------
 build.gradle | 189 +++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 143 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/ac7d88a7/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 501171a..170edb4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -33,7 +33,7 @@ buildscript {
     jcenter()
   }
   dependencies {
-    classpath 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.1.1'
+    classpath 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.1.2'
     classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1'
   }
 }
@@ -120,7 +120,7 @@ idea.project.ipr {
 def repos_urls = [
   mavenCentral: "http://repo1.maven.org/maven2/",
   ops4j: "http://repository.ops4j.org/maven2/",
-  restlet: 'http://maven.restlet.org',
+  restlet: 'http://maven.restlet.org/',
   javanet: "http://download.java.net/maven/2",
   clojars: "http://clojars.org/repo/",
 ]
@@ -134,7 +134,6 @@ allprojects {
 //  apply plugin: 'checkstyle'
   apply plugin: 'project-report'
   apply plugin: 'maven'
-  apply plugin: 'maven-publish-auth'
 
 
   defaultTasks 'classes', 'test'
@@ -292,7 +291,7 @@ allprojects {
     }
 
     signing {
-      required { uploadSigned }
+      required { rootProject.version != '0' && uploadSigned }
       sign configurations.archives
     }
 
@@ -387,6 +386,7 @@ allprojects {
       }
     }
   }
+  apply plugin: 'maven-publish-auth' // Bug in maven-publish-auth require apply after uploadArchives setup
 
   idea.module.iml {
     whenMerged { module ->
@@ -544,34 +544,77 @@ task buildAll( dependsOn: [
     ':org.qi4j.manual:website'
 ] ) { }
 
-// Prepare runtime dependencies download facility (metalink)
-buildAll.doLast {
-    def runtimeDepsMetalink = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<metalink xmlns=\"urn:ietf:params:xml:ns:metalink\">\n"
-    runtimeDepsMetalink = runtimeDepsMetalink + " <identity>qi4j-sdk-runtime-deps</identity>\n"
-    runtimeDepsMetalink = runtimeDepsMetalink + " <version>${version}</version>\n"
-    def handledGavPaths = []
+task generateBinDistGoOfflineHelpers {
+  def goOfflineGradleFile = file( 'build/go-offline-helpers/go-offline.gradle' )
+  def goOfflinePomFile = file( 'build/go-offline-helpers/go-offline.pom')
+  outputs.files goOfflineGradleFile
+  outputs.files goOfflinePomFile
+  doLast {
+    
+    def goOfflineGradle = '// This gradle build file has the sole purpose of downloading all dependencies in this directory.\n'
+    goOfflineGradle += '// Use the following command: gradle -b go-offline.gradle download\n'
+    goOfflineGradle += 'apply plugin: \'java\'\nconfigurations { download }\nrepositories {\n'
+    def goOfflinePom = '<project>\n  <modelVersion>4.0.0</modelVersion>\n'
+    goOfflinePom += "  <groupId>org.qi4j</groupId>\n  <artifactId>go-offline-helper</artifactId>\n  <version>$version</version>\n"
+    goOfflinePom += '  <packaging>pom</packaging>\n'
+    goOfflinePom += '  <!--\n  This pom has the sole purpose of downloading all dependencies in this directory.\n'
+    goOfflinePom += '  Use the following command:\n\n  mvn -f go-offline.pom validate\n  -->\n  <repositories>\n'
+    
+    def repoCount = 1
+    repos_urls.each { repo_url ->
+      goOfflineGradle += "  maven { url '${repo_url.value}' }\n"
+      goOfflinePom += "    <repository><id>go-offline-repo-$repoCount</id><url>${repo_url.value}</url></repository>\n"
+      repoCount++
+    }
+    
+    goOfflineGradle += '}\ndependencies {\n'
+    goOfflinePom += '  </repositories>\n  <dependencies>\n'
+
+    def handledDeps = []
     releaseApprovedProjects.each { p ->
       p.configurations.runtime.allDependencies.each { dep ->
-        def gavpath = dep.group.replace(".","/") + "/" + dep.name + "/" + dep.version + "/" + dep.name + "-" + dep.version + ".jar"
-        if( !dep.group.startsWith("org.qi4j") && !handledGavPaths.contains( gavpath ) ) {
-          runtimeDepsMetalink = runtimeDepsMetalink + "  <file name=\"${dep.group}-${dep.name}-${dep.version}.jar\">\n"
-          repos_urls.each { repo_url ->
-            runtimeDepsMetalink = runtimeDepsMetalink + "    <url>" + repo_url.value + dep.group.replace(".","/") + "/" + dep.name + "/" + dep.version + "/" + dep.name + "-" + dep.version + ".jar" + "</url>\n"
-          }
-          runtimeDepsMetalink = runtimeDepsMetalink + "  </file>\n\n"
-          handledGavPaths << gavpath
+        def depCoords = "${dep.group}:${dep.name}:${dep.version}"
+        if( !dep.group.startsWith( 'org.qi4j' ) && !handledDeps.contains( depCoords ) ) {
+
+          goOfflineGradle += "  download '$depCoords'\n"
+          goOfflineGradle += "  // download '$depCoords:sources'\n"
+          goOfflineGradle += "  // download '$depCoords:javadoc'\n"
+
+          def gav = "<groupId>${dep.group}</groupId><artifactId>${dep.name}</artifactId><version>${dep.version}</version>"
+          goOfflinePom += """    <dependency>$gav</dependency>
+          <!-- <dependency>$gav<classifier>sources</classifier></dependency> -->
+          <!-- <dependency>$gav<classifier>javadoc</classifier></dependency> -->\n"""
+
+          handledDeps << depCoords
         }
       }
     }
-    runtimeDepsMetalink = runtimeDepsMetalink + "</metalink>\n"
-    new File( buildDir.toString(), "reports" ).mkdirs()
-    new File( buildDir.toString(), "reports/qi4j-sdk-runtime-deps.metalink" ).text = runtimeDepsMetalink
+
+    goOfflineGradle += '}\ntask download( type: Copy ) {\n  from configurations.download\n  into file( \'dependencies/\' )\n}\n'
+    goOfflinePom += """  </dependencies>\n  <build><plugins><plugin>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-dependency-plugin</artifactId>
+    <version>2.10</version>
+    <executions><execution>
+      <id>go-offline</id><phase>validate</phase>
+      <goals><goal>copy-dependencies</goal></goals>
+      <configuration><outputDirectory>\${project.basedir}/dependencies</outputDirectory></configuration>
+    </execution></executions>
+  </plugin></plugins></build>
+</project>
+"""
+
+    goOfflineGradleFile.parentFile.mkdirs()
+    goOfflinePomFile.parentFile.mkdirs()
+
+    goOfflineGradleFile.text = goOfflineGradle
+    goOfflinePomFile.text = goOfflinePom
+  }
 }
 
 def srcDistImage = copySpec {
   from '.'
   exclude '**/build/'               // Build output
-  exclude '**/bin/'                 // Helper scripts
   exclude 'derby.log'               // Derby test garbage
   exclude '**/*.iml'                // IDEA files
   exclude '**/*.ipr'                // IDEA files
@@ -606,12 +649,11 @@ def runtimeDependenciesListImage = copySpec {
   releaseApprovedProjects.collect { p ->
     into( "libs/" ) {
       from "$p.buildDir/reports/project/dependencies.txt"
-      rename 'dependencies.txt', p.name + '-' + p.version + '-runtime-deps.txt'
+      rename 'dependencies.txt', "${p.name}-${p.version}-runtime-deps.txt"
     }
   }
-  into( "libs/" ) {
-    from "build/reports/qi4j-sdk-runtime-deps.metalink"
-    rename 'qi4j-sdk-runtime-deps.metalink', 'qi4j-sdk-' + version + '-runtime-deps.metalink'
+  into( '.' ) {
+    from generateBinDistGoOfflineHelpers.outputs
   }
 }
 
@@ -626,52 +668,41 @@ def libsImage = copySpec {
   }
 }
 
-def samplesImage = copySpec {
-  from( "$projectDir/samples" )
-  from( "$projectDir/samples/*/build/docs/javadoc" )
-  into( "samples" )
-  exclude '**/*.iml'
-  exclude '**/build/'     // build output
-}
-
-def tutorialsImage = copySpec {
-  from( "$projectDir/tutorials" )
-  exclude '**/build/'
-  into( "tutorials" )
-  from( "$projectDir/tutorials/*/build/docs/javadoc" )
-  exclude '**/*.iml'
+def binDistNoticesImage = copySpec {
+  from( "$projectDir/LICENSE.txt")
+  from( "$projectDir/src/bin-dist" )
+  into( "." )
 }
 
 def binDistImage = copySpec {
   into "qi4j-sdk-$version"
+  with binDistNoticesImage
   with docsImage
   with reportsDistImage
   with runtimeDependenciesListImage
   with libsImage
-  with samplesImage
-  with tutorialsImage
 }
 
-task zipSources( type: Zip, dependsOn: [ buildAll ] ) {
+task zipSources( type: Zip, dependsOn: buildAll ) {
   baseName = 'qi4j-sdk'
   with srcDistImage
   classifier = 'src'
 }
 
-task tarSources( type: Tar, dependsOn: [ buildAll ] ) {
+task tarSources( type: Tar, dependsOn: buildAll ) {
   baseName = 'qi4j-sdk'
   with srcDistImage
   compression = Compression.GZIP
   classifier = 'src'
 }
 
-task zipBinaries( type: Zip, dependsOn: [ buildAll ] ) {
+task zipBinaries( type: Zip, dependsOn: buildAll ) {
   baseName = 'qi4j-sdk'
   classifier = 'bin'
   with binDistImage
 }
 
-task tarBinaries( type: Tar, dependsOn: [ buildAll ] ) {
+task tarBinaries( type: Tar, dependsOn: buildAll ) {
   baseName = 'qi4j-sdk'
   classifier = 'bin'
   compression = Compression.GZIP
@@ -687,6 +718,72 @@ task dist( type: Copy, dependsOn: install ) {
   into "$buildDir/dist"
 }
 
+// Tasks for source and binary distributions checks
+// - Run the check task of this very build inside the source distribution
+// - Rat the binary distribution (not pulled by checkDists as it takes ages to complete)
+// - Use the dependencies download facility of the binary distribution to "go offline"
+def unpackedSrcDistDir = file( "build/unpacked-distributions/src/qi4j-sdk-$version" )
+def unpackedBinDistDir = file( "build/unpacked-distributions/bin/qi4j-sdk-$version" )
+task unpackSrcDist( type: Copy ) {
+  with srcDistImage
+  into 'build/unpacked-distributions/src'
+}
+task checkSrcDist( type: GradleBuild, dependsOn: unpackSrcDist ) {
+  buildFile = "$unpackedSrcDistDir/build.gradle"
+  tasks = [ 'check' ] // TODO check
+}
+task unpackBinDist( type: Copy, dependsOn: buildAll ) {
+  with binDistImage
+  into 'build/unpacked-distributions/bin'
+}
+task checkBinDist_rat( type: org.apache.rat.gradle.RatTask, dependsOn: unpackBinDist ) {
+  inputDir = unpackedBinDistDir
+  reportDir = file( 'build/reports/rat-bin-dist' )
+  excludes = []
+}
+task checkBinDist_goOfflineGradle( type: GradleBuild, dependsOn: unpackBinDist ) {
+  def dependenciesDir = new File( unpackedBinDistDir, 'dependencies' )
+  doFirst { dependenciesDir.deleteDir() }
+  buildFile = "$unpackedBinDistDir/go-offline.gradle"
+  tasks = [ 'download' ]
+  doLast {
+    releaseApprovedProjects*.configurations.runtime.allDependencies.findAll({it.name}).each { dep ->
+      def jarArtifactId = dep.name instanceof String ? dep.name : dep.name.last()
+      def jarVersion = dep.version instanceof String ? dep.version : dep.version.last()
+      if( !jarArtifactId.startsWith( 'org.qi4j' ) ) {
+        def jarName = "${jarArtifactId}-${jarVersion}.jar"
+        if( !new File( dependenciesDir, jarName ).exists() ) {
+          throw new GradleException( "Binary distribution go-offline.gradle failed! Missing: $jarName" );
+        }
+      }
+    }
+  }
+}
+task checkBinDist_goOfflineMaven( type: Exec, dependsOn: unpackBinDist ) {
+  def dependenciesDir = new File( unpackedBinDistDir, 'dependencies' )
+  doFirst { dependenciesDir.deleteDir() }
+  workingDir unpackedBinDistDir
+  commandLine 'mvn', '-f', 'go-offline.pom', 'validate'
+  doLast {
+    releaseApprovedProjects*.configurations.runtime.allDependencies.findAll({it.name}).each { dep ->
+      def jarArtifactId = dep.name instanceof String ? dep.name : dep.name.last()
+      def jarVersion = dep.version instanceof String ? dep.version : dep.version.last()
+      if( !jarArtifactId.startsWith( 'org.qi4j' ) ) {
+        def jarName = "${jarArtifactId}-${jarVersion}.jar"
+        if( !new File( dependenciesDir, jarName ).exists() ) {
+          throw new GradleException( "Binary distribution go-offline.pom failed! Missing: $jarName" );
+        }
+      }
+    }
+  }
+}
+task checkBinDist {
+  dependsOn /*checkBinDist_rat,*/ checkBinDist_goOfflineGradle, checkBinDist_goOfflineMaven
+}
+task checkDists {
+  dependsOn checkSrcDist, checkBinDist
+}
+
 task checkReleaseSpec {
   description = "Ensure that no releasable module depend on module(s) that don't fit the release criteria."
   group = 'release'