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 2016/12/24 10:29:13 UTC

[01/19] zest-java git commit: testsupport: refine FreePortFinder again

Repository: zest-java
Updated Branches:
  refs/heads/develop d7e6eb830 -> 0984d0ba9


testsupport: refine FreePortFinder again

ci flakiness is hard


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

Branch: refs/heads/develop
Commit: d76726450a2434fe8e2859521ab70201c2084421
Parents: d7e6eb8
Author: Paul Merlin <pa...@apache.org>
Authored: Sat Dec 17 20:53:00 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sat Dec 17 20:53:00 2016 +0100

----------------------------------------------------------------------
 .../org/apache/polygene/test/util/FreePortFinder.java | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/d7672645/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java b/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java
index 7bb8fad..9a43deb 100644
--- a/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java
+++ b/core/testsupport/src/main/java/org/apache/polygene/test/util/FreePortFinder.java
@@ -55,21 +55,26 @@ public class FreePortFinder
     private static final List<Range> LEAST_USED_RANGES = Arrays.asList(
         new Range( 29170, 29998 ),
         new Range( 38866, 39680 ),
-        // new Range( 41798, 42507 ), // 42187 seen busy
+        new Range( 41798, 42507 ),
         new Range( 43442, 44122 ),
         new Range( 46337, 46997 ),
         new Range( 35358, 36000 ),
-        // new Range( 36866, 37474 ), // 37334 seen busy
+        new Range( 36866, 37474 ),
         new Range( 38204, 38799 ),
-        // new Range( 33657, 34248 ), // 33951 seen busy
+        new Range( 33657, 34248 ),
         new Range( 30261, 30831 ),
-        // new Range( 41231, 41793 ), // 41652 seen busy
+        new Range( 41231, 41793 ),
         new Range( 21011, 21552 ),
         new Range( 28590, 29117 ),
         new Range( 14415, 14935 ),
         new Range( 26490, 26999 )
     );
 
+    // Seen busy on builds.apache.org
+    private static final List<Integer> BLACKLIST = Arrays.asList(
+        42187, 37334, 38615, 33951, 41652
+    );
+
     private static final int MAX_PORT_CHECKS = 20;
 
     public static boolean isFreePortOnLocalHost( int port )
@@ -142,6 +147,7 @@ public class FreePortFinder
             .boxed()
             .collect( collectingAndThen( toList(), collected ->
             {
+                collected.removeAll( BLACKLIST );
                 shuffle( collected );
                 return collected.stream();
             } ) )


[03/19] zest-java git commit: indexing-rdf: remove some usage of deprecated stuff

Posted by pa...@apache.org.
indexing-rdf: remove some usage of deprecated stuff


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

Branch: refs/heads/develop
Commit: 13b387c45167d9e21d33a3e47ba1e281543ec721
Parents: 9fe61e6
Author: Paul Merlin <pa...@apache.org>
Authored: Sat Dec 17 22:10:59 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sat Dec 17 22:10:59 2016 +0100

----------------------------------------------------------------------
 .../polygene/index/rdf/query/internal/RdfQueryParserImpl.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/13b387c4/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/internal/RdfQueryParserImpl.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/internal/RdfQueryParserImpl.java b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/internal/RdfQueryParserImpl.java
index 322b608..d176dd3 100644
--- a/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/internal/RdfQueryParserImpl.java
+++ b/extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/query/internal/RdfQueryParserImpl.java
@@ -376,7 +376,7 @@ public class RdfQueryParserImpl
             String jsonStr = "";
             if( item != null )
             {
-                String serialized = valueSerializer.serialize( item, false );
+                String serialized = valueSerializer.serialize( new Options().withoutTypeInfo(), item );
                 if( item instanceof String )
                 {
                     serialized = "\"" + StringEscapeUtils.escapeJava( serialized ) + "\"";


[13/19] zest-java git commit: build: detangle buildSrc

Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/test/groovy/org/apache/polygene/gradle/tasks/ExecLoggedTest.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/test/groovy/org/apache/polygene/gradle/tasks/ExecLoggedTest.groovy b/buildSrc/src/test/groovy/org/apache/polygene/gradle/tasks/ExecLoggedTest.groovy
new file mode 100644
index 0000000..aca2f72
--- /dev/null
+++ b/buildSrc/src/test/groovy/org/apache/polygene/gradle/tasks/ExecLoggedTest.groovy
@@ -0,0 +1,84 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.tasks
+
+import org.gradle.internal.os.OperatingSystem
+import org.gradle.process.ExecSpec
+import org.gradle.testfixtures.ProjectBuilder
+import org.junit.Rule
+import org.junit.rules.TemporaryFolder
+import spock.lang.IgnoreIf
+import spock.lang.Specification
+
+@IgnoreIf( { OperatingSystem.current().isWindows() } )
+class ExecLoggedTest extends Specification
+{
+  @Rule
+  final TemporaryFolder tmpDir = new TemporaryFolder();
+  File script
+
+  def setup()
+  {
+    script = tmpDir.newFile( 'script.sh' ) << '''
+      #!/bin/sh
+      echo STDOUT
+      echo STDERR 1>&2
+    '''.stripIndent().trim()
+  }
+
+  def "ExecLogged.execLogged()"()
+  {
+    given:
+    def project = ProjectBuilder.builder().build()
+    def out = tmpDir.newFile 'out.txt'
+    def err = tmpDir.newFile 'err.txt'
+
+    when:
+    ExecLogged.execLogged project, out, err, { ExecSpec spec ->
+      spec.workingDir = tmpDir.root
+      spec.commandLine 'sh', script.absolutePath
+    }
+
+    then:
+    out.text == 'STDOUT\n'
+    err.text == 'STDERR\n'
+  }
+
+  def "ExecLogged Task"()
+  {
+    given:
+    def project = ProjectBuilder.builder().build()
+    def out = tmpDir.newFile 'out.txt'
+    def err = tmpDir.newFile 'err.txt'
+    def task = project.tasks.create( 'test', ExecLogged ) { ExecLogged task ->
+      task.workingDir = tmpDir.root
+      task.stdoutFile = out
+      task.stderrFile = err
+      task.commandLine 'sh', script.absolutePath
+    }
+
+    when:
+    // WARN ProjectBuilder is not meant to run tasks, should use TestKit instead
+    // But that's enough for testing ExecLogged and much more faster
+    task.execute()
+
+    then:
+    out.text == 'STDOUT\n'
+    err.text == 'STDERR\n'
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/core/api/build.gradle
----------------------------------------------------------------------
diff --git a/core/api/build.gradle b/core/api/build.gradle
index db05b19..df4ad7c 100644
--- a/core/api/build.gradle
+++ b/core/api/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-core'
+
 jar { manifest { name = "Apache Polygene\u2122 Core API" } }
 
 dependencies {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/core/bootstrap/build.gradle
----------------------------------------------------------------------
diff --git a/core/bootstrap/build.gradle b/core/bootstrap/build.gradle
index ae37429..f005d2b 100644
--- a/core/bootstrap/build.gradle
+++ b/core/bootstrap/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-core'
+
 jar { manifest { name = "Apache Polygene\u2122 Core Bootstrap" } }
 
 dependencies {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/core/runtime/build.gradle
----------------------------------------------------------------------
diff --git a/core/runtime/build.gradle b/core/runtime/build.gradle
index 5324662..9e1be8f 100644
--- a/core/runtime/build.gradle
+++ b/core/runtime/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-core'
+
 jar { manifest { name = "Apache Polygene\u2122 Core Runtime" } }
 
 dependencies {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/core/spi/build.gradle
----------------------------------------------------------------------
diff --git a/core/spi/build.gradle b/core/spi/build.gradle
index 7aa42b4..8d1af06 100644
--- a/core/spi/build.gradle
+++ b/core/spi/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-core'
+
 jar { manifest { name = "Apache Polygene\u2122 Core SPI" } }
 
 dependencies {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/core/testsupport/build.gradle
----------------------------------------------------------------------
diff --git a/core/testsupport/build.gradle b/core/testsupport/build.gradle
index 932d44a..bde2c50 100644
--- a/core/testsupport/build.gradle
+++ b/core/testsupport/build.gradle
@@ -18,7 +18,9 @@
  *
  */
 
-jar { manifest { name = "Apache Polygene\u2122 Core TestSupport" } }
+apply plugin: 'polygene-core'
+
+jar { manifest { name = "Apache Polygene\u2122 Core Test Support" } }
 
 dependencies {
   compile polygene.core.bootstrap

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/distributions/build.gradle
----------------------------------------------------------------------
diff --git a/distributions/build.gradle b/distributions/build.gradle
new file mode 100644
index 0000000..a3b9f0d
--- /dev/null
+++ b/distributions/build.gradle
@@ -0,0 +1,2 @@
+
+apply plugin: 'polygene-distributions'

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/distributions/src/bin-dist/NOTICE.txt
----------------------------------------------------------------------
diff --git a/distributions/src/bin-dist/NOTICE.txt b/distributions/src/bin-dist/NOTICE.txt
new file mode 100644
index 0000000..998fdf8
--- /dev/null
+++ b/distributions/src/bin-dist/NOTICE.txt
@@ -0,0 +1,5 @@
+Apache Polygene\u2122 (Java Edition) 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-java/blob/de73010f/distributions/src/bin-dist/README.txt
----------------------------------------------------------------------
diff --git a/distributions/src/bin-dist/README.txt b/distributions/src/bin-dist/README.txt
new file mode 100644
index 0000000..b2d104d
--- /dev/null
+++ b/distributions/src/bin-dist/README.txt
@@ -0,0 +1,50 @@
+
+Welcome to the world of Apache Polygene
+   - Composite Oriented Programming on the Java platform.
+
+
+This Apache Polygene\u2122 Binary Distribution contains everything you need to
+create Polygene\u2122 applications.
+
+
+Polygene\u2122 (then Polygene\u2122) started in 2007, and is still in heavy development
+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://polygene.apache.org for more information.
+
+
+Licensing
+---------
+All Apache Polygene\u2122 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, Polygene\u2122 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 Polygene\u2122 artifacts only to keep the download
+size small. Each Polygene\u2122 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://polygene.apache.org/java/latest/howto-depend-on-polygene.html
+
+
+Thank you for trying out Apache Polygene\u2122 and Composite Oriented Programming.
+
+
+-- Apache Polygene\u2122 Team
+

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/distributions/src/src-dist/README.txt
----------------------------------------------------------------------
diff --git a/distributions/src/src-dist/README.txt b/distributions/src/src-dist/README.txt
new file mode 100644
index 0000000..a27ea07
--- /dev/null
+++ b/distributions/src/src-dist/README.txt
@@ -0,0 +1,64 @@
+
+Welcome to the world of Apache Polygene
+   - Composite Oriented Programming on the Java platform.
+
+
+This Apache Polygene\u2122 Source Distribution contains everything you need to
+create Polygene\u2122 applications.
+
+
+Polygene\u2122 started in 2007, and is still in heavy development under the umbrella of
+the Apache Polygene\u2122 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://polygene.apache.org for more information.
+
+
+Licensing
+---------
+All Polygene\u2122 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, Polygene\u2122 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 distribution contains Polygene\u2122 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.
+
+If you prefer to use a dependency management system, go to:
+https://polygene.apache.org/java/latest/howto-depend-on-polygene.html
+
+
+Building Apache Polygene
+---------------------
+To build Polygene\u2122 from sources you only need to have a valid Java JDK >= 7
+installation.
+
+If you want to build the Polygene\u2122 manual, then you also need valid Asciidoc
+(http://www.methods.co.nz/asciidoc/) and Docbook-XSL installations.
+
+Here is how to run a full build with checks:
+
+    ./gradlew check assemble
+
+Read the Polygene\u2122 Build System tutorial for more details:
+https://polygene.apache.org/java/latest/build-system.html
+
+
+Thank you for trying out Apache Polygene\u2122 and Composite Oriented Programming.
+
+
+-- Apache Polygene\u2122 Team
+

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/cache-ehcache/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/cache-ehcache/build.gradle b/extensions/cache-ehcache/build.gradle
index 9845cb1..2e7ae19 100644
--- a/extensions/cache-ehcache/build.gradle
+++ b/extensions/cache-ehcache/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Ehcache Cache Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension: EhCache" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/cache-memcache/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/cache-memcache/build.gradle b/extensions/cache-memcache/build.gradle
index 597c41c..03cf403 100644
--- a/extensions/cache-memcache/build.gradle
+++ b/extensions/cache-memcache/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Memcache Cache Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - Cache - Memcache" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-file/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-file/build.gradle b/extensions/entitystore-file/build.gradle
index 83789b2..a1b6378 100644
--- a/extensions/entitystore-file/build.gradle
+++ b/extensions/entitystore-file/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - File system" } }
 
 dependencies {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-geode/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-geode/build.gradle b/extensions/entitystore-geode/build.gradle
index 79ef02b..146993c 100644
--- a/extensions/entitystore-geode/build.gradle
+++ b/extensions/entitystore-geode/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Geode EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - Geode" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-hazelcast/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-hazelcast/build.gradle b/extensions/entitystore-hazelcast/build.gradle
index bf88c81..15c84b2 100644
--- a/extensions/entitystore-hazelcast/build.gradle
+++ b/extensions/entitystore-hazelcast/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Hazelcast EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - Hazelcast" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-jclouds/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jclouds/build.gradle b/extensions/entitystore-jclouds/build.gradle
index 32a56d2..5e29bf0 100644
--- a/extensions/entitystore-jclouds/build.gradle
+++ b/extensions/entitystore-jclouds/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 JClouds EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - JClouds" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-jdbm/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jdbm/build.gradle b/extensions/entitystore-jdbm/build.gradle
index 822686f..60f68a5 100644
--- a/extensions/entitystore-jdbm/build.gradle
+++ b/extensions/entitystore-jdbm/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 JDBM EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - JDBM" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-leveldb/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-leveldb/build.gradle b/extensions/entitystore-leveldb/build.gradle
index cd98455..1da5d20 100644
--- a/extensions/entitystore-leveldb/build.gradle
+++ b/extensions/entitystore-leveldb/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 LevelDB EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - LevelDB" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-memory/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-memory/build.gradle b/extensions/entitystore-memory/build.gradle
index 4833d92..72b45e6 100644
--- a/extensions/entitystore-memory/build.gradle
+++ b/extensions/entitystore-memory/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - Memory" } }
 
 dependencies {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-mongodb/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/build.gradle b/extensions/entitystore-mongodb/build.gradle
index 5b78435..425485d 100644
--- a/extensions/entitystore-mongodb/build.gradle
+++ b/extensions/entitystore-mongodb/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 MongoDB EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - MongoDB" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-preferences/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-preferences/build.gradle b/extensions/entitystore-preferences/build.gradle
index 1339e8e..f1e418f 100644
--- a/extensions/entitystore-preferences/build.gradle
+++ b/extensions/entitystore-preferences/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Preferences EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - Preferences" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-redis/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-redis/build.gradle b/extensions/entitystore-redis/build.gradle
index 44a0dd6..f59654f 100644
--- a/extensions/entitystore-redis/build.gradle
+++ b/extensions/entitystore-redis/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Redis EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - Redis" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-riak/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-riak/build.gradle b/extensions/entitystore-riak/build.gradle
index 7b6de87..b0354c7 100644
--- a/extensions/entitystore-riak/build.gradle
+++ b/extensions/entitystore-riak/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Riak EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - Riak" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/entitystore-sql/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-sql/build.gradle b/extensions/entitystore-sql/build.gradle
index f8b494a..89f890d 100644
--- a/extensions/entitystore-sql/build.gradle
+++ b/extensions/entitystore-sql/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 SQL EntityStore Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - EntityStore - SQL" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/indexing-elasticsearch/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/build.gradle b/extensions/indexing-elasticsearch/build.gradle
index 7d5089c..580e673 100644
--- a/extensions/indexing-elasticsearch/build.gradle
+++ b/extensions/indexing-elasticsearch/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 ElasticSearch Index/Query Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - Index/Query - ElasticSearch" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/indexing-rdf/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/build.gradle b/extensions/indexing-rdf/build.gradle
index 44ec675..e8295ed 100644
--- a/extensions/indexing-rdf/build.gradle
+++ b/extensions/indexing-rdf/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 RDF Index/Query Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - Index/Query - RDF" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/indexing-solr/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/indexing-solr/build.gradle b/extensions/indexing-solr/build.gradle
index 6cd924e..141c23d 100644
--- a/extensions/indexing-solr/build.gradle
+++ b/extensions/indexing-solr/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Solr Indexing Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - Indexing - Solr" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/indexing-sql/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/indexing-sql/build.gradle b/extensions/indexing-sql/build.gradle
index e1403a3..7a3ac86 100644
--- a/extensions/indexing-sql/build.gradle
+++ b/extensions/indexing-sql/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 SQL Indexing Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - Indexing - SQL" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/metrics-codahale/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/metrics-codahale/build.gradle b/extensions/metrics-codahale/build.gradle
index 8221b66..800aa19 100644
--- a/extensions/metrics-codahale/build.gradle
+++ b/extensions/metrics-codahale/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Codahale Metrics Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - Metrics - Codahale" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/migration/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/migration/build.gradle b/extensions/migration/build.gradle
index 57ec29e..bcb3099 100644
--- a/extensions/migration/build.gradle
+++ b/extensions/migration/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Migration Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - Migration" }}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/reindexer/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/reindexer/build.gradle b/extensions/reindexer/build.gradle
index 67f9341..510cd60 100644
--- a/extensions/reindexer/build.gradle
+++ b/extensions/reindexer/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 jar { manifest { description = "Apache Polygene\u2122 Reindexer Extension" } }
 
 dependencies {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/valueserialization-jackson/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-jackson/build.gradle b/extensions/valueserialization-jackson/build.gradle
index 156a63e..17ac4b5 100644
--- a/extensions/valueserialization-jackson/build.gradle
+++ b/extensions/valueserialization-jackson/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 Jackson ValueSerialization Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - ValueSerialization - Jackson" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/valueserialization-orgjson/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-orgjson/build.gradle b/extensions/valueserialization-orgjson/build.gradle
index 170fa1a..5a2d61e 100644
--- a/extensions/valueserialization-orgjson/build.gradle
+++ b/extensions/valueserialization-orgjson/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 org.json ValueSerialization Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - ValueSerialization - org.json" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/extensions/valueserialization-stax/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/valueserialization-stax/build.gradle b/extensions/valueserialization-stax/build.gradle
index f2bce54..f60e6be 100644
--- a/extensions/valueserialization-stax/build.gradle
+++ b/extensions/valueserialization-stax/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-extension'
+
 description = "Apache Polygene\u2122 StaX ValueSerialization Extension"
 
 jar { manifest { name = "Apache Polygene\u2122 Extension - ValueSerialization - StaX" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/gradle.properties
----------------------------------------------------------------------
diff --git a/gradle.properties b/gradle.properties
index 84409fc..ee0e41c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -15,5 +15,5 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 #
-#
-#
+
+org.gradle.jvmargs=-Xms2g -Xmx2g

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/alarm/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/alarm/build.gradle b/libraries/alarm/build.gradle
index 4afecaf..e9fa455 100644
--- a/libraries/alarm/build.gradle
+++ b/libraries/alarm/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Alarm Library provides industrial automation style alarm point workflow semantics."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Alarm - APi" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/circuitbreaker/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/circuitbreaker/build.gradle b/libraries/circuitbreaker/build.gradle
index 31112b5..6720e0c 100644
--- a/libraries/circuitbreaker/build.gradle
+++ b/libraries/circuitbreaker/build.gradle
@@ -19,6 +19,8 @@
  */
 import org.apache.polygene.gradle.TaskGroups
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Circuit Breaker Library provides a framework for connecting external resources, so that they can be disabled during re-play of events."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Circuit Breaker" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/constraints/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/constraints/build.gradle b/libraries/constraints/build.gradle
index 3c125e0..6e11bb1 100644
--- a/libraries/constraints/build.gradle
+++ b/libraries/constraints/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Constraint Library provides common set of constraints."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Constraints"}}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/fileconfig/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/fileconfig/build.gradle b/libraries/fileconfig/build.gradle
index 11899a9..2547cc0 100644
--- a/libraries/fileconfig/build.gradle
+++ b/libraries/fileconfig/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 File Configuration Library provides platform specific file locations."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - FileConfig" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/http/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/http/build.gradle b/libraries/http/build.gradle
index fb7b4ec..864b51f 100644
--- a/libraries/http/build.gradle
+++ b/libraries/http/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Http Library provides embedded Jetty for Apache Polygene\u2122 application use."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Http" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/invocation-cache/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/invocation-cache/build.gradle b/libraries/invocation-cache/build.gradle
index 317d41f..5dcbb2e 100644
--- a/libraries/invocation-cache/build.gradle
+++ b/libraries/invocation-cache/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Invocation Cache Library provides caching framework for methods."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Invocation Cache" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/jmx/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/jmx/build.gradle b/libraries/jmx/build.gradle
index 3f7543d..c0bbd80 100644
--- a/libraries/jmx/build.gradle
+++ b/libraries/jmx/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.polygene.gradle.TaskGroups
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -19,6 +17,9 @@ import org.apache.polygene.gradle.TaskGroups
  *
  *
  */
+import org.apache.polygene.gradle.TaskGroups
+
+apply plugin: 'polygene-library'
 
 description = "Apache Polygene\u2122 JMX Library provides Java Management Extension (JMX) integration for Apache Polygene\u2122 applications."
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/lang-groovy/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/lang-groovy/build.gradle b/libraries/lang-groovy/build.gradle
index 640f708..8634868 100644
--- a/libraries/lang-groovy/build.gradle
+++ b/libraries/lang-groovy/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Groovy Library allows for Mixins to be implemented in Groovy scripts instead of directly in compiled Java."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Scripting - Groovy" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/lang-javascript/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/lang-javascript/build.gradle b/libraries/lang-javascript/build.gradle
index eee1a59..1d301e3 100644
--- a/libraries/lang-javascript/build.gradle
+++ b/libraries/lang-javascript/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 JavaScript Library allows for Mixins to be implemented in JavaScript instead of directly in compiled Java."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Scripting - JavaScript" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/locking/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/locking/build.gradle b/libraries/locking/build.gradle
index eda2aa0..3dfad3f 100644
--- a/libraries/locking/build.gradle
+++ b/libraries/locking/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Locking Library provides lock management for methods."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Locking" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/logging/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/logging/build.gradle b/libraries/logging/build.gradle
index b985f05..f45c676 100644
--- a/libraries/logging/build.gradle
+++ b/libraries/logging/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Logging Library provides an advanced logging framework which separates trace, debug and log systems."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Logging" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/metrics/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/metrics/build.gradle b/libraries/metrics/build.gradle
index bd32c34..606b655 100644
--- a/libraries/metrics/build.gradle
+++ b/libraries/metrics/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Metrics Library."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Metrics" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/osgi/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/osgi/build.gradle b/libraries/osgi/build.gradle
index 4cad02e..c762482 100644
--- a/libraries/osgi/build.gradle
+++ b/libraries/osgi/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 OSGi Library provides integration of OSGi and Apache Polygene\u2122, so that services in each system can be shared."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - OSGi Integration" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/rdf/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/rdf/build.gradle b/libraries/rdf/build.gradle
index 276dd10..627d454 100644
--- a/libraries/rdf/build.gradle
+++ b/libraries/rdf/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 RDF Library provides commonalities of various RDF based services in Apache Polygene\u2122, such as RDF Indexing."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - RDF" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/rest-client/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/rest-client/build.gradle b/libraries/rest-client/build.gradle
index 934d7f5..33cb81f 100644
--- a/libraries/rest-client/build.gradle
+++ b/libraries/rest-client/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 REST Client Library provides a client library for the Apache Polygene\u2122 REST Server library"
 
 jar { manifest { name = "Apache Polygene\u2122 Library - REST Client" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/rest-common/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/rest-common/build.gradle b/libraries/rest-common/build.gradle
index 4d5616e..7b8f0d8 100644
--- a/libraries/rest-common/build.gradle
+++ b/libraries/rest-common/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 REST Library provides various Restlet resources that can be used to expose Apache Polygene\u2122 entities and indexes. Mostly for debugging."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - REST" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/rest-server/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/rest-server/build.gradle b/libraries/rest-server/build.gradle
index 4e186aa..9a2a472 100644
--- a/libraries/rest-server/build.gradle
+++ b/libraries/rest-server/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 REST Server Library provides a server component for building REST API's based on usecases"
 
 jar { manifest { name = "Apache Polygene\u2122 Library - REST server" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/rest/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/rest/build.gradle b/libraries/rest/build.gradle
index 109d7f3..27d8532 100644
--- a/libraries/rest/build.gradle
+++ b/libraries/rest/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 REST Library provides various Restlet resources that can be used to expose Apache Polygene\u2122 entities and indexes. Mostly for debugging."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - REST" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/restlet/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/restlet/build.gradle b/libraries/restlet/build.gradle
index f8f6a6e..35cd1d9 100644
--- a/libraries/restlet/build.gradle
+++ b/libraries/restlet/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.polygene.gradle.TaskGroups
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -19,6 +17,9 @@ import org.apache.polygene.gradle.TaskGroups
  *
  *
  */
+import org.apache.polygene.gradle.TaskGroups
+
+apply plugin: 'polygene-library'
 
 description = "Apache Polygene\u2122 Restlet Library provides automatic CRUD resources as well as custom resources integrated to Polygene."
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/scripting/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/scripting/build.gradle b/libraries/scripting/build.gradle
index 9e61c0a..e1a1794 100644
--- a/libraries/scripting/build.gradle
+++ b/libraries/scripting/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Common Scripting Library contains common classes across scripting implementations."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Scripting - Common" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/servlet/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/servlet/build.gradle b/libraries/servlet/build.gradle
index cba7aa4..62a026e 100644
--- a/libraries/servlet/build.gradle
+++ b/libraries/servlet/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Servlet Library provides integration of Apache Polygene\u2122 into web applications."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Servlet" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/shiro-core/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/shiro-core/build.gradle b/libraries/shiro-core/build.gradle
index eb6ac1a..e554474 100644
--- a/libraries/shiro-core/build.gradle
+++ b/libraries/shiro-core/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Shiro Library integrates Apache Shiro security framework into Apache Polygene\u2122."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Shiro Core" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/shiro-web/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/shiro-web/build.gradle b/libraries/shiro-web/build.gradle
index e8048e1..3bcf9c6 100644
--- a/libraries/shiro-web/build.gradle
+++ b/libraries/shiro-web/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Shiro Library integrates Apache Shiro security framework into Apache Polygene\u2122. This bundle provides Servlet support."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Shiro Web" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/spring/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/spring/build.gradle b/libraries/spring/build.gradle
index 7f0062a..9d70d05 100644
--- a/libraries/spring/build.gradle
+++ b/libraries/spring/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 Spring Library allows for tight integration of Spring Framework and Apache Polygene\u2122 applications."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - Spring" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/sql-bonecp/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/sql-bonecp/build.gradle b/libraries/sql-bonecp/build.gradle
index 66db83b..013b74f 100644
--- a/libraries/sql-bonecp/build.gradle
+++ b/libraries/sql-bonecp/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 SQL BoneCP Library provides BoneCP support."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - SQL BoneCP" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/sql-dbcp/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/sql-dbcp/build.gradle b/libraries/sql-dbcp/build.gradle
index 73c9cce..2ac3f7d 100644
--- a/libraries/sql-dbcp/build.gradle
+++ b/libraries/sql-dbcp/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 SQL DBCP Library provides DBCP support."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - SQL DBCP" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/sql-liquibase/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/sql-liquibase/build.gradle b/libraries/sql-liquibase/build.gradle
index 55f6789..319cad1 100644
--- a/libraries/sql-liquibase/build.gradle
+++ b/libraries/sql-liquibase/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 SQL Liquibase Library provides Liquibase support."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - SQL Liquibase" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/sql/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/sql/build.gradle b/libraries/sql/build.gradle
index 9e52d2d..57aa378 100644
--- a/libraries/sql/build.gradle
+++ b/libraries/sql/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 SQL Library provides SQL support."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - SQL" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/uid/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/uid/build.gradle b/libraries/uid/build.gradle
index 807703b..5ff2621 100644
--- a/libraries/uid/build.gradle
+++ b/libraries/uid/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 UID Library contains various Identity generation services."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - UID" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/libraries/uowfile/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/uowfile/build.gradle b/libraries/uowfile/build.gradle
index 0a5524a..7e29df3 100644
--- a/libraries/uowfile/build.gradle
+++ b/libraries/uowfile/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-library'
+
 description = "Apache Polygene\u2122 UoWFile Library provides file operations binding to UoWs."
 
 jar { manifest { name = "Apache Polygene\u2122 Library - UoWFile" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/manual/build.gradle
----------------------------------------------------------------------
diff --git a/manual/build.gradle b/manual/build.gradle
index fed0e29..e76f7cf 100644
--- a/manual/build.gradle
+++ b/manual/build.gradle
@@ -15,9 +15,8 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-import org.apache.polygene.gradle.doc.ManualPlugin
 
-apply plugin: ManualPlugin
+apply plugin: 'polygene-manual'
 
 description = "Apache Polygene\u2122 Manuals and Website."
 
@@ -27,6 +26,6 @@ dependencies {
   compile polygene.library( 'logging' )
 
   runtime polygene.core.runtime
-  runtime( libraries.logback )
+  runtime libraries.logback
 }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/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 0d4240c..04edd91 100644
--- a/manual/src/docs/tutorials/howto-build-system.txt
+++ b/manual/src/docs/tutorials/howto-build-system.txt
@@ -20,7 +20,7 @@
 [[build-system,Build System]]
 = Polygene\u2122 Build System =
 
-This tutorial is intended for developpers who want to build the Polygene\u2122 SDK themselves.
+This tutorial is intended for developers who want to build the Polygene\u2122 SDK themselves.
 It describe the Polygene\u2122 SDK Build System from compilation to publication of artifacts for consumption by other
 applications.
 
@@ -45,71 +45,94 @@ Build System configuration is done through Gradle properties.
 This can be done in many ways, see
 http://gradle.org/docs/current/userguide/tutorial_this_and_that.html#sec:gradle_properties_and_system_properties[Gradle properties and system properties].
 
+== Main tasks ==
 
-== Root project tasks ==
+The Polygene\u2122 SDK project has tasks that work with the whole SDK.
 
-The Polygene\u2122 SDK root project has tasks that work with the whole SDK.
-The default build, triggered when running gradle without any command line arguments, compiles the code and run the
-tests, but nothing else.
-A quick way to check that nothing broke.
-
-Here are some of theses global tasks we defined:
-
-goOffline::
+downloadDependencies::
 +
 --
 Resolve, download and cache all needed dependencies.
 Useful to go offline.
 --
 
-clean::
+./gradlew::
++
+--
+The default build, triggered when running gradle without any command line arguments, compiles the code and run the
+tests, but nothing else. A quick way to check that nothing broke.
+--
+
+./gradlew clean::
 +
 --
 Clean up of all build output and restore the code base to a fresh state.
 --
 
-check::
+./gradlew assemble::
++
+--
+Produces all the archives, javadocs, manuals and website content.
+Global output is generated into +distributions/build+.
+--
+
+./gradlew check::
 +
 --
 Run the tests and other checks like checkstyle.
-Reports are generated in +build/reports+.
+Global reports are generated in +reports/build/reports+.
 --
 
-install::
+./gradlew build::
 +
 --
-Is roughly the same as Maven's install goal.
-It produces the test reports, javadocs and installs all the Jars into the local disk repository, for consumption
-by other applications.
+Equivalent to `./gradlew assemble check`
 --
 
-buildAll::
+./gradlew checkDistributions::
 +
 --
-Produces all the archives, javadocs, manuals and website content.
-The output is generated to +build+.
+Run global checks against the assembled distributions.
+Can take a while.
 --
 
-release::
+install::
 +
 --
-Uploads the release artifacts to the distribution servers and creates the release output into the
-+build/distributions+ directory.
+Is roughly the same as Maven's install goal.
+It produces the test reports, javadocs and installs all the Jars into the local disk repository, for consumption
+by other applications.
 --
 
 
-== Submodules tasks ==
+== Other tasks ==
 
 In addition to that, some submodules have specific tasks.
-To see all available tasks on a submodule issue the following command:
+To see all available tasks, issue the following command:
+
+[source,bash]
+----
+./gradlew tasks
+----
+
+All available tasks from all modules of the SDK are shown.
+If you want to narrow your exploration to submodules use the following:
 
 [source,bash]
 ----
-./gradlew -p tests/performance tasks
+./gradlew :test:performance:tasks
+./gradlew :release:tasks
 ----
 
-This example will output all gradle tasks available in the +tests/performance+ module where you should find
-the +performanceTest+ task that run the Polygene\u2122 performance test suite.
+These examples will respectively output all gradle tasks available in the +:tests:performance+ module where you should find
+the +performanceTest+ task that runs the Polygene\u2122 performance test suite and the +:release+ module tasks.
+
++tasks+ itself is a task, in the same way we can target module(s) with tasks, e.g.:
+
+[source,bash]
+----
+./gradlew :core:check :libraries:alarm:check
+----
 
 
 == Versions ==
@@ -127,11 +150,12 @@ To build a particular version, you specify a +version+ property on the command-l
 -----------
 
 If a +version+ property is not defined, the build system will refuse to make a release and upload.
+It will also try hard to do less and not get in your way.
 
 
 == Tests ==
 
-NOTE: See the https://builds.apache.org/view/S-Z/view/Polygene/[Polygene\u2122 Continuous Integration] for current tests results
+NOTE: See the https://builds.apache.org/view/P/view/Polygene/[Polygene\u2122 Continuous Integration] for current tests results
 
 Unit and integration tests are located near the code under test.
 You'll find theses tests across the whole SDK.
@@ -141,7 +165,7 @@ You'll find theses tests across the whole SDK.
 Among unit tests, some require an external service to be run.
 For example, the MongoDB EntityStore extension requires an actual MongoDB server to run its tests.
 
-NOTE: The HTML test reports generated by Gradle show skipped tests.
+NOTE: The HTML test reports generated by Gradle shows skipped tests.
 
 All thoses tests should be part of the default build and check if the service is available at its default location
 on +localhost+ and skip if not.
@@ -165,7 +189,7 @@ They can be run with the following Gradle command:
 
 [source,bash]
 -----------
-./gradlew :org.apache.polygene.tests:org.apache.polygene.test.performance:performanceTest
+./gradlew :tests:performance:performanceTest
 -----------
 
 Results will then be available in the test reports.
@@ -177,7 +201,7 @@ The build generates a documentation minisite:
 
 [source,bash]
 -----------
-./gradlew -p manual website
+./gradlew :manual:assemble
 -----------
 
 Output is in `~/manual/build/docs/website`.

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/release/build.gradle
----------------------------------------------------------------------
diff --git a/release/build.gradle b/release/build.gradle
new file mode 100644
index 0000000..8675f08
--- /dev/null
+++ b/release/build.gradle
@@ -0,0 +1,2 @@
+
+apply plugin: 'polygene-release'

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/reports/build.gradle
----------------------------------------------------------------------
diff --git a/reports/build.gradle b/reports/build.gradle
new file mode 100644
index 0000000..6eea3d8
--- /dev/null
+++ b/reports/build.gradle
@@ -0,0 +1,2 @@
+
+apply plugin: 'polygene-reports'

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/reports/src/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/reports/src/javadoc/overview.html b/reports/src/javadoc/overview.html
new file mode 100644
index 0000000..9530721
--- /dev/null
+++ b/reports/src/javadoc/overview.html
@@ -0,0 +1,26 @@
+<!--
+  ~  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.
+  ~
+  ~
+  -->
+<html>
+    <body>
+        <h3>Welcome to the Apache Polygene\u2122 (Java Edition) SDK Javadoc.</h3>
+        <p>Apache Polygene\u2122 is a framework for domain centric application development, including evolved concepts from AOP, DI and DDD.</p>
+        <p><a href="https://polygene.apache.org" target="_blank">polygene.apache.org</a></p>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/samples/dci/build.gradle
----------------------------------------------------------------------
diff --git a/samples/dci/build.gradle b/samples/dci/build.gradle
index c5e97c9..6226cc6 100644
--- a/samples/dci/build.gradle
+++ b/samples/dci/build.gradle
@@ -18,6 +18,7 @@
  *
  */
 
+apply plugin: 'polygene-sample'
 
 description = "Sample of how DCI (Data, Context & Interaction) pattern is implemented with Apache Polygene\u2122."
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/samples/forum/build.gradle
----------------------------------------------------------------------
diff --git a/samples/forum/build.gradle b/samples/forum/build.gradle
index 2cde092..7986214 100644
--- a/samples/forum/build.gradle
+++ b/samples/forum/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.polygene.gradle.TaskGroups
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -19,6 +17,9 @@ import org.apache.polygene.gradle.TaskGroups
  *
  *
  */
+import org.apache.polygene.gradle.TaskGroups
+
+apply plugin: 'polygene-sample'
 
 description = "Sample of how to build a web forum"
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/samples/rental/build.gradle
----------------------------------------------------------------------
diff --git a/samples/rental/build.gradle b/samples/rental/build.gradle
index 88adfc4..fca63d8 100644
--- a/samples/rental/build.gradle
+++ b/samples/rental/build.gradle
@@ -18,10 +18,9 @@
  *
  */
 
-plugins {
-  id 'war'
-  id "org.akhikhl.gretty" version "1.4.0"
-}
+apply plugin: 'polygene-sample'
+apply plugin: 'war'
+apply plugin: 'jetty'
 
 description = "Sample of implementation of a Car Rental application."
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/samples/sql-support/build.gradle
----------------------------------------------------------------------
diff --git a/samples/sql-support/build.gradle b/samples/sql-support/build.gradle
index 6e3c607..e0c3f21 100644
--- a/samples/sql-support/build.gradle
+++ b/samples/sql-support/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.polygene.gradle.TaskGroups
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -19,6 +17,9 @@ import org.apache.polygene.gradle.TaskGroups
  *
  *
  */
+import org.apache.polygene.gradle.TaskGroups
+
+apply plugin: 'polygene-sample'
 
 description = "SQL Support Sample."
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/samples/swing/build.gradle
----------------------------------------------------------------------
diff --git a/samples/swing/build.gradle b/samples/swing/build.gradle
index 2bf5c10..fa69db5 100644
--- a/samples/swing/build.gradle
+++ b/samples/swing/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.polygene.gradle.TaskGroups
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -19,6 +17,9 @@ import org.apache.polygene.gradle.TaskGroups
  *
  *
  */
+import org.apache.polygene.gradle.TaskGroups
+
+apply plugin: 'polygene-sample'
 
 description = "Sample of how to use the Swing bindings."
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index d789e08..9044fd6 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -16,6 +16,8 @@
  *  limitations under the License.
  */
 
+apply plugin: 'polygene-settings'
+
 rootProject.name = 'polygene-java'
 
 include 'core:api',
@@ -77,16 +79,12 @@ include 'core:api',
         'extensions:valueserialization-orgjson',
         'extensions:valueserialization-jackson',
         'extensions:valueserialization-stax',
-        'manual',
-        'samples:dci',
-        'samples:forum',
-        'samples:rental',
-        'samples:sql-support',
-        'samples:swing',
         'tools:model-detail',
         'tools:envisage',
         'tools:shell',
 //        'tools:qidea',
+        'tests:regression',
+        'tests:performance',
         'tutorials:cargo',
         'tutorials:composites',
         'tutorials:hello',
@@ -96,5 +94,10 @@ include 'core:api',
         'tutorials:introduction:thirtyminutes',
 //        'tutorials:introduction:twohours',
         'tutorials:services',
-        'tests:regression',
-        'tests:performance'
+        'samples:dci',
+        'samples:forum',
+        'samples:rental',
+        'samples:sql-support',
+        'samples:swing'
+
+include 'manual', 'reports', 'distributions', 'release'

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/src/bin-dist/NOTICE.txt
----------------------------------------------------------------------
diff --git a/src/bin-dist/NOTICE.txt b/src/bin-dist/NOTICE.txt
deleted file mode 100644
index 998fdf8..0000000
--- a/src/bin-dist/NOTICE.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Apache Polygene\u2122 (Java Edition) 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-java/blob/de73010f/src/bin-dist/README.txt
----------------------------------------------------------------------
diff --git a/src/bin-dist/README.txt b/src/bin-dist/README.txt
deleted file mode 100644
index b2d104d..0000000
--- a/src/bin-dist/README.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-
-Welcome to the world of Apache Polygene
-   - Composite Oriented Programming on the Java platform.
-
-
-This Apache Polygene\u2122 Binary Distribution contains everything you need to
-create Polygene\u2122 applications.
-
-
-Polygene\u2122 (then Polygene\u2122) started in 2007, and is still in heavy development
-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://polygene.apache.org for more information.
-
-
-Licensing
----------
-All Apache Polygene\u2122 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, Polygene\u2122 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 Polygene\u2122 artifacts only to keep the download
-size small. Each Polygene\u2122 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://polygene.apache.org/java/latest/howto-depend-on-polygene.html
-
-
-Thank you for trying out Apache Polygene\u2122 and Composite Oriented Programming.
-
-
--- Apache Polygene\u2122 Team
-

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/src/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/src/javadoc/overview.html b/src/javadoc/overview.html
deleted file mode 100644
index 9530721..0000000
--- a/src/javadoc/overview.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~  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.
-  ~
-  ~
-  -->
-<html>
-    <body>
-        <h3>Welcome to the Apache Polygene\u2122 (Java Edition) SDK Javadoc.</h3>
-        <p>Apache Polygene\u2122 is a framework for domain centric application development, including evolved concepts from AOP, DI and DDD.</p>
-        <p><a href="https://polygene.apache.org" target="_blank">polygene.apache.org</a></p>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tests/performance/build.gradle
----------------------------------------------------------------------
diff --git a/tests/performance/build.gradle b/tests/performance/build.gradle
index 8124869..a8613ad 100644
--- a/tests/performance/build.gradle
+++ b/tests/performance/build.gradle
@@ -15,7 +15,9 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-import org.apache.polygene.gradle.performance.PerformanceTestsPlugin
+import org.apache.polygene.gradle.structure.tests.PerformanceTestsPlugin
+
+apply plugin: 'polygene-test'
 
 description = "Apache Polygene\u2122 Performance Test Suite."
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tests/regression/build.gradle
----------------------------------------------------------------------
diff --git a/tests/regression/build.gradle b/tests/regression/build.gradle
index 895be0f..3db1de8 100644
--- a/tests/regression/build.gradle
+++ b/tests/regression/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-test'
+
 description = "Apache Polygene\u2122 Regression Tests are added by community members who find bugs and typically reported via Jira issues. These tests are not run as part of the normal build, but is accessible from './gradlew regression' to allow builds to still work."
 
 jar { manifest { name = "Apache Polygene\u2122 Tests - Regression" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tests/regression/src/main/java/org/apache/polygene/test/regression/ConcernsOnPropertyTest.java
----------------------------------------------------------------------
diff --git a/tests/regression/src/main/java/org/apache/polygene/test/regression/ConcernsOnPropertyTest.java b/tests/regression/src/main/java/org/apache/polygene/test/regression/ConcernsOnPropertyTest.java
new file mode 100644
index 0000000..7ecdfd5
--- /dev/null
+++ b/tests/regression/src/main/java/org/apache/polygene/test/regression/ConcernsOnPropertyTest.java
@@ -0,0 +1,115 @@
+/*
+ *  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.
+ *
+ *
+ */
+package org.apache.polygene.test.regression;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import org.junit.Assert;
+import org.junit.Test;
+import org.apache.polygene.api.composite.TransientBuilder;
+import org.apache.polygene.api.composite.TransientComposite;
+import org.apache.polygene.api.concern.ConcernOf;
+import org.apache.polygene.api.concern.Concerns;
+import org.apache.polygene.api.property.Property;
+import org.apache.polygene.api.sideeffect.SideEffectOf;
+import org.apache.polygene.api.sideeffect.SideEffects;
+import org.apache.polygene.bootstrap.AssemblyException;
+import org.apache.polygene.bootstrap.ModuleAssembly;
+import org.apache.polygene.test.AbstractPolygeneTest;
+
+
+public class ConcernsOnPropertyTest
+    extends AbstractPolygeneTest
+{
+    public void assemble( ModuleAssembly module )
+        throws AssemblyException
+    {
+        module.transients( CarComposite.class );
+    }
+
+    @Test
+    public void whenConcernOnPropertyThenConcernIsInvoked()
+    {
+        TransientBuilder<Car> builder = transientBuilderFactory.newTransientBuilder( Car.class );
+        Car prototype = builder.prototypeFor( Car.class );
+        prototype.manufacturer().set( "Volvo" );
+        Car car = builder.newInstance();
+        Assert.assertEquals( "Concern on Property methods.", "Simon says: Volvo", car.manufacturer().get() );
+    }
+
+    public interface CarComposite
+        extends Car, TransientComposite
+    {
+    }
+
+    public interface Car
+    {
+        Manufacturer manufacturer();
+    }
+
+    @SideEffects( SystemOutSideEffect.class )
+    @Concerns( SimonSays.class )
+    public interface Manufacturer
+        extends Property<String>
+    {
+    }
+
+    public class SimonSays
+        extends ConcernOf<InvocationHandler>
+        implements InvocationHandler
+    {
+
+        public Object invoke( Object o, Method method, Object[] objects )
+            throws Throwable
+        {
+            Object result = next.invoke( o, method, objects );
+            if( result instanceof String )
+            {
+                return "Simon says: " + result;
+            }
+            return result;
+        }
+    }
+
+    public class SystemOutSideEffect
+        extends SideEffectOf<InvocationHandler>
+        implements InvocationHandler
+    {
+
+        public Object invoke( Object o, Method method, Object[] objects )
+            throws Throwable
+        {
+            try
+            {
+                Object result = this.result.invoke( o, method, objects );
+                if( result instanceof String )
+                {
+                    System.out.println( "[INFO] " + result );
+                }
+                return result;
+            }
+            catch( Exception e )
+            {
+                e.printStackTrace( System.out );
+                throw e;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tests/regression/src/main/java/org/apache/polygene/test/regression/Regressions.java
----------------------------------------------------------------------
diff --git a/tests/regression/src/main/java/org/apache/polygene/test/regression/Regressions.java b/tests/regression/src/main/java/org/apache/polygene/test/regression/Regressions.java
deleted file mode 100644
index 169017b..0000000
--- a/tests/regression/src/main/java/org/apache/polygene/test/regression/Regressions.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  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.
- *
- *
- */
-package org.apache.polygene.test.regression;
-
-/**
- * Placeholder class to prevent the build to fail when no source code.
- */
-public final class Regressions
-{
-    private Regressions()
-    {
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tests/regression/src/main/java/org/apache/polygene/test/regression/niclas2/ConcernsOnPropertyTest.java
----------------------------------------------------------------------
diff --git a/tests/regression/src/main/java/org/apache/polygene/test/regression/niclas2/ConcernsOnPropertyTest.java b/tests/regression/src/main/java/org/apache/polygene/test/regression/niclas2/ConcernsOnPropertyTest.java
deleted file mode 100644
index 1875a1e..0000000
--- a/tests/regression/src/main/java/org/apache/polygene/test/regression/niclas2/ConcernsOnPropertyTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *  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.
- *
- *
- */
-package org.apache.polygene.test.regression.niclas2;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import org.junit.Assert;
-import org.junit.Test;
-import org.apache.polygene.api.composite.TransientBuilder;
-import org.apache.polygene.api.composite.TransientComposite;
-import org.apache.polygene.api.concern.ConcernOf;
-import org.apache.polygene.api.concern.Concerns;
-import org.apache.polygene.api.property.Property;
-import org.apache.polygene.api.sideeffect.SideEffectOf;
-import org.apache.polygene.api.sideeffect.SideEffects;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.test.AbstractPolygeneTest;
-
-
-public class ConcernsOnPropertyTest
-    extends AbstractPolygeneTest
-{
-    public void assemble( ModuleAssembly module )
-        throws AssemblyException
-    {
-        module.transients( CarComposite.class );
-    }
-
-    @Test
-    public void whenConcernOnPropertyThenConcernIsInvoked()
-    {
-        TransientBuilder<Car> builder = transientBuilderFactory.newTransientBuilder( Car.class );
-        Car prototype = builder.prototypeFor( Car.class );
-        prototype.manufacturer().set( "Volvo" );
-        Car car = builder.newInstance();
-        Assert.assertEquals( "Concern on Property methods.", "Simon says: Volvo", car.manufacturer().get() );
-    }
-
-    public interface CarComposite
-        extends Car, TransientComposite
-    {
-    }
-
-    public interface Car
-    {
-        Manufacturer manufacturer();
-    }
-
-    @SideEffects( SystemOutSideEffect.class )
-    @Concerns( SimonSays.class )
-    public interface Manufacturer
-        extends Property<String>
-    {
-    }
-
-    public class SimonSays
-        extends ConcernOf<InvocationHandler>
-        implements InvocationHandler
-    {
-
-        public Object invoke( Object o, Method method, Object[] objects )
-            throws Throwable
-        {
-            Object result = next.invoke( o, method, objects );
-            if( result instanceof String )
-            {
-                return "Simon says: " + result;
-            }
-            return result;
-        }
-    }
-
-    public class SystemOutSideEffect
-        extends SideEffectOf<InvocationHandler>
-        implements InvocationHandler
-    {
-
-        public Object invoke( Object o, Method method, Object[] objects )
-            throws Throwable
-        {
-            try
-            {
-                Object result = this.result.invoke( o, method, objects );
-                if( result instanceof String )
-                {
-                    System.out.println( "[INFO] " + result );
-                }
-                return result;
-            }
-            catch( Exception e )
-            {
-                e.printStackTrace( System.out );
-                throw e;
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tests/unit/README.txt
----------------------------------------------------------------------
diff --git a/tests/unit/README.txt b/tests/unit/README.txt
deleted file mode 100644
index f3e97da..0000000
--- a/tests/unit/README.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-
-You will not find Unit Tests here.
-
-By the nature of unit tests, they are located near the actual code
-under src/test/java in each code source tree.
-
-

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tools/envisage/build.gradle
----------------------------------------------------------------------
diff --git a/tools/envisage/build.gradle b/tools/envisage/build.gradle
index 1ed01f5..edfac7a 100644
--- a/tools/envisage/build.gradle
+++ b/tools/envisage/build.gradle
@@ -1,5 +1,3 @@
-import org.apache.polygene.gradle.TaskGroups
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -19,6 +17,9 @@ import org.apache.polygene.gradle.TaskGroups
  *
  *
  */
+import org.apache.polygene.gradle.TaskGroups
+
+apply plugin: 'polygene-tool'
 
 description = "Visualizer of a Apache Polygene\u2122 Application Structure."
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tools/model-detail/build.gradle
----------------------------------------------------------------------
diff --git a/tools/model-detail/build.gradle b/tools/model-detail/build.gradle
index 65ac7b1..a97d179 100644
--- a/tools/model-detail/build.gradle
+++ b/tools/model-detail/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tool'
+
 description = "Detailled Model of a Apache Polygene\u2122 Application Structure."
 
 jar { manifest { name = "Apache Polygene\u2122 Model Detail" }}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tools/qidea/build.gradle
----------------------------------------------------------------------
diff --git a/tools/qidea/build.gradle b/tools/qidea/build.gradle
index 2383515..1be3352 100644
--- a/tools/qidea/build.gradle
+++ b/tools/qidea/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tool'
+
 description = "IntelliJ IDEA Plugin for Apache Polygene\u2122 development."
 
 jar { manifest { name = "Apache Polygene\u2122 IDEA plugin" }}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tools/shell/build.gradle
----------------------------------------------------------------------
diff --git a/tools/shell/build.gradle b/tools/shell/build.gradle
index 49397cf..1ec559f 100644
--- a/tools/shell/build.gradle
+++ b/tools/shell/build.gradle
@@ -18,6 +18,7 @@
  *
  */
 
+apply plugin: 'polygene-tool'
 apply plugin: 'application'
 
 description = "Command line tools for building Apache Polygene\u2122 applications."
@@ -30,6 +31,9 @@ jar {
   }
 }
 
+[ distZip, distTar ].each { dist -> dist.classifier = 'bin' }
+distTar.compression = Compression.GZIP
+
 dependencies {
   testRuntime libraries.logback
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tools/shell/src/dist/bin/polygene-boot
----------------------------------------------------------------------
diff --git a/tools/shell/src/dist/bin/polygene-boot b/tools/shell/src/dist/bin/polygene-boot
index 5c0306a..4fcc7d5 100644
--- a/tools/shell/src/dist/bin/polygene-boot
+++ b/tools/shell/src/dist/bin/polygene-boot
@@ -63,7 +63,7 @@ else
 
     # Figure out if we are executing from within the SDK or the QuickStart
     if [ -f libs/$JARNAME ] ; then
-        JARFILE=libs/$JARNAME
+        JARFILE=libs/org/apache/polygene/tools/org.apache.polygene.tool.shell/@version@/$JARNAME
     else
         if [ -f bin/$JARNAME ] ; then
             JARFILE=bin/$JARNAME

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tutorials/cargo/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/cargo/build.gradle b/tutorials/cargo/build.gradle
index ca2479f..1cbc50a 100644
--- a/tutorials/cargo/build.gradle
+++ b/tutorials/cargo/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tutorial'
+
 description = "Tutorial on how to convert existing application into a Apache Polygene\u2122 one, step-by-step."
 
 jar { manifest { name = "Apache Polygene\u2122 Tutorial - Cargo" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tutorials/composites/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/composites/build.gradle b/tutorials/composites/build.gradle
index 55b7a4f..ca1f6ee 100644
--- a/tutorials/composites/build.gradle
+++ b/tutorials/composites/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tutorial'
+
 description = "Basic tutorial on how to covert a simple 'Hello World' application to Apache Polygene\u2122, using more and more features for each step."
 
 jar { manifest { name = "Apache Polygene\u2122 Tutorial - Composites" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tutorials/hello/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/hello/build.gradle b/tutorials/hello/build.gradle
index ef714da..86e2fcc 100644
--- a/tutorials/hello/build.gradle
+++ b/tutorials/hello/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tutorial'
+
 description = "Basic tutorial on how to covert a simple 'Hello World' application to Apache Polygene\u2122, using more and more features for each step."
 
 jar { manifest { name = "Apache Polygene\u2122 Tutorial - Composites" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tutorials/introduction/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/introduction/build.gradle b/tutorials/introduction/build.gradle
index 35e231e..665d16f 100644
--- a/tutorials/introduction/build.gradle
+++ b/tutorials/introduction/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tutorial'
+
 description = "An Introduction to Apache Polygene\u2122 in its simplest form."
 
 jar { manifest { name = "Apache Polygene\u2122 Tutorial - Introduction" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tutorials/introduction/tenminutes/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/introduction/tenminutes/build.gradle b/tutorials/introduction/tenminutes/build.gradle
index 3cf3389..60092ea 100644
--- a/tutorials/introduction/tenminutes/build.gradle
+++ b/tutorials/introduction/tenminutes/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tutorial'
+
 description = "A 10-minute Introduction Tutorial to Apache Polygene\u2122 in its simplest form."
 
 jar { manifest { name = "Apache Polygene\u2122 Tutorial - 10 minute Introduction" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tutorials/introduction/thirtyminutes/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/introduction/thirtyminutes/build.gradle b/tutorials/introduction/thirtyminutes/build.gradle
index dc0eeba..ed2acc7 100644
--- a/tutorials/introduction/thirtyminutes/build.gradle
+++ b/tutorials/introduction/thirtyminutes/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tutorial'
+
 description = "A 30-minute Introduction Tutorial to Apache Polygene\u2122 in its simplest form."
 
 jar { manifest { name = "Apache Polygene\u2122 Tutorial - 30 minute Introduction" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tutorials/introduction/twominutes/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/introduction/twominutes/build.gradle b/tutorials/introduction/twominutes/build.gradle
index f953cd0..1158065 100644
--- a/tutorials/introduction/twominutes/build.gradle
+++ b/tutorials/introduction/twominutes/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tutorial'
+
 description = "A 2-minute Introduction Tutorial to Apache Polygene\u2122 in its simplest form."
 
 jar { manifest { name = "Apache Polygene\u2122 Tutorial - 2 minute Introduction" } }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/tutorials/services/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/services/build.gradle b/tutorials/services/build.gradle
index 116af6f..c863a54 100644
--- a/tutorials/services/build.gradle
+++ b/tutorials/services/build.gradle
@@ -18,6 +18,8 @@
  *
  */
 
+apply plugin: 'polygene-tutorial'
+
 description = "Tutorial on how to use Apache Polygene\u2122 service concept."
 
 jar { manifest { name = "Apache Polygene\u2122 Tutorial - Services" } }


[04/19] zest-java git commit: valueserialization: remove deprecated methods

Posted by pa...@apache.org.
valueserialization: remove deprecated methods


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

Branch: refs/heads/develop
Commit: c21df5fc6ea0b0ec3969a8c0e018173d3306f367
Parents: 13b387c
Author: Paul Merlin <pa...@apache.org>
Authored: Sat Dec 17 22:21:58 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sat Dec 17 22:21:58 2016 +0100

----------------------------------------------------------------------
 .../polygene/api/value/ValueSerializer.java     | 34 --------------------
 .../spi/value/ValueSerializerAdapter.java       | 27 ----------------
 2 files changed, 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/c21df5fc/core/api/src/main/java/org/apache/polygene/api/value/ValueSerializer.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/value/ValueSerializer.java b/core/api/src/main/java/org/apache/polygene/api/value/ValueSerializer.java
index f2c6138..736df9d 100644
--- a/core/api/src/main/java/org/apache/polygene/api/value/ValueSerializer.java
+++ b/core/api/src/main/java/org/apache/polygene/api/value/ValueSerializer.java
@@ -93,16 +93,6 @@ public interface ValueSerializer
     <T> Function<T, String> serialize( Options options );
 
     /**
-     * Factory method for a serialize function.
-     *
-     * @param <T> the parametrized function input type
-     * @param includeTypeInfo if type information should be included in the output
-     * @return a serialization function.
-     */
-    @Deprecated
-    <T> Function<T, String> serialize( boolean includeTypeInfo );
-
-    /**
      * Serialize the state of a value with type information.
      *
      * @param object an Object to serialize
@@ -124,18 +114,6 @@ public interface ValueSerializer
         throws ValueSerializationException;
 
     /**
-     * Serialize the state of a value.
-     *
-     * @param object an Object to serialize
-     * @param includeTypeInfo if type information should be included in the output
-     * @return the state
-     * @throws ValueSerializationException if the Value serialization failed
-     */
-    @Deprecated
-    String serialize( Object object, boolean includeTypeInfo )
-        throws ValueSerializationException;
-
-    /**
      * Serialize the state of a value with type information.
      *
      * @param object an Object to serialize
@@ -157,18 +135,6 @@ public interface ValueSerializer
         throws ValueSerializationException;
 
     /**
-     * Serialize the state of a value.
-     *
-     * @param object an Object to serialize
-     * @param output that will be used as output
-     * @param includeTypeInfo if type information should be included in the output
-     * @throws ValueSerializationException if the Value serialization failed
-     */
-    @Deprecated
-    void serialize( Object object, OutputStream output, boolean includeTypeInfo )
-        throws ValueSerializationException;
-
-    /**
      * Serialization options.
      */
     final class Options

http://git-wip-us.apache.org/repos/asf/zest-java/blob/c21df5fc/core/spi/src/main/java/org/apache/polygene/spi/value/ValueSerializerAdapter.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/value/ValueSerializerAdapter.java b/core/spi/src/main/java/org/apache/polygene/spi/value/ValueSerializerAdapter.java
index 67206bd..e9313b5 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/value/ValueSerializerAdapter.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/value/ValueSerializerAdapter.java
@@ -175,15 +175,6 @@ public abstract class ValueSerializerAdapter<OutputType>
     }
 
     @Override
-    @Deprecated
-    public final <T> Function<T, String> serialize( final boolean includeTypeInfo )
-    {
-        return object -> serialize(
-            includeTypeInfo ? new Options().withTypeInfo() : new Options().withoutTypeInfo(),
-            object );
-    }
-
-    @Override
     public final String serialize( Object object )
         throws ValueSerializationException
     {
@@ -211,15 +202,6 @@ public abstract class ValueSerializerAdapter<OutputType>
     }
 
     @Override
-    @Deprecated
-    public final String serialize( Object object, boolean includeTypeInfo )
-        throws ValueSerializationException
-    {
-        return serialize( includeTypeInfo ? new Options().withTypeInfo() : new Options().withoutTypeInfo(),
-                          object );
-    }
-
-    @Override
     public final void serialize( Object object, OutputStream output )
         throws ValueSerializationException
     {
@@ -244,15 +226,6 @@ public abstract class ValueSerializerAdapter<OutputType>
         }
     }
 
-    @Override
-    @Deprecated
-    public final void serialize( Object object, OutputStream output, boolean includeTypeInfo )
-        throws ValueSerializationException
-    {
-        serialize( includeTypeInfo ? new Options().withTypeInfo() : new Options().withoutTypeInfo(),
-                   object, output );
-    }
-
     private void serializeRoot( Options options, Object object, OutputStream output )
         throws Exception
     {


[11/19] zest-java git commit: build: do not publish intermediary projects

Posted by pa...@apache.org.
build: do not publish intermediary projects


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

Branch: refs/heads/develop
Commit: 90bc41c630604e3f0d11fefe990e4163dd273d9b
Parents: a504947
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Dec 18 01:43:42 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Dec 18 01:43:42 2016 +0100

----------------------------------------------------------------------
 .../polygene/gradle/AllProjectsPlugin.groovy    | 20 ++++++++++++-------
 .../polygene/gradle/RootProjectPlugin.groovy    | 21 +++++++++++++++-----
 2 files changed, 29 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/90bc41c6/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
index 07e3582..f890e46 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
@@ -50,17 +50,23 @@ class AllProjectsPlugin implements Plugin<Project>
     applyDefaultVersion( project )
     applyPolygeneExtension( project )
 
-    configureJava( project )
-    project.plugins.apply DependenciesPlugin
-    configureJavadoc( project )
-    configureTest( project )
+    if( project.rootProject == project || CodeProjectsPlugin.isCodeProject( project ) )
+    {
+      configureJava( project )
+      project.plugins.apply DependenciesPlugin
+      configureJavadoc( project )
+      configureTest( project )
+    }
     if( CodeProjectsPlugin.isCodeProject( project ) )
     {
       project.plugins.apply CodeProjectsPlugin
     }
-    configureDependencyReport( project )
-    configureHonker( project )
-    project.plugins.apply PublishingPlugin
+    if( project.rootProject == project || CodeProjectsPlugin.isCodeProject( project ) )
+    {
+      configureDependencyReport( project )
+      configureHonker( project )
+      project.plugins.apply PublishingPlugin
+    }
   }
 
   private static void applyDefaultVersion( Project project )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/90bc41c6/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
index 12f2601..a0de513 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
@@ -93,8 +93,12 @@ class RootProjectPlugin implements Plugin<Project>
     buildAll.group = TaskGroups.BUILD
     buildAll.description = 'Builds all'
     buildAll.dependsOn 'javadocs', 'check', 'jar',
-                       project.subprojects.collect { p -> p.tasks.getByName( 'dependencyReport' ) },
-                       project.subprojects.collect { p -> p.tasks.getByName( 'assemble' ) },
+                       project.subprojects
+                              .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
+                              .collect { p -> p.tasks.getByName( 'dependencyReport' ) },
+                       project.subprojects
+                              .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
+                              .collect { p -> p.tasks.getByName( 'assemble' ) },
                        ':manual:website'
   }
 
@@ -111,7 +115,9 @@ class RootProjectPlugin implements Plugin<Project>
     def task = project.tasks.create( 'coverageReport', AggregatedJacocoReportTask ) { AggregatedJacocoReportTask task ->
       task.group = TaskGroups.VERIFICATION
       task.description = 'Generates global coverage report'
-      task.dependsOn project.subprojects.collect( { Project p -> p.tasks.getByName( 'test' ) } )
+      task.dependsOn project.subprojects
+                            .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
+                            .collect( { Project p -> p.tasks.getByName( 'test' ) } )
     }
     project.tasks.getByName( 'check' ).dependsOn task
   }
@@ -122,7 +128,9 @@ class RootProjectPlugin implements Plugin<Project>
       task.group = TaskGroups.VERIFICATION
       task.description = 'Generates global test report'
       task.destinationDir = project.file( "$project.buildDir/reports/tests" )
-      task.reportOn project.subprojects.collect { it.tasks.getByName( 'test' ) }
+      task.reportOn project.subprojects
+                           .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
+                           .collect { it.tasks.getByName( 'test' ) }
     }
     def test = project.tasks.getByName( 'test' ) as Test
     test.dependsOn project.subprojects.collect { it.tasks.getByName( 'test' ) }
@@ -256,7 +264,10 @@ class RootProjectPlugin implements Plugin<Project>
                       'rat',
                       'archiveJavadocs',
                       ':org.apache.polygene.manual:copyWebsite',
-                      project.allprojects.collect { it.tasks.getByName( 'uploadArchives' ) },
+                      project.allprojects
+                             .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
+                             .collect { it.tasks.getByName( 'uploadArchives' ) },
+                      'uploadArchives',
                       'dist'
   }
 }


[16/19] zest-java git commit: build: detangle buildSrc

Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/VersionClassPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/VersionClassPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/VersionClassPlugin.groovy
new file mode 100644
index 0000000..345f25f
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/VersionClassPlugin.groovy
@@ -0,0 +1,94 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.code
+
+import groovy.transform.CompileStatic
+import java.nio.file.Files
+import org.apache.polygene.gradle.util.Licensing
+import org.gradle.api.Project
+import org.gradle.api.Plugin
+import org.gradle.api.Task
+import org.gradle.api.file.SourceDirectorySet
+import org.gradle.api.plugins.JavaPlugin
+import org.gradle.api.plugins.JavaPluginConvention
+import org.gradle.api.tasks.SourceSet
+import org.gradle.api.tasks.bundling.Jar
+
+// TODO Add build date, placeholder for dev versions
+// TODO Add git data, placeholders for dev versions
+@CompileStatic
+class VersionClassPlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.getPlugins().apply JavaPlugin.class
+    def genSrc = 'generated-src/version'
+    project.task( 'generateVersionClass' ) { Task task ->
+      def headerFile = project.rootProject.file 'etc/header.txt'
+      def generatedSrcDir = new File( project.buildDir, genSrc )
+      task.inputs.file headerFile
+      task.inputs.property 'projectVersion', project.version
+      task.inputs.property 'projectName', project.name
+      task.inputs.property 'projectGroup', project.group
+      task.outputs.file generatedSrcDir
+      task.doLast {
+        def publishedName = PublishNaming.publishedNameFor project.path
+        def packageName = "${ publishedName }".replace '-', '_'
+        def outFilename = "java/" + packageName.replace( '.', '/' ) + "/BuildVersion.java"
+        def outFile = new File( generatedSrcDir, outFilename )
+        Files.createDirectories outFile.parentFile.toPath()
+        outFile.withWriter( 'UTF-8' ) { BufferedWriter out ->
+          out.write Licensing.withLicenseHeader( headerFile.text, 'java' )
+          out.writeLine """
+        package ${ packageName };
+
+        /**
+         * Build version.
+         */
+        public interface BuildVersion
+        {
+            /** {@literal ${ project.group }}. */
+            String GROUP = \"${ project.group }\";
+        
+            /** {@literal ${ publishedName }}. */
+            String NAME = \"${ publishedName }\";
+        
+            /** {@literal ${ project.version }}. */
+            String VERSION = \"${ project.version }\";
+        
+            /** {@literal ${ project.group }:${ publishedName }:${ project.version }}. */
+            String GAV = GROUP + ':' + NAME + ':' + VERSION;
+        }
+        """.stripIndent().trim()
+        }
+      }
+    }
+    def sourceSets = project.convention.getPlugin( JavaPluginConvention ).sourceSets
+    sourceSets.create( "version" ) { SourceSet sourceSet ->
+      sourceSet.java { SourceDirectorySet dirSet ->
+        dirSet.srcDir project.buildDir.name + '/' + genSrc + '/java'
+      }
+    }
+    project.tasks.getByName( 'compileJava' ).dependsOn 'compileVersionJava'
+    project.tasks.getByName( 'compileVersionJava' ).dependsOn 'generateVersionClass'
+    project.tasks.getByName( 'jar' ) { Jar task ->
+      task.from sourceSets.getByName( 'version' ).output
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy
index c91f0b2..b9dc1e0 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationExtension.groovy
@@ -18,9 +18,9 @@
 package org.apache.polygene.gradle.dependencies
 
 import groovy.transform.CompileStatic
+import java.util.function.BiConsumer
 import org.gradle.api.artifacts.DependencySubstitution
 import org.gradle.api.artifacts.component.ModuleComponentSelector
-import org.gradle.internal.BiAction
 
 @CompileStatic
 class DependenciesDeclarationExtension
@@ -28,6 +28,6 @@ class DependenciesDeclarationExtension
   final Map<String, String> repositoriesUrls = [ : ]
   final Map<String, Object> libraries = [ : ]
   final Map<String, List<Object>> defaultDependencies = [ : ]
-  BiAction<DependencySubstitution, ModuleComponentSelector> dependencySubstitutionSpec
+  BiConsumer<DependencySubstitution, ModuleComponentSelector> dependencySubstitutionSpec
   final Map<String, String> buildToolsVersions = [ : ]
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationPlugin.groovy
index cb90182..73cb4d5 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDeclarationPlugin.groovy
@@ -17,9 +17,11 @@
  */
 package org.apache.polygene.gradle.dependencies
 
+import groovy.transform.CompileStatic
 import org.gradle.api.Plugin
 import org.gradle.api.Project
 
+@CompileStatic
 class DependenciesDeclarationPlugin implements Plugin<Project>
 {
   @Override

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDownloadTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDownloadTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDownloadTask.groovy
new file mode 100644
index 0000000..78230ea
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesDownloadTask.groovy
@@ -0,0 +1,34 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.dependencies
+
+import groovy.transform.CompileStatic
+import org.gradle.api.DefaultTask
+import org.gradle.api.artifacts.Configuration
+import org.gradle.api.tasks.TaskAction
+
+@CompileStatic
+class DependenciesDownloadTask extends DefaultTask
+{
+  @TaskAction
+  void downloadAllDependencies()
+  {
+    def allConfigurations = project.allprojects.collect { it.configurations }.flatten() as Set<Configuration>
+    allConfigurations*.resolvedConfiguration
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesPlugin.groovy
index 660406d..42b44b9 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/DependenciesPlugin.groovy
@@ -18,9 +18,11 @@
 package org.apache.polygene.gradle.dependencies
 
 import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.TaskGroups
 import org.gradle.api.Action
 import org.gradle.api.Plugin
 import org.gradle.api.Project
+import org.gradle.api.Task
 import org.gradle.api.artifacts.Configuration
 import org.gradle.api.artifacts.DependencySubstitution
 import org.gradle.api.artifacts.component.ModuleComponentSelector
@@ -29,14 +31,19 @@ import org.gradle.api.artifacts.repositories.MavenArtifactRepository
 @CompileStatic
 class DependenciesPlugin implements Plugin<Project>
 {
+  static class TaskNames
+  {
+    static final String DOWNLOAD_DEPENDENCIES = 'downloadDependencies'
+  }
+
   @Override
   void apply( final Project project )
   {
-    def dependenciesDeclaration = project.rootProject.extensions.getByType( DependenciesDeclarationExtension )
-    applyRepositories( project, dependenciesDeclaration )
-    applyLibraries( project, dependenciesDeclaration )
-    applyDependencyResolutionRules( project, dependenciesDeclaration )
-    applyDefaultDependencies( project, dependenciesDeclaration )
+    def dependenciesDeclaration = project.rootProject.extensions.getByType DependenciesDeclarationExtension
+    applyRepositories project, dependenciesDeclaration
+    applyLibraries project, dependenciesDeclaration
+    applyDependencyResolutionRules project, dependenciesDeclaration
+    applyDependenciesDownloadTask project
   }
 
   private static void applyRepositories( Project project, DependenciesDeclarationExtension declaration )
@@ -54,36 +61,32 @@ class DependenciesPlugin implements Plugin<Project>
     project.extensions.extraProperties.set 'libraries', declaration.libraries
   }
 
-  private static void applyDependencyResolutionRules( Project project, DependenciesDeclarationExtension declaration )
+  static void applyDependencyResolutionRules( Project project, DependenciesDeclarationExtension declaration )
   {
     project.configurations.all(
       { Configuration configuration ->
-        configuration.resolutionStrategy.dependencySubstitution.all(
-          { DependencySubstitution dep ->
-            if( dep.requested instanceof ModuleComponentSelector )
-            {
-              def selector = dep.requested as ModuleComponentSelector
-              declaration.dependencySubstitutionSpec.execute dep, selector
-            }
-          } as Action<DependencySubstitution> )
+        applyDependencyResolutionRules configuration, declaration
       } as Action<Configuration> )
   }
 
-  private static void applyDefaultDependencies( Project project, DependenciesDeclarationExtension declaration )
+  static void applyDependencyResolutionRules( Configuration configuration,
+                                                     DependenciesDeclarationExtension declaration )
   {
-    declaration.defaultDependencies.each { String configuration, List<Object> dependencies ->
-      dependencies.each { dependency ->
-        if( dependency instanceof Collection )
-        {
-          dependency.each { subdep ->
-            project.dependencies.add( configuration, subdep )
-          }
-        }
-        else
+    configuration.resolutionStrategy.dependencySubstitution.all(
+      { DependencySubstitution dep ->
+        if( dep.requested instanceof ModuleComponentSelector )
         {
-          project.dependencies.add( configuration, dependency )
+          def selector = dep.requested as ModuleComponentSelector
+          declaration.dependencySubstitutionSpec.accept dep, selector
         }
-      }
+      } as Action<DependencySubstitution> )
+  }
+
+  private static void applyDependenciesDownloadTask( Project project )
+  {
+    project.tasks.create( TaskNames.DOWNLOAD_DEPENDENCIES, DependenciesDownloadTask ) { Task task ->
+      task.group = TaskGroups.HELP
+      task.description = 'Download all dependencies'
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/PolygeneExtension.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/PolygeneExtension.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/PolygeneExtension.groovy
new file mode 100644
index 0000000..435f278
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dependencies/PolygeneExtension.groovy
@@ -0,0 +1,69 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.dependencies
+
+import groovy.transform.CompileStatic
+import org.gradle.api.Project
+import org.gradle.api.artifacts.Dependency
+
+@CompileStatic
+class PolygeneExtension
+{
+  private final Project project
+  final Core core
+
+  PolygeneExtension( Project project )
+  {
+    this.project = project
+    this.core = new Core()
+  }
+
+  class Core
+  {
+    Dependency api = core( 'api' )
+    Dependency spi = core( 'spi' )
+    Dependency runtime = core( 'runtime' )
+    Dependency bootstrap = core( 'bootstrap' )
+    Dependency testsupport = core( 'testsupport' )
+  }
+
+  private Dependency core( String name )
+  {
+    return dependency( 'core', name )
+  }
+
+  Dependency library( String name )
+  {
+    return dependency( 'libraries', name )
+  }
+
+  Dependency extension( String name )
+  {
+    return dependency( 'extensions', name )
+  }
+
+  Dependency tool( String name )
+  {
+    return dependency( 'tools', name )
+  }
+
+  private Dependency dependency( String group, String name )
+  {
+    project.dependencies.project( path: ":$group:$name" )
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/dist/DistributionPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dist/DistributionPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dist/DistributionPlugin.groovy
deleted file mode 100644
index 0a4a49b..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dist/DistributionPlugin.groovy
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.dist
-
-import groovy.transform.CompileStatic
-import groovy.transform.TypeCheckingMode
-import org.apache.rat.gradle.RatTask
-import org.apache.tools.ant.filters.ReplaceTokens
-import org.apache.polygene.gradle.RootProjectPlugin
-import org.apache.polygene.gradle.TaskGroups
-import org.apache.polygene.gradle.dependencies.DependenciesDeclarationExtension
-import org.apache.polygene.gradle.release.ReleaseSpecExtension
-import org.apache.polygene.gradle.release.ReleaseSpecPlugin
-import org.gradle.api.Action
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.Task
-import org.gradle.api.file.CopySpec
-import org.gradle.api.file.FileCopyDetails
-import org.gradle.api.tasks.Copy
-import org.gradle.api.tasks.GradleBuild
-import org.gradle.api.tasks.bundling.Compression
-import org.gradle.api.tasks.bundling.Tar
-import org.gradle.api.tasks.bundling.Zip
-
-@CompileStatic
-class DistributionPlugin implements Plugin<Project>
-{
-  static class TaskNames
-  {
-    static final String UNPACK_SOURCE_DIST = 'unpackSrcDist'
-    static final String UNPACK_BINARY_DIST = 'unpackBinDist'
-    static final String CHECK_SOURCE_DIST = 'checkSrcDist'
-    static final String CHECK_BINARY_DIST = 'checkBinDist'
-    static final String CHECK_BINARY_DIST_RAT = 'checkBinDist_rat'
-    static final String GENERATE_MAVEN_OFFLINE_HELPERS = 'generateMavenGoOfflineHelpers'
-    static final String GENERATE_GRADLE_OFFLINE_HELPERS = 'generateGradleGoOfflineHelpers'
-    static final String CHECK_MAVEN_OFFLINE_HELPERS = 'checkMavenGoOfflineHelpers'
-    static final String CHECK_GRADLE_OFFLINE_HELPERS = 'checkGradleGoOfflineHelpers'
-  }
-
-  @Override
-  void apply( final Project project )
-  {
-    configureSourceDistribution( project )
-    configureBinaryDistribution( project )
-    configureDistributionChecksums( project )
-    configureHelperTasks( project )
-  }
-
-  private static void configureSourceDistribution( Project project )
-  {
-    def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
-    def srcDistFilesCopySpec = project.copySpec { CopySpec spec ->
-      spec.from '.'
-      spec.include '*.txt'
-      spec.include 'doap.rdf'
-      spec.include '*.gradle'
-      spec.include 'gradlew*'
-      spec.include 'gradle/**'
-      spec.include 'etc/**'
-      spec.include 'buildSrc/**'
-      spec.include 'src/**'
-      releaseSpec.approvedProjects.each { p ->
-        def relPath = new File( project.projectDir.toURI().relativize( p.projectDir.toURI() ).toString() )
-        spec.include "$relPath/**"
-      }
-      spec.include 'manual/**'
-      spec.include 'samples/**'
-      spec.include 'tests/**'
-      spec.include 'tutorials/**'
-      spec.include 'tools/shell/**'
-      // Filtered, see below
-      spec.exclude 'settings.gradle'
-      spec.exclude 'gradle.properties'
-      // Excludes
-      spec.exclude '**/build/**'             // Build output
-      spec.exclude 'derby.log'               // Derby test garbage
-      spec.exclude '**/*.iml'                // IDEA files
-      spec.exclude '**/*.ipr'                // IDEA files
-      spec.exclude '**/*.iws'                // IDEA files
-      spec.exclude '**/.idea'                // IDEA files
-      spec.exclude '**/out/**'               // IDEA build output
-      spec.exclude '**/.classpath'           // Eclipse files
-      spec.exclude '**/.project'             // Eclipse files
-      spec.exclude '**/.settings'            // Eclipse files
-      spec.exclude '**/.nb-gradle/**'        // Netbeans files
-      spec.exclude '**/.nb-gradle*'          // Netbeans files
-      spec.exclude '**/.git/**'              // Git directories
-      spec.exclude '**/.git*'                // Git files
-      spec.exclude '**/.gradle/**'           // Gradle management files
-      spec.exclude '**/.gradletasknamecache' // Gradle cache
-      spec.into '.'
-    }
-    def srcDistFilteredFilesTask = project.tasks.create( 'srcDistFilteredFiles' )
-    srcDistFilteredFilesTask.description = 'Apply release specification to source distribution build scripts'
-    // Generates various files for the source distribution
-    // - settings.gradle
-    // - gradle.properties to set version !
-    def filteredDir = new File( "$project.buildDir/tmp/srcDistFilteredFiles" )
-    srcDistFilteredFilesTask.outputs.file filteredDir
-    srcDistFilteredFilesTask.doLast {
-      // Settings
-      def settingsFile = new File( filteredDir, 'settings.gradle' )
-      settingsFile.parentFile.mkdirs()
-      def filteredSettings = ''
-      project.file( 'settings.gradle' ).readLines().each { line ->
-        if( line.contains( '\'libraries:' ) || line.contains( '\'extensions:' ) || line.contains( '\'tools:' ) )
-        {
-          def accepted = false
-          releaseSpec.approvedProjects.collect { it.projectDir }.each { acceptedProjectDir ->
-            if( line.contains( "'${ acceptedProjectDir.parentFile.name }:${ acceptedProjectDir.name }'" ) )
-            {
-              accepted = true
-            }
-          }
-          if( accepted )
-          {
-            filteredSettings += "$line\n"
-          }
-        }
-        else
-        {
-          filteredSettings += "$line\n"
-        }
-      }
-      settingsFile.text = filteredSettings
-      // gradle.properties
-      def gradlePropsFile = new File( filteredDir, 'gradle.properties' )
-      gradlePropsFile.parentFile.mkdirs()
-      gradlePropsFile.text = project.file( 'gradle.properties' ).text +
-                             "\nskipSigning=true\nskipAsciidocIfAbsent=true\n\nversion=$project.version\n"
-    }
-    def srcDistFilteredFilesCopySpec = project.copySpec { CopySpec spec ->
-      spec.from srcDistFilteredFilesTask
-      spec.into '.'
-    }
-    def srcDistCopySpec = project.copySpec { CopySpec spec ->
-      spec.into "apache-polygene-java-$project.version-src"
-      spec.with srcDistFilesCopySpec
-      spec.with srcDistFilteredFilesCopySpec
-    }
-
-    def zipSources = project.tasks.create( 'zipSources', Zip ) { Zip task ->
-      task.group = TaskGroups.DISTRIBUTION
-      task.description = 'Assemble .zip source distribution'
-      task.baseName = 'apache-polygene-java'
-      task.with srcDistCopySpec
-      task.classifier = 'src'
-    }
-    def tarSources = project.tasks.create( 'tarSources', Tar ) { Tar task ->
-      task.group = TaskGroups.DISTRIBUTION
-      task.description = 'Assemble .tar.gz source distribution'
-      task.baseName = 'apache-polygene-java'
-      task.with srcDistCopySpec
-      task.compression = Compression.GZIP
-      task.classifier = 'src'
-    }
-    project.artifacts.add( 'archives', zipSources )
-    project.artifacts.add( 'archives', tarSources )
-
-    project.tasks.create( TaskNames.UNPACK_SOURCE_DIST, Copy ) { Copy task ->
-      task.group = TaskGroups.DISTRIBUTION
-      task.description = "Unpack source distribution"
-      task.with srcDistCopySpec
-      task.into 'build/unpacked-distributions/src'
-    }
-
-    def unpackedSrcDistDir = project.file( "build/unpacked-distributions/src/apache-polygene-java-$project.version-src" )
-    project.tasks.create( TaskNames.CHECK_SOURCE_DIST, GradleBuild.class, { GradleBuild task ->
-      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
-      task.description = "Check the source distribution by running the 'check' and 'assemble' tasks inside"
-      task.dependsOn TaskNames.UNPACK_SOURCE_DIST
-      task.buildFile = "$unpackedSrcDistDir/build.gradle"
-      task.tasks = [ 'check', 'assemble' ]
-    } as Action<GradleBuild> )
-  }
-
-  private static void configureBinaryDistribution( Project project )
-  {
-    configureGoOfflineHelpers( project )
-
-    def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
-    def reportsDistCopySpec = project.copySpec { CopySpec spec ->
-      spec.from "$project.buildDir/reports"
-      spec.into 'docs/reports'
-    }
-    def docsCopySpec = project.copySpec { CopySpec spec ->
-      spec.from 'build/docs'
-      spec.from 'manual/build/docs/website'
-      spec.into 'docs'
-    }
-    def runtimeDependenciesListCopySpec = project.copySpec { CopySpec spec ->
-      releaseSpec.approvedProjects.collect { p ->
-        spec.into( 'libs/' ) { CopySpec sub ->
-          sub.from "$p.buildDir/reports/project/dependencies.txt"
-          sub.rename 'dependencies.txt', "${ p.name }-${ p.version }-runtime-deps.txt"
-        }
-      }
-      spec.into( '.' ) { CopySpec sub ->
-        sub.from project.tasks.getByName( TaskNames.GENERATE_MAVEN_OFFLINE_HELPERS ).outputs
-        sub.from project.tasks.getByName( TaskNames.GENERATE_GRADLE_OFFLINE_HELPERS ).outputs
-      }
-    }
-    def libsCopySpec = project.copySpec { CopySpec spec ->
-      releaseSpec.approvedProjects.collect { proj ->
-        spec.into( 'libs/' ) { CopySpec sub ->
-          sub.from proj.configurations.getByName( 'archives' ).artifacts.files
-          sub.exclude '**-testsources.jar'
-          sub.exclude '**/*.asc'
-        }
-      }
-    }
-    def extraDistTextCopySpec = project.copySpec { CopySpec spec ->
-      releaseSpec.approvedProjects.collect { p ->
-        spec.from project.fileTree( dir: "$p.projectDir/src/dist/", include: '**', exclude: "**/*.jar*" )
-        spec.eachFile { FileCopyDetails fcd ->
-          fcd.filter( ReplaceTokens, tokens: [ version: project.version ] )
-        }
-      }
-      spec.into '.'
-    }
-    def extraDistBinCopySpec = project.copySpec { CopySpec spec ->
-      releaseSpec.approvedProjects.collect { p ->
-        spec.from "$p.projectDir/src/dist/"
-        spec.include '**/*.jar'
-        spec.include '**/*.jar_'
-      }
-      spec.into '.'
-    }
-    def binDistNoticesCopySpec = project.copySpec { CopySpec spec ->
-      spec.from "$project.projectDir/LICENSE.txt"
-      spec.from "$project.projectDir/src/bin-dist"
-      spec.into '.'
-    }
-    def binDistImage = project.copySpec { CopySpec spec ->
-      spec.into "apache-polygene-java-$project.version-bin"
-      spec.with binDistNoticesCopySpec
-      spec.with docsCopySpec
-      spec.with reportsDistCopySpec
-      spec.with runtimeDependenciesListCopySpec
-      spec.with extraDistTextCopySpec
-      spec.with extraDistBinCopySpec
-      spec.with libsCopySpec
-    }
-
-    def zipBinaries = project.tasks.create( 'zipBinaries', Zip ) { Zip task ->
-      task.group = TaskGroups.DISTRIBUTION
-      task.description = 'Assemble .zip binary distribution'
-      task.dependsOn project.tasks.getByName( RootProjectPlugin.TaskNames.BUILD_ALL )
-      task.baseName = 'apache-polygene-java'
-      task.classifier = 'bin'
-      task.with binDistImage
-    }
-    def tarBinaries = project.tasks.create( 'tarBinaries', Tar ) { Tar task ->
-      task.group = TaskGroups.DISTRIBUTION
-      task.description = 'Assemble .tar.gz binary distribution'
-      task.dependsOn project.tasks.getByName( RootProjectPlugin.TaskNames.BUILD_ALL )
-      task.baseName = 'apache-polygene-java'
-      task.classifier = 'bin'
-      task.compression = Compression.GZIP
-      task.with binDistImage
-    }
-    project.artifacts.add( 'archives', zipBinaries )
-    project.artifacts.add( 'archives', tarBinaries )
-
-    project.tasks.create( TaskNames.UNPACK_BINARY_DIST, Copy ) { Copy task ->
-      task.group = TaskGroups.DISTRIBUTION
-      task.description = "Unpack binary distribution"
-      task.with binDistImage
-      task.into 'build/unpacked-distributions/bin'
-    }
-
-    configureBinaryDistributionCheck( project )
-  }
-
-  private static void configureGoOfflineHelpers( Project project )
-  {
-    def externalRepos = project.rootProject.extensions.getByType( DependenciesDeclarationExtension ).repositoriesUrls
-    def approvedProjectsTask = project.tasks.getByName( ReleaseSpecPlugin.TaskNames.RELEASE_APPROVED_PROJECTS )
-    def genOfflineMaven = project.tasks.create( TaskNames.GENERATE_MAVEN_OFFLINE_HELPERS,
-                                                GoOfflineHelpersTasks.GenerateMaven )
-    def genOfflineGradle = project.tasks.create( TaskNames.GENERATE_GRADLE_OFFLINE_HELPERS,
-                                                 GoOfflineHelpersTasks.GenerateGradle )
-    genOfflineMaven.repositories = externalRepos
-    genOfflineGradle.repositories = externalRepos
-    [ genOfflineMaven, genOfflineGradle ].each { task ->
-      task.group = TaskGroups.DISTRIBUTION
-      task.dependsOn approvedProjectsTask
-    }
-    def checkOfflineMaven = project.tasks.create( TaskNames.CHECK_MAVEN_OFFLINE_HELPERS,
-                                                  GoOfflineHelpersTasks.CheckMaven )
-    checkOfflineMaven.group = TaskGroups.DISTRIBUTION_VERIFICATION
-    checkOfflineMaven.description = 'Check binary distribution Maven dependencies download helper'
-    checkOfflineMaven.dependsOn genOfflineMaven
-    def checkOfflineGradle = project.tasks.create( TaskNames.CHECK_GRADLE_OFFLINE_HELPERS,
-                                                   GoOfflineHelpersTasks.CheckGradle )
-    checkOfflineGradle.group = TaskGroups.DISTRIBUTION_VERIFICATION
-    checkOfflineGradle.description = 'Check binary distribution Gradle dependencies download helper'
-    checkOfflineGradle.dependsOn genOfflineGradle
-    [ checkOfflineMaven, checkOfflineGradle ].each { task ->
-      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
-      task.dependsOn TaskNames.UNPACK_BINARY_DIST
-    }
-  }
-
-  private static void configureBinaryDistributionCheck( Project project )
-  {
-    def unpackedBinDistDir = project.file( "build/unpacked-distributions/bin/apache-polygene-java-$project.version-bin" )
-    project.tasks.create( TaskNames.CHECK_BINARY_DIST_RAT, RatTask, { RatTask task ->
-      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
-      task.description = "Checks binary distribution using Apache RAT"
-      task.dependsOn TaskNames.UNPACK_BINARY_DIST
-      task.inputDir = unpackedBinDistDir.absolutePath
-      task.reportDir = project.file( 'build/reports/rat-bin-dist' )
-      task.excludes = [
-        '.gradle/**',
-        'docs/reports/**',
-        'docs/javadocs/**',
-        'etc/templates/**',
-        'libs/**'
-      ]
-    } as Action<RatTask> )
-    project.tasks.getByName( TaskNames.CHECK_MAVEN_OFFLINE_HELPERS ) { GoOfflineHelpersTasks.CheckMaven task ->
-      task.directory = unpackedBinDistDir
-    }
-    project.tasks.getByName( TaskNames.CHECK_GRADLE_OFFLINE_HELPERS ) { GoOfflineHelpersTasks.CheckGradle task ->
-      task.directory = unpackedBinDistDir
-      task.mustRunAfter TaskNames.CHECK_MAVEN_OFFLINE_HELPERS
-    }
-    project.tasks.create( TaskNames.CHECK_BINARY_DIST ) { Task task ->
-      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
-      task.description = 'Checks binary distribution'
-      task.dependsOn TaskNames.CHECK_BINARY_DIST_RAT
-      task.dependsOn TaskNames.CHECK_MAVEN_OFFLINE_HELPERS
-      task.dependsOn TaskNames.CHECK_GRADLE_OFFLINE_HELPERS
-    }
-  }
-
-  @CompileStatic( TypeCheckingMode.SKIP )
-  private static void configureDistributionChecksums( Project project )
-  {
-    project.tasks.withType( Zip ) { Zip task ->
-      task.doLast {
-        project.ant.checksum file: task.archivePath, algorithm: 'MD5'
-        project.ant.checksum file: task.archivePath, algorithm: 'SHA-512'
-      }
-    }
-    project.tasks.withType( Tar ) { Tar task ->
-      task.doLast {
-        project.ant.checksum file: task.archivePath, algorithm: 'MD5'
-        project.ant.checksum file: task.archivePath, algorithm: 'SHA-512'
-      }
-    }
-  }
-
-  private static void configureHelperTasks( Project project )
-  {
-    project.tasks.create( 'dist', Copy ) { Copy task ->
-      task.group = TaskGroups.DISTRIBUTION
-      task.description = "Assembles source and binary distributions"
-      task.dependsOn 'install'
-      task.from project.tasks.getByName( 'unpackBinDist' )
-      task.into "$project.buildDir/dist"
-    }
-    project.tasks.create( 'checkDists' ) { Task task ->
-      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
-      task.description = "Checks source and binary distributions"
-      task.dependsOn TaskNames.CHECK_SOURCE_DIST, TaskNames.CHECK_BINARY_DIST
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/dist/GoOfflineHelpersTasks.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dist/GoOfflineHelpersTasks.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/dist/GoOfflineHelpersTasks.groovy
deleted file mode 100644
index 415a0bb..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/dist/GoOfflineHelpersTasks.groovy
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.dist
-
-import groovy.transform.CompileStatic
-import org.apache.polygene.gradle.release.ReleaseSpecExtension
-import org.apache.polygene.gradle.tasks.ExecLogged
-import org.gradle.api.DefaultTask
-import org.gradle.api.GradleException
-import org.gradle.api.Project
-import org.gradle.api.artifacts.Dependency
-import org.gradle.api.artifacts.ProjectDependency
-import org.gradle.api.artifacts.result.ResolvedComponentResult
-import org.gradle.api.tasks.Input
-import org.gradle.api.tasks.InputFile
-import org.gradle.api.tasks.Internal
-import org.gradle.api.tasks.OutputFile
-import org.gradle.api.tasks.TaskAction
-import org.gradle.process.ExecSpec
-
-/**
- * Tasks to generate and check go-offline maven and gradle helpers bundled with the binary distribution.
- */
-@CompileStatic
-interface GoOfflineHelpersTasks
-{
-  class GenerateMaven extends DefaultTask
-  {
-    static final String POM_FILENAME = 'go-offline.pom'
-
-    @Input
-    Map<String, String> repositories = [ : ]
-
-    @Internal
-    File outputDir = new File( project.buildDir, 'go-offline-helpers' )
-
-    @OutputFile
-    File getMavenGoOfflineHelper()
-    {
-      return new File( outputDir, POM_FILENAME )
-    }
-
-    GenerateMaven()
-    {
-      super();
-      outputs.upToDateWhen { false }
-    }
-
-    @TaskAction
-    void generate()
-    {
-      outputDir.mkdirs()
-      def components = Utils.resolveAllRuntimeComponents( project )
-      def maven = generateMaven( components )
-      mavenGoOfflineHelper.text = maven
-    }
-
-    private String generateMaven( Set<ResolvedComponentResult> components )
-    {
-      def pom = Utils.licenseHeader( project.file( 'etc/header.txt' ).text, 'xml' )
-      pom += '<project>\n  <modelVersion>4.0.0</modelVersion>\n'
-      pom +=
-        "  <groupId>org.apache.polygene</groupId>\n  <artifactId>go-offline-helper</artifactId>\n  <version>$project.version</version>\n"
-      pom += '  <packaging>pom</packaging>\n'
-      pom +=
-        '  <!--\n  This pom has the sole purpose of downloading all dependencies in a directory relative to this file named \'dependencies\'.\n'
-      pom += "  Use the following command:\n\n  mvn -f $POM_FILENAME validate\n  -->\n  <repositories>\n"
-      repositories.entrySet().each { repo ->
-        pom += "    <repository><id>go-offline-repo-$repo.key</id><url>${ repo.value }</url></repository>\n"
-      }
-      pom += '  </repositories>\n  <dependencies>\n'
-      components.each { comp ->
-        pom += '    <dependency>\n'
-        pom += "      <groupId>$comp.moduleVersion.group</groupId>\n"
-        pom += "      <artifactId>$comp.moduleVersion.name</artifactId>\n"
-        pom += "      <version>$comp.moduleVersion.version</version>\n"
-        pom += '    </dependency>\n'
-      }
-      pom += """  </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-jars</id><phase>validate</phase>
-        <goals><goal>copy-dependencies</goal></goals>
-        <configuration>
-          <outputDirectory>\${project.basedir}/dependencies</outputDirectory>
-          <excludeTransitive>true</excludeTransitive>
-        </configuration>
-      </execution>
-      <execution>
-        <id>go-offline-sources</id><phase>validate</phase>
-        <goals><goal>copy-dependencies</goal></goals>
-        <configuration>
-          <classifier>sources</classifier><failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
-          <outputDirectory>\${project.basedir}/dependencies</outputDirectory>
-          <excludeTransitive>true</excludeTransitive>
-        </configuration>
-      </execution>
-      <execution>
-        <id>go-offline-javadocs</id><phase>validate</phase>
-        <goals><goal>copy-dependencies</goal></goals>
-        <configuration>
-          <classifier>javadoc</classifier><failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
-          <outputDirectory>\${project.basedir}/dependencies</outputDirectory>
-          <excludeTransitive>true</excludeTransitive>
-        </configuration>
-      </execution>
-    </executions>
-  </plugin></plugins></build>
-</project>
-"""
-      return pom
-    }
-  }
-
-  class GenerateGradle extends DefaultTask
-  {
-    static final String BUILD_SCRIPT_FILENAME = 'go-offline.gradle'
-
-    @Input
-    Map<String, String> repositories = [ : ]
-
-    @Internal
-    File outputDir = new File( project.buildDir, 'go-offline-helpers' )
-
-    @OutputFile
-    File getGradleGoOfflineHelper()
-    {
-      return new File( outputDir, BUILD_SCRIPT_FILENAME )
-    }
-
-    GenerateGradle()
-    {
-      super();
-      outputs.upToDateWhen { false }
-    }
-
-    @TaskAction
-    void generate()
-    {
-      outputDir.mkdirs()
-      def components = Utils.resolveAllRuntimeComponents( project )
-      def gradle = generateGradle( components )
-      gradleGoOfflineHelper.text = gradle
-    }
-
-    private String generateGradle( Set<ResolvedComponentResult> components )
-    {
-      def build = Utils.licenseHeader( project.file( 'etc/header.txt' ).text, 'java' )
-      build += '// This gradle build file has the sole purpose of downloading all dependencies in a directory\n'
-      build += '// relative to this file named \'dependencies\'.\n'
-      build += "// Use the following command: gradle -b $BUILD_SCRIPT_FILENAME download\n"
-      build += 'apply plugin: \'java\'\nconfigurations { download }\nrepositories {\n'
-      repositories.entrySet().each { repo ->
-        build += "  maven { url '${ repo.value }' }\n"
-      }
-      build += '}\ndependencies {\n'
-      components.each { comp ->
-        def depCoords = "${ comp.moduleVersion.group }:${ comp.moduleVersion.name }:${ comp.moduleVersion.version }"
-        build += "  download( '$depCoords' ) { transitive = false }\n"
-      }
-      build += """}
-task download( type: Copy ) {
-  outputs.upToDateWhen { false }
-  def sources = configurations.download.resolvedConfiguration.resolvedArtifacts.collect { artifact ->
-    project.dependencies.create( [ group: artifact.moduleVersion.id.group, name: artifact.moduleVersion.id.name, version: artifact.moduleVersion.id.version, classifier: 'sources' ] )
-  }
-  def javadocs = configurations.download.resolvedConfiguration.resolvedArtifacts.collect { artifact ->
-    project.dependencies.create( [ group: artifact.moduleVersion.id.group, name: artifact.moduleVersion.id.name, version: artifact.moduleVersion.id.version, classifier: 'javadoc' ] )
-  }
-  from configurations.download
-  from configurations.detachedConfiguration( sources as Dependency[] ).resolvedConfiguration.lenientConfiguration.getFiles( Specs.SATISFIES_ALL )
-  from configurations.detachedConfiguration( javadocs as Dependency[] ).resolvedConfiguration.lenientConfiguration.getFiles( Specs.SATISFIES_ALL )
-  into file( 'dependencies/' )
-}
-"""
-      return build
-    }
-  }
-
-  class CheckMaven extends DefaultTask
-  {
-    @Internal
-    File directory
-
-    @InputFile
-    File getMavenGoOfflineHelper()
-    {
-      return new File( directory, GenerateMaven.POM_FILENAME )
-    }
-
-    CheckMaven()
-    {
-      super();
-      description = 'Check the binary distribution Maven go-offline helper'
-      outputs.upToDateWhen { false }
-      onlyIf { Utils.isMvnInstalled() }
-    }
-
-    @TaskAction
-    void check()
-    {
-      def dependenciesDir = new File( directory, 'dependencies' )
-      project.delete dependenciesDir
-      def outLog = project.file( "$project.buildDir/tmp/$name/stdout.log" )
-      def errLog = project.file( "$project.buildDir/tmp/$name/stderr.log" )
-      def command = [ 'mvn', '-e', '-f', GenerateMaven.POM_FILENAME, 'validate' ] as Object[]
-      ExecLogged.execLogged( project, outLog, errLog ) { ExecSpec spec ->
-        spec.workingDir directory
-        spec.commandLine command
-      }
-      Utils.checkAllJarsArePresent( project, dependenciesDir, GenerateMaven.POM_FILENAME )
-    }
-  }
-
-  class CheckGradle extends DefaultTask
-  {
-    @Internal
-    File directory
-
-    @InputFile
-    File getGradleGoOfflineHelper()
-    {
-      return new File( directory, GenerateGradle.BUILD_SCRIPT_FILENAME )
-    }
-
-    CheckGradle()
-    {
-      super();
-      description = 'Check the binary distribution Gradle go-offline helper'
-      outputs.upToDateWhen { false }
-    }
-
-    @TaskAction
-    void check()
-    {
-      def buildScript = new File( directory, GenerateGradle.BUILD_SCRIPT_FILENAME )
-      def dependenciesDir = new File( directory, 'dependencies' )
-      project.delete dependenciesDir
-      def outLog = project.file( "$project.buildDir/tmp/$name/stdout.log" )
-      def errLog = project.file( "$project.buildDir/tmp/$name/stderr.log" )
-      ExecLogged.execLogged( project, outLog, errLog ) { ExecSpec spec ->
-        spec.workingDir project.projectDir
-        spec.commandLine './gradlew', '-u', '-s', '-b', buildScript.absolutePath, 'download'
-      }
-      Utils.checkAllJarsArePresent( project, dependenciesDir, GenerateGradle.BUILD_SCRIPT_FILENAME )
-    }
-  }
-
-  static class Utils
-  {
-    // Do the global dependency resolution here so there won't be any surprise when using the helpers
-    // This also allow to apply the resolution strategy defined in libraries.gradle
-    // WARN some of our modules depends on != versions of some artifacts, this resolution flatten this using the most up to date
-    private static Set<ResolvedComponentResult> resolveAllRuntimeComponents( Project rootProject )
-    {
-      def allRuntimeDeps = getAllRuntimeDependencies( rootProject )
-      def configuration = rootProject.configurations.findByName( 'goOfflineHelpers' )
-      if( !configuration )
-      {
-        configuration = rootProject.configurations.create( 'goOfflineHelpers' )
-        allRuntimeDeps.each { set -> rootProject.dependencies.add( configuration.name, set ) }
-      }
-      return configuration.incoming.resolutionResult.allComponents.findAll { ResolvedComponentResult comp ->
-        !comp.moduleVersion.group.startsWith( 'org.apache.polygene' )
-      } as Set<ResolvedComponentResult>
-    }
-
-    private static List<Dependency> getAllRuntimeDependencies( Project rootProject )
-    {
-      def releaseSpec = rootProject.extensions.getByType( ReleaseSpecExtension )
-      def allDependencies = releaseSpec.approvedProjects.collect { project ->
-        project.configurations.getByName( 'runtime' ).allDependencies
-      }.flatten() as List<Dependency>
-      return allDependencies.findAll { Dependency dep ->
-        !( dep instanceof ProjectDependency ) && dep.name != null && !dep.group.startsWith( 'org.apache.polygene' )
-      }
-    }
-
-    private static void checkAllJarsArePresent( Project rootProject, File dependenciesDir, String helper )
-    {
-      def allDependencies = getAllRuntimeDependencies( rootProject )
-      allDependencies.each { Dependency dep ->
-        def jarName = "${ dep.name }-${ dep.version }.jar"
-        def jarFile = new File( dependenciesDir, jarName )
-        if( !jarFile.exists() )
-        {
-          throw new GradleException( "Binary distribution $helper failed!\n" +
-                                     "\tMissing: $dep\n" +
-                                     "\tin $jarFile" );
-        }
-      }
-    }
-
-    private static boolean isMvnInstalled()
-    {
-      def pathDirs = System.getenv( 'PATH' ).split( File.pathSeparator )
-      def flattened = pathDirs.collect( { String pathDir -> new File( pathDir, 'mvn' ) } ).flatten() as List<File>
-      return flattened.find( { File pathDir -> pathDir.isFile() } ) != null
-    }
-
-    // Generate license headers with comment styles
-    private static String licenseHeader( String base, String flavour )
-    {
-      def header
-      switch( flavour )
-      {
-        case 'java': case 'groovy': case 'js':
-          header = licenseHeader_wrap( base, '/*', ' * ', ' */' ); break
-        case 'xml': case 'html':
-          header = licenseHeader_wrap( base, '<!--', '  ', '-->' ); break
-        case 'txt': case 'shell': case 'python': case 'ruby':
-          header = licenseHeader_wrap( base, null, '# ', null ); break
-        case 'adoc': case 'asciidoc':
-          header = licenseHeader_wrap( base, null, '// ', null ); break
-        default:
-          header = base
-      }
-      header
-    }
-
-    private static String licenseHeader_wrap( String base, String top, String left, String bottom )
-    {
-      ( top ? "$top\n" : '' ) + base.readLines().collect { "${ left }${ it }" }.join( '\n' ) + '\n' +
-      ( bottom ? "$bottom\n" : '' )
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/AsciidocBuildInfoPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/AsciidocBuildInfoPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/AsciidocBuildInfoPlugin.groovy
deleted file mode 100644
index f8edcfb..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/AsciidocBuildInfoPlugin.groovy
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.doc
-
-import groovy.transform.CompileStatic
-import org.apache.polygene.gradle.TaskGroups
-import org.gradle.api.Project
-import org.gradle.api.Plugin
-
-@CompileStatic
-class AsciidocBuildInfoPlugin implements Plugin<Project>
-{
-  final static String TASK_NAME = 'makeAsciidocBuildInfo'
-
-  def void apply( Project project )
-  {
-    def buildInfoDir = new File( project.buildDir, "docs/buildinfo" );
-
-    def makeAsciidocBuildInfoTask = project.tasks.create( TASK_NAME )
-    makeAsciidocBuildInfoTask.group = TaskGroups.DOCUMENTATION
-    makeAsciidocBuildInfoTask.description = 'Generates asciidoc artifact snippet'
-    makeAsciidocBuildInfoTask.doLast {
-      buildInfoDir.mkdirs()
-
-      // GroupID, ArtifactID, Version table in artifact.txt
-      def artifactTableFile = new File( buildInfoDir, "artifact.txt" )
-      def artifactTable = """
-        |.Artifact
-        |[role="artifact", options="header,autowidth"]
-        ||===================================================
-        ||Group ID|Artifact ID|Version
-        ||${ project.group }|${ project.name }|${ project.version }
-        ||===================================================
-        """.stripMargin()
-      artifactTableFile.withWriter { out -> out.println( artifactTable ) }
-    }
-
-    // Declare inputs/outputs
-    if( project.getBuildFile() != null && project.getBuildFile().exists() )
-    {
-      makeAsciidocBuildInfoTask.getInputs().file( project.getBuildFile() )
-    }
-    makeAsciidocBuildInfoTask.getOutputs().file( buildInfoDir )
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/DocumentationTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/DocumentationTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/DocumentationTask.groovy
deleted file mode 100644
index 574f081..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/DocumentationTask.groovy
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.doc
-
-import groovy.io.FileType
-import groovy.transform.CompileStatic
-import groovy.transform.TypeCheckingMode
-import java.security.MessageDigest
-import org.apache.polygene.gradle.PolygeneExtension
-import org.apache.polygene.gradle.release.ReleaseSpecExtension
-import org.apache.polygene.gradle.tasks.ExecLogged
-import org.gradle.api.Action;
-import org.gradle.api.DefaultTask
-import org.gradle.api.file.CopySpec
-import org.gradle.api.tasks.Internal
-import org.gradle.api.tasks.TaskAction
-import org.gradle.api.tasks.Input
-import org.gradle.api.tasks.InputDirectory
-import org.gradle.api.tasks.InputFiles
-import org.gradle.api.tasks.OutputDirectory
-import org.gradle.process.ExecSpec
-
-// TODO: try to use dependencies for FOP and execute within the same JVM.
-// TODO: move the bulk of resources into this plugin, instead of sitting in the project.
-@CompileStatic
-class DocumentationTask extends DefaultTask
-{
-  @Input def String docName
-  @Input def String docType
-
-  @InputDirectory def File getCommonResourcesDir() { project.file( 'src/resources' ) }
-  @InputDirectory def File getConfigDir() { project.file( 'src/conf' ) }
-  @InputDirectory def File getDocsDir() { project.file( 'src/docs' ) }
-  @InputDirectory def File getSrcMainDir() { project.file( 'src/main' ) }
-  @InputDirectory def File getXslDir() { project.file( 'src/xsl' ) }
-  @InputDirectory def File getBuildSrcDir() { project.rootProject.file( 'buildSrc/src' ) }
-
-  @InputFiles def getSubProjectsDocsDirs() { project.rootProject.subprojects.collect { p -> p.file( 'src/docs' ) } }
-  @InputFiles def getSubProjectsTestDirs() { project.rootProject.subprojects.collect { p -> p.file( 'src/test' ) } }
-
-  @OutputDirectory def File getOutputDir() { project.file( "${ project.buildDir }/docs/${ docName }/" ) }
-
-  @Internal def File getTempAsciidocDir() { project.file( "${ project.buildDir }/tmp-asciidoc" ) }
-  @Internal def File getTempDir() { project.file( "${ project.buildDir }/tmp/docs/${ docName }" ) }
-
-  @TaskAction
-  def void generate()
-  {
-    installAsciidocFilters()
-
-    [ outputDir, tempAsciidocDir, tempDir ].each { it.deleteDir() }
-    [ outputDir, tempAsciidocDir, tempDir ].each { it.mkdirs() }
-
-    copySubProjectsDocsResources()
-    generateAsciidocAccordingToReleaseSpecification()
-    generateXDoc()
-    generateChunkedHtml()
-    // generateSingleHtml()
-    // generatePdf()
-  }
-
-  def void installAsciidocFilters()
-  {
-    def digester = MessageDigest.getInstance( 'SHA' )
-    def filtersDir = project.rootProject.file( 'buildSrc/src/asciidoc/filters' )
-    def userHome = new File( System.getProperty( 'user.home' ) )
-    def dotAsciidocFiltersDir = new File( userHome, '.asciidoc/filters' )
-    def installSnippets = false
-    filtersDir.eachFileRecurse( FileType.FILES ) { originalFile ->
-      def targetFile = new File( dotAsciidocFiltersDir,
-                                 ( originalFile.toURI() as String ) - ( filtersDir.toURI() as String ) )
-      if( !targetFile.exists() )
-      {
-        installSnippets = true
-      }
-      else
-      {
-        def originalDigest = digester.digest( originalFile.bytes )
-        def targetDigest = digester.digest( targetFile.bytes )
-        if( originalDigest != targetDigest )
-        {
-          installSnippets = true
-        }
-      }
-    }
-    if( installSnippets )
-    {
-      dotAsciidocFiltersDir.mkdirs()
-      project.rootProject.copy { CopySpec spec ->
-        spec.from filtersDir
-        spec.into dotAsciidocFiltersDir
-      }
-      dotAsciidocFiltersDir.eachFileRecurse( FileType.FILES ) { file ->
-        if( file.name.endsWith( '.py' ) )
-        {
-          chmod( file, '755' )
-        }
-      }
-      println "Polygene Asciidoc Filters Installed!"
-    }
-  }
-
-  @CompileStatic( TypeCheckingMode.SKIP )
-  def void chmod( File file, String permissions )
-  {
-    ant.chmod( file: file.absolutePath, perm: permissions )
-  }
-
-  def void copySubProjectsDocsResources()
-  {
-    project.rootProject.subprojects.each { p ->
-      p.copy { CopySpec spec ->
-        spec.from p.file( 'src/docs/resources' )
-        spec.into outputDir
-        spec.include '**'
-      }
-    }
-  }
-
-  def void generateAsciidocAccordingToReleaseSpecification()
-  {
-    def polygene = project.extensions.getByType( PolygeneExtension )
-    project.copy { CopySpec spec ->
-      spec.from docsDir
-      spec.into tempAsciidocDir
-      spec.include '**'
-    }
-    if( polygene.releaseVersion )
-    {
-      def licenseFile = new File( tempAsciidocDir, 'userguide/libraries.txt' )
-      def extensionsFile = new File( tempAsciidocDir, 'userguide/extensions.txt' )
-      def toolsFile = new File( tempAsciidocDir, 'userguide/tools.txt' )
-      [ licenseFile, extensionsFile, toolsFile ].each { asciidocFile ->
-        def filteredFileContent = ''
-        asciidocFile.readLines().each { line ->
-          if( line.startsWith( 'include::' ) )
-          {
-            def approved = false
-            def releaseApprovedProjects = project.rootProject.extensions.
-              getByType( ReleaseSpecExtension ).approvedProjects
-            releaseApprovedProjects.collect { it.projectDir }.each { approvedProjectDir ->
-              if( line.contains( "${ approvedProjectDir.parentFile.name }/${ approvedProjectDir.name }" ) )
-              {
-                approved = true
-              }
-            }
-            if( approved )
-            {
-              filteredFileContent += "$line\n"
-            }
-          }
-          else
-          {
-            filteredFileContent += "$line\n"
-          }
-        }
-        asciidocFile.text = filteredFileContent
-      }
-    }
-  }
-
-  def void generateXDoc()
-  {
-    def outLog = getLogFile( 'adoc-2-docbook', 'stdout' )
-    def errLog = getLogFile( 'adoc-2-docbook', 'stderr' )
-    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
-      spec.executable = 'asciidoc'
-      spec.workingDir = '..'
-      def commonResourcesPath = relativePath( project.rootDir, commonResourcesDir )
-      def asciidocConfigPath = relativePath( project.rootDir, new File( configDir, 'asciidoc.conf' ) )
-      def docbookConfigPath = relativePath( project.rootDir, new File( configDir, 'docbook45.conf' ) )
-      def linkimagesConfigPath = relativePath( project.rootDir, new File( configDir, 'linkedimages.conf' ) )
-      def xdocOutputPath = relativePath( project.rootDir, new File( tempDir, 'xdoc-temp.xml' ) )
-      def asciidocIndexPath = relativePath( project.rootDir, new File( tempAsciidocDir, "$docName/index.txt" ) )
-      spec.args = [
-        '--attribute', 'revnumber=' + project.version,
-        '--attribute', 'level1=' + ( docType == 'article' ? 1 : 0 ),
-        '--attribute', 'level2=' + ( docType == 'article' ? 2 : 1 ),
-        '--attribute', 'level3=' + ( docType == 'article' ? 3 : 2 ),
-        '--attribute', 'level4=' + ( docType == 'article' ? 4 : 3 ),
-        '--attribute', 'importdir=' + commonResourcesPath,
-        '--backend', 'docbook',
-        '--attribute', 'docinfo1',
-        '--doctype', docType,
-        '--conf-file=' + asciidocConfigPath,
-        '--conf-file=' + docbookConfigPath,
-        '--conf-file=' + linkimagesConfigPath,
-        '--out-file', xdocOutputPath,
-        asciidocIndexPath
-      ]
-    } as Action<? super ExecSpec> )
-  }
-
-  def void generateChunkedHtml()
-  {
-    project.copy { CopySpec spec ->
-      spec.from commonResourcesDir
-      spec.into outputDir
-      spec.include '**'
-    }
-    project.copy { CopySpec spec ->
-      spec.from "$docsDir/$docName/resources"
-      spec.into outputDir
-      spec.include '**'
-    }
-    def outLog = getLogFile( 'docbook-2-chunked-html', 'stdout' )
-    def errLog = getLogFile( 'docbook-2-chunked-html', 'stderr' )
-    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
-      def xsltFile = "$docsDir/$docName/xsl/chunked.xsl"
-      def outputPath = relativePath( project.projectDir, outputDir ) + '/'
-      spec.executable = 'xsltproc'
-      spec.args = [
-        '--nonet',
-        '--noout',
-        '--output', outputPath,
-        xsltFile,
-        "$tempDir/xdoc-temp.xml"
-      ]
-    } as Action<? super ExecSpec> )
-  }
-
-  def void generateSingleHtml()
-  {
-    def outLog = getLogFile( 'docbook-2-html', 'stdout' )
-    def errLog = getLogFile( 'docbook-2-html', 'stderr' )
-    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
-      // XML_CATALOG_FILES=
-      String xsltFile = "$xslDir/xhtml.xsl"
-      spec.executable = 'xsltproc'
-      spec.args = [
-        '--nonet',
-        '--noout',
-        '--output', "$outputDir/${ docName }.html",
-        xsltFile,
-        "$tempDir/xdoc-temp.xml"
-      ]
-    } as Action<? super ExecSpec> )
-  }
-
-  def void generatePdf()
-  {
-    // $ xsltproc --nonet ../docbook-xsl/fo.xsl article.xml > article.fo
-    def outLog = getLogFile( 'docbook-2-fo', 'stdout' )
-    def errLog = getLogFile( 'docbook-2-fo', 'stderr' )
-    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
-      String xsltFile = "$xslDir/fo.xsl"
-      spec.executable = 'xsltproc'
-      spec.args = [
-        '--nonet',
-        '--output', "$tempDir/${ docName }.fo",
-        xsltFile,
-        "$tempDir/xdoc-temp.xml"
-      ]
-    } as Action<? super ExecSpec> )
-
-    // $ fop article.fo article.pdf
-    outLog = getLogFile( 'fo-2-pdf', 'stdout' )
-    errLog = getLogFile( 'fo-2-pdf', 'stderr' )
-    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
-      spec.executable = 'fop'
-      spec.args = [
-        "$tempDir/${ docName }.fo",
-        "$outputDir/${ docName }.pdf"
-      ]
-    } as Action<? super ExecSpec> )
-  }
-
-  private File getLogFile( String step, String stream )
-  {
-    return project.file( "${ project.buildDir }/tmp/${ name }/${ step }-${ stream }.log" )
-  }
-
-  private static String relativePath( File root, File target )
-  {
-    new File( root.toURI().relativize( target.toURI() ).toString() ).path
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/ManualPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/ManualPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/ManualPlugin.groovy
deleted file mode 100644
index 16aff3c..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/ManualPlugin.groovy
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.doc
-
-import groovy.transform.CompileStatic
-import org.apache.polygene.gradle.TaskGroups
-import org.apache.polygene.gradle.PolygeneExtension
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.Task
-import org.gradle.api.tasks.Copy
-
-@CompileStatic
-class ManualPlugin implements Plugin<Project>
-{
-  static class TaskNames
-  {
-    static final String WEBSITE = "website"
-    static final String ARCHIVE_WEBSITE = "archiveWebsite"
-    static final String COPY_WEBSITE = "copyWebsite"
-    static final String MANUALS = "manuals"
-  }
-
-  @Override
-  void apply( final Project project )
-  {
-    def polygene = project.extensions.getByType( PolygeneExtension )
-    project.tasks.create( TaskNames.WEBSITE, DocumentationTask ) { DocumentationTask task ->
-      task.group = TaskGroups.DOCUMENTATION
-      task.description = 'Generates documentation website'
-      task.dependsOn project.rootProject.allprojects.findResults { Project p ->
-        p.tasks.findByName AsciidocBuildInfoPlugin.TASK_NAME
-      }
-      task.onlyIf { isAsciidocInstalled( project, polygene ) }
-      task.docName = 'website'
-      task.docType = 'article'
-    }
-    project.tasks.create( TaskNames.ARCHIVE_WEBSITE, Copy ) { Copy task ->
-      task.group = TaskGroups.DOCUMENTATION
-      task.description = 'Copy website to ../polygene-web'
-      task.dependsOn TaskNames.WEBSITE
-      task.onlyIf { isAsciidocInstalled( project, polygene ) }
-      if( polygene.developmentVersion )
-      {
-        task.into "$project.rootProject.projectDir/../polygene-web/site/content/java/develop"
-      }
-      else
-      {
-        task.into "$project.rootProject.projectDir/../polygene-web/site/content/java/$project.version"
-      }
-      task.from "$project.buildDir/docs/website/"
-    }
-    project.tasks.create( TaskNames.COPY_WEBSITE, Copy ) { Copy task ->
-      task.group = TaskGroups.RELEASE
-      task.description = 'Copy website to ../polygene-web LATEST'
-      task.dependsOn TaskNames.ARCHIVE_WEBSITE
-      task.onlyIf { polygene.releaseVersion }
-      task.from "$project.rootProject.projectDir/../polygene-web/site/content/java/$project.version/"
-      task.into "$project.rootProject.projectDir/../polygene-web/site/content/java/latest/"
-    }
-    project.tasks.create( TaskNames.MANUALS ) { Task task ->
-      task.group = TaskGroups.DOCUMENTATION
-      task.description = 'Generates all documentation'
-      task.dependsOn TaskNames.COPY_WEBSITE
-      task.onlyIf { isAsciidocInstalled( project, polygene ) }
-    }
-  }
-
-  private static Boolean asciidocInstalled = null
-
-  // Force when building a release version
-  // Skip if skipAsciidocIfAbsent property is set
-  // Skip if asciidoc is not found in PATH when building a development version
-  private static boolean isAsciidocInstalled( Project project, PolygeneExtension polygene )
-  {
-    if( asciidocInstalled == null )
-    {
-      def skipAsciidocIfAbsent = project.findProperty 'skipAsciidocIfAbsent'
-      if( !skipAsciidocIfAbsent && polygene.releaseVersion )
-      {
-        project.logger.info 'Asciidoc tasks forced for building a release version, hope you have Asciidoc installed'
-        asciidocInstalled = true
-      }
-      else
-      {
-        def pathDirs = System.getenv( 'PATH' ).split( File.pathSeparator )
-        def asciidocCandidates = pathDirs.collect( { String path ->
-          new File( path, 'asciidoc' )
-        } ).flatten() as List<File>
-        asciidocInstalled = asciidocCandidates.findAll( { it.isFile() } )
-        if( !asciidocInstalled )
-        {
-          project.logger.lifecycle 'WARNING Asciidoc not found in PATH, manual tasks will skip\n' +
-                                   '        Please install http://www.methods.co.nz/asciidoc/'
-        }
-      }
-    }
-    return asciidocInstalled
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/XsltTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/XsltTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/XsltTask.groovy
deleted file mode 100644
index 87c7937..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/doc/XsltTask.groovy
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.doc
-
-import groovy.transform.CompileStatic
-import org.gradle.api.file.EmptyFileVisitor
-import org.gradle.api.tasks.Input
-import org.gradle.api.tasks.SourceTask
-import org.gradle.api.tasks.OutputDirectory
-import org.gradle.api.tasks.InputFile
-import org.gradle.api.tasks.TaskAction
-import org.gradle.api.file.FileVisitDetails
-import javax.xml.transform.TransformerFactory
-import javax.xml.transform.stream.StreamResult
-import javax.xml.transform.stream.StreamSource
-
-/**
- *  Gradle task for running a set of one or more
- *  files through an XSLT transform.  A styleSheet
- *  file must be specified.  The source file(s) are
- *  configured just like any other source task:
- *     source <file>
- *       ...or...
- *     source <directory>
- *       ...and then optionally...
- *     include '*.xml'
- *     exclude, etc.
- *
- *  One of destDir or destFile must be specified, though if
- *  there are multiple source files then destFile will just
- *  keep getting rewritten.
- *
- *  The extension is stripped from the source files and the
- *  specified extension is appended (whether it is set or not)
- *  it defaults to no extension.
- *
- *  Example task formatting a check style report:
- *
- *  task checkstyleReport(type: XsltTask, dependsOn: check) {
- *      source project.checkstyleResultsDir
- *      include '*.xml'
- *
- *      destDir = project.checkstyleResultsDir
- *      extension = 'html'
- *
- *      stylesheetFile = file( 'config/checkstyle/checkstyle-noframes.xsl' )
- * }
- *
- *  The above definition requires that the specified XSL file be
- *  copied in with the other checkstyle configuration files.  (The
- *  file in the example is part of the checkstyle distribution.)
- *
- */
-@CompileStatic
-class XsltTask extends SourceTask
-{
-
-  @OutputDirectory
-  File destDir
-
-  @Input
-  String extension = 'html'
-
-  @InputFile
-  File stylesheetFile
-
-  @TaskAction
-  def transform()
-  {
-    def factory = TransformerFactory.newInstance()
-    def transformer = factory.newTransformer( new StreamSource( stylesheetFile ) );
-
-    getSource().visit( new EmptyFileVisitor() {
-      @Override
-      void visitFile( FileVisitDetails fvd )
-      {
-        // Remove the extension from the file name
-        def name = fvd.file.name.replaceAll( '[.][^\\.]*$', '' )
-        name += '.' + extension
-        def destFile = new File( destDir, name )
-        transformer.transform( new StreamSource( fvd.file ), new StreamResult( destFile ) )
-      }
-    } )
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/performance/PerformanceTestsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/performance/PerformanceTestsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/performance/PerformanceTestsPlugin.groovy
deleted file mode 100644
index 1b676af..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/performance/PerformanceTestsPlugin.groovy
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.performance
-
-import groovy.transform.CompileStatic
-import org.apache.polygene.gradle.TaskGroups
-import org.gradle.api.Action
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.plugins.JavaPluginConvention
-import org.gradle.api.tasks.bundling.Jar
-import org.gradle.api.tasks.testing.Test
-import org.gradle.language.base.plugins.LifecycleBasePlugin
-
-// TODO Add profiling tasks (jfr or honest? flamegraphs?)
-// TODO Add simple regression assertions, how? testing against a previous version?
-@CompileStatic
-class PerformanceTestsPlugin implements Plugin<Project>
-{
-  static class TaskNames
-  {
-    static final String PERFORMANCE_TEST = 'performanceTest'
-    static final String PERFORMANCE_PROFILE = 'performanceProfile'
-    static final String PERFORMANCE_CHECK = 'performanceCheck'
-  }
-
-  @Override
-  void apply( final Project project )
-  {
-    def sourceSets = project.convention.getPlugin( JavaPluginConvention ).sourceSets
-    sourceSets.create 'perf'
-    project.dependencies.add 'perfCompile', sourceSets.getByName( 'main' ).output
-    project.dependencies.add 'perfCompile', sourceSets.getByName( 'test' ).output
-    project.dependencies.add 'perfCompile', project.configurations.getByName( 'testCompile' )
-    project.dependencies.add 'perfRuntime', project.configurations.getByName( 'testRuntime' )
-    project.tasks.getByName( LifecycleBasePlugin.CHECK_TASK_NAME ).dependsOn 'compilePerfJava'
-    project.tasks.create( TaskNames.PERFORMANCE_TEST, Test, { Test task ->
-      task.group = TaskGroups.PERFORMANCE
-      task.description = 'Runs performance tests.'
-      task.maxParallelForks = 1
-      task.forkEvery = 1L
-      task.testClassesDir = sourceSets.getByName( 'perf' ).output.classesDir
-      task.classpath = sourceSets.getByName( 'perf' ).runtimeClasspath
-      task.systemProperty 'jar.path', ( project.tasks.getByName( 'jar' ) as Jar ).archivePath
-    } as Action<Test> )
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/MavenMetadata.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/MavenMetadata.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/MavenMetadata.groovy
deleted file mode 100644
index 85f9ebd..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/MavenMetadata.groovy
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.publish
-
-import org.gradle.api.artifacts.maven.MavenDeployer
-
-class MavenMetadata
-{
-  static void applyTo( MavenDeployer mavenDeployer )
-  {
-    mavenDeployer.pom {
-      project {
-        url 'https://polygene.apache.org/'
-        organization {
-          name 'The Apache Software Foundation'
-          url 'https://apache.org/'
-        }
-        inceptionYear '2007'
-        issueManagement {
-          system 'jira'
-          url 'https://issues.apache.org/jira/browse/POLYGENE'
-        }
-        scm {
-          url "https://github.com/apache/polygene-java"
-          connection "scm:git:https://git-wip-us.apache.org/repos/asf/polygene-java.git"
-          developerConnection "scm:git:https://git-wip-us.apache.org/repos/asf/polygene-java.git"
-        }
-        licenses {
-          license {
-            name 'Apache License, version 2.0.'
-            url 'http://www.apache.org/licenses/LICENSE-2.0'
-          }
-        }
-        mailingLists {
-          mailingList {
-            name 'Users List'
-            subscribe 'users-subscribe@polygene.apache.org'
-            unsubscribe 'users-unsubscribe@polygene.apache.org'
-            post 'users@polygene.apache.org'
-            archive 'https://mail-archives.apache.org/mod_mbox/polygene-users/'
-            otherArchives {
-              otherArchive 'https://www.apache.org/foundation/mailinglists.html#archives'
-            }
-          }
-          mailingList {
-            name 'Development List'
-            subscribe 'dev-subscribe@polygene.apache.org'
-            unsubscribe 'dev-unsubscribe@polygene.apache.org'
-            post 'dev@polygene.apache.org'
-            archive 'https://mail-archives.apache.org/mod_mbox/polygene-dev/'
-            otherArchives {
-              otherArchive 'https://www.apache.org/foundation/mailinglists.html#archives'
-            }
-          }
-          mailingList {
-            name 'Commits List'
-            subscribe 'commits-subscribe@polygene.apache.org'
-            unsubscribe 'commits-unsubscribe@polygene.apache.org'
-            post 'commits@polygene.apache.org'
-            archive 'https://mail-archives.apache.org/mod_mbox/polygene-commits/'
-            otherArchives {
-              otherArchive 'https://www.apache.org/foundation/mailinglists.html#archives'
-            }
-          }
-        }
-        developers {
-          developer {
-            id 'niclas@hedhman.org'
-            name 'Niclas Hedhman'
-            email 'niclas@hedhman.org'
-            roles {
-              role 'Core Team'
-            }
-            organizationUrl 'http://polygene.apache.org'
-            timezone 'UTC+8'
-          }
-          developer {
-            id 'rickardoberg'
-            name 'Rickard \u00F6berg'
-            email 'rickard.oberg@jayway.se'
-            roles {
-              role 'Core Team'
-            }
-            url 'http://www.neotechnology.com'
-            organization 'Neo Technology AB'
-            organizationUrl 'http://www.neotechnology.com'
-            timezone 'UTC+8'
-          }
-          developer {
-            id 'edward.yakop@gmail.com'
-            name 'Edward Yakop'
-            email 'efy@codedragons.com'
-            roles {
-              role 'Core Team'
-            }
-            organizationUrl 'http://polygene.apache.org'
-            timezone 'UTC+8'
-          }
-          developer {
-            id 'adreghiciu@gmail.com'
-            name 'Alin Dreghiciu'
-            email 'adreghiciu@codedragons.com'
-            roles {
-              role 'Core Team'
-            }
-            organizationUrl 'http://polygene.apache.org'
-            timezone 'UTC+2'
-          }
-          developer {
-            id 'mesirii'
-            name 'Michael Hunger'
-            email 'qi4j@jexp.de'
-            roles {
-              role 'Core Team'
-            }
-            timezone 'CET'
-          }
-
-          developer {
-            id "muhdkamil"
-            name "Muhd Kamil bin Mohd Baki"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "UTC+8"
-          }
-
-          developer {
-            id "ops4j@leangen.net"
-            name "David Leangen"
-            organization "Bioscene"
-            email "ops4j@leangen.net"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "UTC+9"
-          }
-
-          developer {
-            id "sonny.gill@jayway.net"
-            name "Sonny Gill"
-            email "sonny.public@gmail.com"
-            roles {
-              role 'Community Team'
-            }
-            timezone "UTC+8"
-          }
-
-          developer {
-            id "taowen"
-            name "Tao Wen"
-            organization ""
-            email "taowen@gmail.com"
-            roles {
-              role 'Community Team'
-            }
-            timezone "UTC+8"
-          }
-
-          developer {
-            id "thobe"
-            name "Tobias Ivarsson"
-            email "tobias@neotechnology.com"
-            url "http://www.neotechnology.com"
-            organization "NeoTechnology"
-            organizationUrl "http://www.neotechnology.com"
-            roles {
-              role "Platform Team"
-            }
-            timezone "CET"
-          }
-
-          developer {
-            id "boon"
-            name "Lan Boon Ping"
-            email "boonping81@gmail.com"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "UTC+8"
-          }
-
-          developer {
-            id "jan.kronquist@gmail.com"
-            name "Jan Kronquist"
-            email "jan.kronquist@gmail.com"
-            organization "Jayway"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "CET"
-          }
-
-          developer {
-            id "nmwael"
-            name "Nino Saturnino Martinez Vazquez Wael"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "CET"
-          }
-
-          developer {
-            id "peter@neubauer.se"
-            name "Peter Neubauer"
-            email "peter@neubauer.se"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "CET"
-          }
-
-          developer {
-            id "rwallace"
-            name "Richard Wallace"
-            email "rwallace@thewallacepack.net"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "UTC-7"
-          }
-
-          developer {
-            id "siannyhalim@gmail.com"
-            name "Sianny Halim"
-            email "siannyhalim@gmail.com"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "UTC+8"
-          }
-
-          developer {
-            id "paul@nosphere.org"
-            name "Paul Merlin"
-            email "paul@nosphere.org"
-            roles {
-              role 'Core Team'
-            }
-            timezone "CET"
-          }
-
-          developer {
-            id "stas.dev+qi4j@gmail.com"
-            name "Stanislav Muhametsin"
-            email "stas.dev+qi4j@gmail.com"
-            roles {
-              role 'Platform Team'
-            }
-            timezone "UTC+2"
-          }
-
-          developer {
-            id "tonny"
-            name "Tonny Kohar"
-            roles {
-              role "Community Team"
-            }
-            email "tonny.kohar@gmail.com"
-            timezone "UTC+7"
-          }
-        }
-      }
-    }
-  }
-}


[02/19] zest-java git commit: servlet: remove usage of deprecated stuff

Posted by pa...@apache.org.
servlet: remove usage of deprecated stuff


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

Branch: refs/heads/develop
Commit: 9fe61e6b788c380745242e1c7055a7179af2f3ab
Parents: d767264
Author: Paul Merlin <pa...@apache.org>
Authored: Sat Dec 17 22:10:03 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sat Dec 17 22:10:03 2016 +0100

----------------------------------------------------------------------
 .../polygene/library/http/Dispatchers.java      | 51 --------------------
 .../apache/polygene/library/http/Servlets.java  | 19 --------
 .../polygene/library/servlet/ServletTest.java   | 21 ++++----
 3 files changed, 12 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/9fe61e6b/libraries/http/src/main/java/org/apache/polygene/library/http/Dispatchers.java
----------------------------------------------------------------------
diff --git a/libraries/http/src/main/java/org/apache/polygene/library/http/Dispatchers.java b/libraries/http/src/main/java/org/apache/polygene/library/http/Dispatchers.java
deleted file mode 100644
index 462c527..0000000
--- a/libraries/http/src/main/java/org/apache/polygene/library/http/Dispatchers.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *  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.
- *
- *
- */
-package org.apache.polygene.library.http;
-
-import java.io.Serializable;
-import java.util.EnumSet;
-import java.util.Iterator;
-
-public class Dispatchers
-    implements Iterable<Dispatchers.Dispatcher>, Serializable
-{
-    public enum Dispatcher
-    {
-        FORWARD, REQUEST
-    }
-
-    private final EnumSet<Dispatcher> dispatchers;
-
-    private Dispatchers( EnumSet<Dispatcher> dispatchers )
-    {
-        this.dispatchers = dispatchers;
-    }
-
-    @Override
-    public Iterator<Dispatcher> iterator()
-    {
-        return dispatchers.iterator();
-    }
-
-    public static Dispatchers dispatchers( Dispatcher first, Dispatcher... rest )
-    {
-        return new Dispatchers( EnumSet.of( first, rest ) );
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/9fe61e6b/libraries/http/src/main/java/org/apache/polygene/library/http/Servlets.java
----------------------------------------------------------------------
diff --git a/libraries/http/src/main/java/org/apache/polygene/library/http/Servlets.java b/libraries/http/src/main/java/org/apache/polygene/library/http/Servlets.java
index 44a870e..d04d914 100644
--- a/libraries/http/src/main/java/org/apache/polygene/library/http/Servlets.java
+++ b/libraries/http/src/main/java/org/apache/polygene/library/http/Servlets.java
@@ -31,7 +31,6 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.http.ConstraintInfo.Constraint;
 import org.apache.polygene.library.http.ConstraintInfo.HttpMethod;
-import org.apache.polygene.library.http.Dispatchers.Dispatcher;
 
 import static org.apache.polygene.api.common.Visibility.layer;
 
@@ -237,24 +236,6 @@ public final class Servlets
             return this;
         }
 
-        @Deprecated
-        public FilterAssembler on( Dispatcher first, Dispatcher... rest )
-        {
-            EnumSet<DispatcherType> dispatch = EnumSet.noneOf( DispatcherType.class );
-            for ( Dispatcher each : Dispatchers.dispatchers( first, rest ) ) {
-                switch ( each ) {
-                    case FORWARD:
-                        dispatch.add( DispatcherType.FORWARD );
-                        break;
-                    case REQUEST:
-                        dispatch.add( DispatcherType.REQUEST );
-                        break;
-                }
-            }
-            dispatchers = dispatch;
-            return this;
-        }
-
         public FilterAssembler withInitParams( Map<String, String> initParams )
         {
             this.initParams = initParams;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/9fe61e6b/libraries/servlet/src/test/java/org/apache/polygene/library/servlet/ServletTest.java
----------------------------------------------------------------------
diff --git a/libraries/servlet/src/test/java/org/apache/polygene/library/servlet/ServletTest.java b/libraries/servlet/src/test/java/org/apache/polygene/library/servlet/ServletTest.java
index d0755e7..e16e24f 100644
--- a/libraries/servlet/src/test/java/org/apache/polygene/library/servlet/ServletTest.java
+++ b/libraries/servlet/src/test/java/org/apache/polygene/library/servlet/ServletTest.java
@@ -23,20 +23,20 @@ import java.io.IOException;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.BasicResponseHandler;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.servlet.ServletContextHandler;
-import org.junit.Assert;
-import org.junit.Test;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.polygene.bootstrap.ApplicationAssembly;
 import org.apache.polygene.bootstrap.ApplicationAssemblyFactory;
 import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.library.servlet.lifecycle.AbstractPolygeneServletBootstrap;
 import org.apache.polygene.test.util.FreePortFinder;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class ServletTest
 {
@@ -100,9 +100,12 @@ public class ServletTest
             server.setHandler( context );
             server.start();
 
-            HttpClient client = new DefaultHttpClient();
-            String result = client.execute( new HttpGet( "http://127.0.0.1:" + port + "/" ), new BasicResponseHandler() );
-            Assert.assertEquals( APP_NAME, result.trim() );
+            try( CloseableHttpClient client = HttpClientBuilder.create().build() )
+            {
+                String result = client.execute( new HttpGet( "http://127.0.0.1:" + port + "/" ),
+                                                new BasicResponseHandler() );
+                Assert.assertEquals( APP_NAME, result.trim() );
+            }
 
         } finally {
             server.stop();


[18/19] zest-java git commit: Revamp the README at repository root

Posted by pa...@apache.org.
Revamp the README at repository root

It is now distinguished from the distribution READMEs


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

Branch: refs/heads/develop
Commit: 56b26262db55df6b19dcd7f2da51cfb1e93294aa
Parents: de73010
Author: Paul Merlin <pa...@apache.org>
Authored: Sat Dec 24 11:15:05 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sat Dec 24 11:15:05 2016 +0100

----------------------------------------------------------------------
 README.md  | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.txt | 64 ------------------------------------------
 2 files changed, 86 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/56b26262/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..8532123
--- /dev/null
+++ b/README.md
@@ -0,0 +1,86 @@
+# Apache Polygene\u2122 (Java Edition)
+
+> Composite Oriented Programming on the Java platform
+
+[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
+[![Build Status](https://builds.apache.org/buildStatus/icon?job=Polygene(JavaEdition)-develop-java8-checkDists)](https://builds.apache.org/view/P/view/Polygene/job/Polygene(JavaEdition)-develop-java8-checkDists/)
+
+## What is Apache Polygene\u2122
+
+The short answer is that **Apache Polygene\u2122** is a community based effort exploring Composite Oriented Programming for
+domain centric application development. This includes evolved concepts from
+[Aspect Oriented Programming](https://en.wikipedia.org/wiki/Aspect-oriented_programming),
+[Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection)
+and [Domain Driven Design](https://en.wikipedia.org/wiki/Domain-driven_design).
+
+**Composite Oriented Programming** allows developers to work with _fragments_, smaller than classes, and _compose_
+fragments into larger _composites_ which acts like the regular objects. Apache Polygene\u2122 also tackles the enforcement
+of _application_ composition, i.e. composites are declared in _modules_, modules are contained in _layers_ and access
+between layers are controlled/enforced.
+
+**Apache Polygene\u2122 (Java Edition)**, first Apache Polygene sub-project, is an implementation of Composite Oriented
+Programming, using the standard Java platform, without the use of any pre-processors or new language elements.
+Everything you know from Java still applies and you can leverage both your experience and toolkits to become more
+productive with Composite Oriented Programming today.
+
+The Apache Polygene\u2122 community welcomes any effort exploring Composite Oriented Programming for domain centric
+application development using any technology.
+
+Please see https://polygene.apache.org for more information.
+
+## Downloading
+
+You can download released versions from: https://polygene.apache.org/download.html
+
+## Building
+
+Build instructions can be found here: http://polygene.apache.org/java/latest/build-system.html
+
+## Contributing
+
+Polygene\u2122 started in 2007, and is still in heavy development under the umbrella of
+the Apache Polygene\u2122 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://polygene.apache.org/community/participate.html and http://zest.apache.org/community/playing_field.html
+for more information.
+
+## Opening in your IDE
+
+### IntelliJ IDEA
+
+IntelliJ IDEA Community Edition has everything you need to open Apache Polygene\u2122.
+To open the project in IDEA, simply open this repository as a project. 
+
+### Netbeans
+
+To open Apache Polygene\u2122 in Netbeans you need to install the _Gradle Support_ plugin.
+It is directly available via the Update Center (Tools/Plugins: Look for _Gradle Support_).
+Then, to open the project in Netbeans, simply open this repository as a project.
+
+### Eclipse
+
+Eclipse supports Gradle based projects out of the box thanks to the Buildship project.
+To open the project in Eclipse, simply import this repository as a Gradle project.
+
+## Licensing
+
+    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.
+
+

http://git-wip-us.apache.org/repos/asf/zest-java/blob/56b26262/README.txt
----------------------------------------------------------------------
diff --git a/README.txt b/README.txt
deleted file mode 100644
index a27ea07..0000000
--- a/README.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-
-Welcome to the world of Apache Polygene
-   - Composite Oriented Programming on the Java platform.
-
-
-This Apache Polygene\u2122 Source Distribution contains everything you need to
-create Polygene\u2122 applications.
-
-
-Polygene\u2122 started in 2007, and is still in heavy development under the umbrella of
-the Apache Polygene\u2122 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://polygene.apache.org for more information.
-
-
-Licensing
----------
-All Polygene\u2122 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, Polygene\u2122 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 distribution contains Polygene\u2122 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.
-
-If you prefer to use a dependency management system, go to:
-https://polygene.apache.org/java/latest/howto-depend-on-polygene.html
-
-
-Building Apache Polygene
----------------------
-To build Polygene\u2122 from sources you only need to have a valid Java JDK >= 7
-installation.
-
-If you want to build the Polygene\u2122 manual, then you also need valid Asciidoc
-(http://www.methods.co.nz/asciidoc/) and Docbook-XSL installations.
-
-Here is how to run a full build with checks:
-
-    ./gradlew check assemble
-
-Read the Polygene\u2122 Build System tutorial for more details:
-https://polygene.apache.org/java/latest/build-system.html
-
-
-Thank you for trying out Apache Polygene\u2122 and Composite Oriented Programming.
-
-
--- Apache Polygene\u2122 Team
-


[15/19] zest-java git commit: build: detangle buildSrc

Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy
deleted file mode 100644
index 843f519..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.publish
-
-import groovy.transform.CompileStatic
-import org.apache.polygene.gradle.PolygeneExtension
-import org.apache.polygene.gradle.release.ReleaseSpecExtension
-import org.gradle.api.GradleException
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.artifacts.maven.MavenDeployer
-import org.gradle.api.artifacts.maven.MavenDeployment
-import org.gradle.api.internal.plugins.DslObject
-import org.gradle.api.plugins.MavenRepositoryHandlerConvention
-import org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer
-import org.gradle.api.publication.maven.internal.deployer.MavenRemoteRepository
-import org.gradle.api.tasks.Upload
-import org.gradle.plugins.signing.Sign
-import org.gradle.plugins.signing.SigningExtension
-
-/**
- * Publishing.
- *
- * <strong>Configuration</strong>
- *
- * By default RELEASES are signed, SNAPSHOTS are not.
- * Signing can be turned on or off by setting the {@literal uploadSigned} property.
- *
- * By default RELEASES must satisfy {@link org.apache.polygene.gradle.release.ModuleReleaseSpec}, SNAPSHOT don't.
- * This can be turned on or off by setting the {@literal uploadReleaseSpec} property.
- *
- * By default RELEASES and SNAPSHOTS are uploaded using HTTP.
- * Used Wagon can be overridden by setting the {@literal uploadWagon} property.
- *
- * By default RELEASES and SNAPSHOTS are uploaded to Apache Nexus.
- * Target repository can be overridden by setting the {@literal uploadRepository} property.
- *
- * No username/password is provided by default.
- * If needed set them using the uploadUsername and {@literal uploadPassword} properties.
- */
-@CompileStatic
-class PublishingPlugin implements Plugin<Project>
-{
-  static final String WAGON_HTTP = 'org.apache.maven.wagon:wagon-http:2.2'
-  static final String WAGON_SSH = 'org.apache.maven.wagon:wagon-ssh:2.2'
-  static final String WAGON_WEBDAV = 'org.apache.maven.wagon:wagon-webdav:1.0-beta-2'
-
-  static final String RELEASES_REPOSITORY_NAME = 'apache.releases.https'
-  static final String RELEASES_REPOSITORY_URL = 'https://repository.apache.org/service/local/staging/deploy/maven2'
-  static final String SNAPSHOTS_REPOSITORY_NAME = 'apache.snapshots.https'
-  static final String SNAPSHOTS_REPOSITORY_URL = 'https://repository.apache.org/content/repositories/snapshots'
-
-  static class Config
-  {
-    boolean snapshots
-    boolean releases
-    boolean signed
-    boolean releaseSpec
-    String wagon
-    String repositoryName
-    String repositoryUrl
-    String username
-    String password
-  }
-
-  @Override
-  void apply( final Project project )
-  {
-    Config config = configFor( project )
-    applyWagonConfiguration( project, config )
-    configureSigning( project, config )
-    configureUploadArchives( project, config )
-    configureMavenMetadata( project )
-    applyMavenPublishAuth( project )
-  }
-
-  private static Config configFor( Project project )
-  {
-    def polygene = project.extensions.getByType( PolygeneExtension )
-    def config = new Config()
-    config.snapshots = polygene.developmentVersion
-    config.releases = polygene.releaseVersion
-    config.signed = project.findProperty( 'uploadSigned' ) ?: config.releases
-    config.releaseSpec = project.findProperty( 'uploadReleaseSpec' ) ?: config.releases
-    config.wagon = project.findProperty( 'uploadWagon' ) ?: WAGON_HTTP
-    config.repositoryName = project.findProperty( 'uploadRepositoryName' ) ?:
-                            config.releases ? RELEASES_REPOSITORY_NAME : SNAPSHOTS_REPOSITORY_NAME
-    config.repositoryUrl = project.findProperty( 'uploadRepository' ) ?:
-                           config.releases ? RELEASES_REPOSITORY_URL : SNAPSHOTS_REPOSITORY_URL
-    config.username = project.findProperty( 'uploadUsername' )
-    config.password = project.findProperty( 'uploadPassword' )
-    return config
-  }
-
-  private static void applyWagonConfiguration( Project project, Config config )
-  {
-    project.configurations.create( 'deployersJars' )
-    project.dependencies.add( 'deployersJars', config.wagon )
-  }
-
-  private static void configureSigning( Project project, Config config )
-  {
-    project.plugins.apply 'signing'
-    def signing = project.extensions.getByType( SigningExtension )
-    signing.required = config.signed
-    signing.sign project.configurations.getByName( 'archives' )
-    def signArchives = project.tasks.getByName( 'signArchives' ) as Sign
-    signArchives.onlyIf { !project.findProperty( 'skipSigning' ) }
-  }
-
-  private static void configureUploadArchives( Project project, Config config )
-  {
-    project.plugins.apply 'maven'
-    def uploadArchives = project.tasks.getByName( 'uploadArchives' ) as Upload
-    uploadArchives.doFirst {
-      if( project.version == "0" )
-      {
-        throw new GradleException( "'version' must be given as a system property to perform a release." )
-      }
-    }
-    uploadArchives.onlyIf {
-      def notSkipped = !project.hasProperty( 'skipUpload' )
-      def approvedProject = project.rootProject.extensions.getByType( ReleaseSpecExtension ).approvedProjects.contains( project )
-      return notSkipped && ( !config.releaseSpec || ( approvedProject || project == project.rootProject ) )
-    }
-    uploadArchives.dependsOn project.tasks.getByName( 'check' )
-    def repositoriesConvention = new DslObject( uploadArchives.repositories )
-      .getConvention()
-      .getPlugin( MavenRepositoryHandlerConvention )
-    def mavenDeployer = repositoriesConvention.mavenDeployer() as DefaultGroovyMavenDeployer
-    if( config.signed )
-    {
-      mavenDeployer.beforeDeployment { MavenDeployment deployment ->
-        project.extensions.getByType( SigningExtension ).signPom( deployment )
-      }
-    }
-    mavenDeployer.configuration = project.configurations.getByName( 'deployersJars' )
-    def repository = new MavenRemoteRepository()
-    repository.id = config.repositoryName
-    repository.url = config.repositoryUrl
-    if( config.username )
-    {
-      repository.authentication.userName = config.username
-      repository.authentication.password = config.password
-    }
-    if( config.releases )
-    {
-      mavenDeployer.repository = repository
-    }
-    else
-    {
-      mavenDeployer.snapshotRepository = repository
-    }
-  }
-
-  private static void configureMavenMetadata( Project project )
-  {
-    def uploadArchives = project.tasks.getByName( 'uploadArchives' ) as Upload
-    def mavenDeployer = uploadArchives.repositories.getByName( 'mavenDeployer' ) as MavenDeployer
-    MavenMetadata.applyTo( mavenDeployer )
-  }
-
-  private static void applyMavenPublishAuth( final Project project )
-  {
-    // Bug in maven-publish-auth require apply after uploadArchives setup
-    project.plugins.apply 'maven-publish-auth'
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/CheckReleaseSpecTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/CheckReleaseSpecTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/CheckReleaseSpecTask.groovy
deleted file mode 100644
index d1fe082..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/CheckReleaseSpecTask.groovy
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.release
-
-import groovy.transform.CompileStatic
-import org.gradle.api.DefaultTask
-import org.gradle.api.GradleException
-import org.gradle.api.Project
-import org.gradle.api.artifacts.ProjectDependency
-import org.gradle.api.tasks.TaskAction
-
-@CompileStatic
-class CheckReleaseSpecTask extends DefaultTask
-{
-  CheckReleaseSpecTask()
-  {
-    description = 'Ensure that no releasable module depend on module(s) that don\'t fit the release criteria.'
-    doFirst {
-      def approvedProjects = project.extensions.getByType( ReleaseSpecExtension ).approvedProjects
-      dependsOn approvedProjects.collect { each -> each.configurations.getByName( 'runtime' ) }
-    }
-  }
-
-  @TaskAction
-  void check()
-  {
-    Map<Project, Set<ProjectDependency>> notReleasable = [ : ]
-    def approvedProjects = project.extensions.getByType( ReleaseSpecExtension ).approvedProjects
-    approvedProjects.each { approvedProject ->
-      def projectDependencies = approvedProject.configurations.getByName( 'runtime' ).allDependencies.findAll {
-        it instanceof ProjectDependency
-      } as Set<ProjectDependency>
-      projectDependencies.each { dep ->
-        def depNotReleaseApproved = approvedProjects.findAll { rp ->
-          rp.group == dep.dependencyProject.group && rp.name == dep.dependencyProject.name
-        }.isEmpty()
-        if( depNotReleaseApproved )
-        {
-          if( !notReleasable[ approvedProject ] )
-          {
-            notReleasable[ approvedProject ] = [ ] as Set
-          }
-          notReleasable[ approvedProject ] << dep
-        }
-      }
-    }
-    if( !notReleasable.isEmpty() )
-    {
-      def errorMessage = new StringBuilder()
-      errorMessage << "At least one releasable module depends on module(s) that don't fit the release criteria!\n"
-      errorMessage << "\tOffending module -> Non releasable dependencies\n"
-      notReleasable.each { k, v ->
-        def noRlsDeps = v.collect { d -> ':' + d.dependencyProject.group + ':' + d.dependencyProject.name }
-        errorMessage << "\t$k -> ${ noRlsDeps })\n"
-      }
-      errorMessage << "Check the dev-status.xml file content in each modules directory."
-      throw new GradleException( errorMessage.toString() )
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpec.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpec.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpec.groovy
deleted file mode 100644
index c80c6bd..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpec.groovy
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.release;
-
-import org.gradle.api.Project
-
-class ModuleReleaseSpec
-{
-  boolean satisfiedBy( Project project )
-  {
-    def devStatusFile = new File( project.projectDir, "dev-status.xml" )
-    if( !devStatusFile.exists() )
-    {
-      return false
-    }
-    def module = new XmlSlurper().parse( devStatusFile )
-    def codebase = module.status.codebase.text() as String
-    def docs = module.status.documentation.text() as String
-    def tests = module.status.unittests.text() as String
-    return satisfiedBy( codebase, docs, tests )
-  }
-
-  boolean satisfiedBy( String codebase, String docs, String tests )
-  {
-    def satisfied = ( codebase == 'none' && docs == 'complete' )
-    satisfied |= ( codebase == 'early'
-            && ( docs == 'complete' || docs == 'good' )
-            && ( tests == 'complete' || tests == 'good' ) )
-    satisfied |= ( codebase == 'beta'
-            && ( docs == 'complete' || docs == 'good' || docs == 'brief' )
-            && ( tests == 'complete' || tests == 'good' || tests == 'some' ) )
-    satisfied |= ( codebase == 'stable' )
-    satisfied |= ( codebase == 'mature' )
-    // TODO Add a task to report this easily
-    // println "$project.name($satisfied) -> $codebase, $docs, $tests"
-    return satisfied
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseApprovedProjectsTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseApprovedProjectsTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseApprovedProjectsTask.groovy
deleted file mode 100644
index 9a93925..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseApprovedProjectsTask.groovy
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.release
-
-import groovy.json.JsonBuilder
-import groovy.transform.CompileStatic
-import org.gradle.api.DefaultTask
-import org.gradle.api.file.FileCollection
-import org.gradle.api.tasks.InputFiles
-import org.gradle.api.tasks.OutputFile
-import org.gradle.api.tasks.TaskAction
-
-/**
- * Write paths of release approved projects to a JSON file.
- *
- * This task sole purpose is proper up-do-date behaviour when changing {@literal dev-status.xml} files.
- */
-@CompileStatic
-class ReleaseApprovedProjectsTask extends DefaultTask
-{
-  @InputFiles
-  FileCollection getDevStatusFiles()
-  {
-    return project.files( project.allprojects
-                                 .collect( { project -> project.file( 'dev-status.xml' ) } )
-                                 .findAll( { it.exists() } ) )
-  }
-
-  @OutputFile
-  File getJsonApprovedProjects()
-  {
-    return new File( new File( project.buildDir, 'release' ), 'approved-projects.json' )
-  }
-
-  @TaskAction
-  void approveProjects()
-  {
-    def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
-    jsonApprovedProjects.parentFile.mkdirs()
-    jsonApprovedProjects.text = new JsonBuilder( releaseSpec.approvedProjects.collect( { it.path } ) ).toPrettyString()
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseSpecExtension.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseSpecExtension.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseSpecExtension.groovy
deleted file mode 100644
index c5b0887..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseSpecExtension.groovy
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.release
-
-import groovy.transform.CompileStatic
-import org.gradle.api.Project
-
-/**
- * Provide release approved projects.
- *
- * There's no up-to-date checking on Gradle extensions.
- * Depend on {@link ReleaseApprovedProjectsTask} to get a good up-to-date behavior.
- */
-@CompileStatic
-class ReleaseSpecExtension
-{
-  static final String NAME = 'releaseSpec'
-  Set<Project> approvedProjects
-
-  ReleaseSpecExtension( Project rootProject )
-  {
-    def spec = new ModuleReleaseSpec()
-    approvedProjects = rootProject.allprojects.findAll( { p -> spec.satisfiedBy( p ) } )
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseSpecPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseSpecPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseSpecPlugin.groovy
deleted file mode 100644
index 34422a9..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/release/ReleaseSpecPlugin.groovy
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.release
-
-import groovy.transform.CompileStatic
-import org.apache.polygene.gradle.TaskGroups
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.Task
-
-@CompileStatic
-class ReleaseSpecPlugin implements Plugin<Project>
-{
-  static class TaskNames
-  {
-    static final String RELEASE_APPROVED_PROJECTS = 'releaseSpecApprovedProjects'
-    static final String CHECK_RELEASE_SPEC = 'checkReleaseSpec'
-  }
-
-  @Override
-  void apply( final Project project )
-  {
-    if( project != project.rootProject )
-    {
-      throw new IllegalStateException( "This plugin is only applicable to the root project" )
-    }
-    applyReleaseSpec( project )
-  }
-
-  private static void applyReleaseSpec( Project project )
-  {
-    project.extensions.create( ReleaseSpecExtension.NAME, ReleaseSpecExtension, project.rootProject )
-    project.tasks.create( TaskNames.RELEASE_APPROVED_PROJECTS, ReleaseApprovedProjectsTask ) { Task task ->
-      task.group = TaskGroups.RELEASE
-      task.description = 'Apply release specification to projects in the build'
-    }
-    project.tasks.create( TaskNames.CHECK_RELEASE_SPEC, CheckReleaseSpecTask ) { Task task ->
-      task.group = TaskGroups.RELEASE_VERIFICATION
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/RootPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/RootPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/RootPlugin.groovy
new file mode 100644
index 0000000..5b0c497
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/RootPlugin.groovy
@@ -0,0 +1,45 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.BasePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+@CompileStatic
+class RootPlugin implements Plugin<Project>
+{
+  static final String PROJECT_TITLE = 'Apache Polygene\u2122 (Java Edition) SDK'
+  static final String PROJECT_DESCRIPTION = 'Apache Polygene\u2122 (Java Edition) is a framework for domain centric ' +
+                                            'application development, including evolved concepts from AOP, DI and DDD.'
+
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply BasePlugin
+    applyProjectMetadata( project )
+  }
+
+  private static void applyProjectMetadata( Project project )
+  {
+    def extraProperties = project.extensions.extraProperties
+    extraProperties.set 'title', PROJECT_TITLE
+    extraProperties.set 'description', PROJECT_DESCRIPTION
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/SettingsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/SettingsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/SettingsPlugin.groovy
new file mode 100644
index 0000000..f252055
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/SettingsPlugin.groovy
@@ -0,0 +1,41 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure
+
+import org.gradle.api.Plugin
+import org.gradle.api.initialization.Settings
+import org.gradle.api.JavaVersion
+
+class SettingsPlugin implements Plugin<Settings>
+{
+  @Override
+  void apply( Settings settings )
+  {
+    checkPreconditions settings
+  }
+
+  static void checkPreconditions( Settings setting )
+  {
+    def java = JavaVersion.current()
+    def mini = JavaVersion.VERSION_1_8
+    if( java < mini )
+    {
+      throw new Exception( "Cannot build using Java ${ java }, please use ${ JavaVersion.VERSION_1_8 } or greater." )
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/core/CorePlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/core/CorePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/core/CorePlugin.groovy
new file mode 100644
index 0000000..a07d88f
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/core/CorePlugin.groovy
@@ -0,0 +1,46 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.core
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.code.PublishedCodePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.tasks.compile.JavaCompile
+
+@CompileStatic
+class CorePlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply PublishedCodePlugin
+    configureJava( project )
+  }
+
+  private static void configureJava( Project project )
+  {
+    project.tasks.withType( JavaCompile ) { JavaCompile task ->
+      // Unchecked warnings for non-test compilations
+      if( !task.name.toLowerCase( Locale.US ).contains( 'test' ) )
+      {
+        task.options.compilerArgs << '-Xlint:unchecked'
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy
new file mode 100644
index 0000000..0deb84d
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy
@@ -0,0 +1,523 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.distributions
+
+import groovy.transform.CompileStatic
+import groovy.transform.TypeCheckingMode
+import java.nio.file.Files
+import java.nio.file.Path
+import org.apache.commons.io.FileUtils
+import org.apache.polygene.gradle.BasePlugin
+import org.apache.polygene.gradle.TaskGroups
+import org.apache.polygene.gradle.code.PublishedCodePlugin
+import org.apache.polygene.gradle.dependencies.DependenciesDeclarationExtension
+import org.apache.polygene.gradle.dependencies.DependenciesPlugin
+import org.apache.polygene.gradle.structure.release.ReleaseSpecExtension
+import org.apache.polygene.gradle.tasks.ExecLogged
+import org.apache.rat.gradle.RatTask
+import org.apache.tools.ant.filters.ReplaceTokens
+import org.gradle.api.Action
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.Task
+import org.gradle.api.artifacts.Dependency
+import org.gradle.api.artifacts.component.ModuleComponentIdentifier
+import org.gradle.api.artifacts.result.ComponentArtifactsResult
+import org.gradle.api.artifacts.result.ResolvedArtifactResult
+import org.gradle.api.artifacts.result.ResolvedDependencyResult
+import org.gradle.api.file.CopySpec
+import org.gradle.api.file.FileCopyDetails
+import org.gradle.api.tasks.Copy
+import org.gradle.api.tasks.Sync
+import org.gradle.api.tasks.bundling.Compression
+import org.gradle.api.tasks.bundling.Tar
+import org.gradle.api.tasks.bundling.Zip
+import org.gradle.language.base.plugins.LifecycleBasePlugin
+import org.gradle.maven.MavenModule
+import org.gradle.maven.MavenPomArtifact
+import org.gradle.plugins.ide.internal.IdeDependenciesExtractor
+import org.gradle.plugins.ide.internal.resolver.model.IdeExtendedRepoFileDependency
+
+// TODO Expose all project outputs into configurations
+@CompileStatic
+class DistributionsPlugin implements Plugin<Project>
+{
+  static class TaskNames
+  {
+    static final String STAGE_SOURCE_DIST = 'stageSourceDistribution'
+    static final String ZIP_SOURCE_DIST = 'zipSourceDistribution'
+    static final String TAR_SOURCE_DIST = 'tarSourceDistribution'
+
+    static final String STAGE_MAVEN_BINARIES = 'stageBinariesMavenRepository'
+    static final String STAGE_BINARY_DIST = 'stageBinaryDistribution'
+    static final String ZIP_BINARY_DIST = 'zipBinaryDistribution'
+    static final String TAR_BINARY_DIST = 'tarBinaryDistribution'
+
+    private static final String STAGE_MAVEN_DEPENDENCIES = 'stageDependenciesMavenRepository'
+    static final String ZIP_DEPENDENCIES_DIST = 'zipDependenciesDistribution'
+
+    static final String CHECK_DISTRIBUTIONS = 'checkDistributions'
+    static final String CHECK_SOURCE_DIST = 'checkSourceDistribution'
+    static final String CHECK_BINARY_DIST = 'checkBinaryDistribution'
+    private static final String RAT_SOURCE_DIST = 'ratSourceDistribution'
+    private static final String BUILD_SOURCE_DIST = 'buildSourceDistribution'
+    private static final String RAT_BINARY_DIST = 'ratBinaryDistribution'
+  }
+
+  @Override
+  void apply( final Project project )
+  {
+    project.plugins.apply BasePlugin
+    project.plugins.apply org.gradle.api.plugins.BasePlugin
+    project.plugins.apply DependenciesPlugin
+    applyStageBinariesMavenRepository project
+    applyStageLibrariesMavenRepository project
+    applyAssembleDistributions project
+    applyCheckDistributions project
+    configureDistributionChecksums project
+  }
+
+  private static void applyAssembleDistributions( Project project )
+  {
+    applySourceDistribution project
+    applyBinaryDistribution project
+  }
+
+  private static void applyCheckDistributions( Project project )
+  {
+    def distChecks = [ applySourceDistributionCheck( project ),
+                       applyBinaryDistributionCheck( project ) ]
+    project.tasks.create( TaskNames.CHECK_DISTRIBUTIONS ) { Task task ->
+      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
+      task.description = 'Run all distribution checks.'
+      task.dependsOn distChecks
+    }
+  }
+
+  private static void applySourceDistribution( Project project )
+  {
+    def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
+    def srcDistFilesCopySpec = project.copySpec { CopySpec spec ->
+      spec.from project.rootProject.projectDir
+      spec.include '*.txt'
+      spec.include 'doap.rdf'
+      spec.include '*.gradle'
+      spec.include 'gradlew*'
+      spec.include 'gradle/**'
+      spec.include 'etc/**'
+      spec.include 'buildSrc/**'
+      spec.include 'src/**'
+      releaseSpec.publishedProjects.each { p ->
+        def relPath = new File( project.rootProject.projectDir.toURI().relativize( p.projectDir.toURI() ).toString() )
+        spec.include "$relPath/**"
+      }
+      spec.include 'manual/**'
+      spec.include 'samples/**'
+      spec.include 'tests/**'
+      spec.include 'tutorials/**'
+      spec.include 'tools/shell/**'
+      // Filtered, see below
+      spec.exclude 'settings.gradle'
+      spec.exclude 'gradle.properties'
+      // Excludes
+      spec.exclude '**/build/**'             // Build output
+      spec.exclude 'derby.log'               // Derby test garbage
+      spec.exclude '**/*.iml'                // IDEA files
+      spec.exclude '**/*.ipr'                // IDEA files
+      spec.exclude '**/*.iws'                // IDEA files
+      spec.exclude '**/.idea'                // IDEA files
+      spec.exclude '**/out/**'               // IDEA build output
+      spec.exclude '**/.classpath'           // Eclipse files
+      spec.exclude '**/.project'             // Eclipse files
+      spec.exclude '**/.settings'            // Eclipse files
+      spec.exclude '**/.nb-gradle/**'        // Netbeans files
+      spec.exclude '**/.nb-gradle*'          // Netbeans files
+      spec.exclude '**/.git/**'              // Git directories
+      spec.exclude '**/.git*'                // Git files
+      spec.exclude '**/.gradle/**'           // Gradle caches
+      spec.exclude '**/.gradletasknamecache' // Gradle shell completion cache
+      spec.into '.'
+    }
+    def srcDistSupplementaryFilesCopySpec = project.copySpec { CopySpec spec ->
+      spec.from project.file( 'src/src-dist' )
+      spec.into '.'
+    }
+    def srcDistFilteredFilesTask = project.tasks.create 'srcDistFilteredFiles'
+    srcDistFilteredFilesTask.description = 'Apply release specification to source distribution build scripts'
+    // Generates various files for the source distribution
+    // - settings.gradle
+    // - gradle.properties to set version !
+    def filteredDir = new File( "$project.buildDir/tmp/srcDistFilteredFiles" )
+    srcDistFilteredFilesTask.outputs.file filteredDir
+    srcDistFilteredFilesTask.doLast {
+      // Settings
+      def settingsFile = new File( filteredDir, 'settings.gradle' )
+      settingsFile.parentFile.mkdirs()
+      if( releaseSpec.releaseVersion )
+      {
+        def filteredSettings = ''
+        def unapprovedProjectPaths = releaseSpec.unapprovedProjects.collect { p -> p.path.substring( 1 ) }
+        project.rootProject.file( 'settings.gradle' ).readLines().each { line ->
+          if( !unapprovedProjectPaths.find { p -> line.contains p } )
+          {
+            filteredSettings += "$line\n"
+          }
+        }
+        settingsFile.text = filteredSettings
+      }
+      else
+      {
+        settingsFile.text = project.rootProject.file( 'settings.gradle' ).text
+      }
+      // gradle.properties
+      def gradlePropsFile = new File( filteredDir, 'gradle.properties' )
+      gradlePropsFile.parentFile.mkdirs()
+      gradlePropsFile.text = project.rootProject.file( 'gradle.properties' ).text +
+                             "\nskipSigning=true\nskipAsciidocIfAbsent=true\n\nversion=$project.version\n"
+    }
+    def srcDistFilteredFilesCopySpec = project.copySpec { CopySpec spec ->
+      spec.from srcDistFilteredFilesTask
+      spec.into '.'
+    }
+    def srcDistCopySpec = project.copySpec { CopySpec spec ->
+      spec.into "apache-polygene-java-$project.version-src"
+      spec.with srcDistFilesCopySpec
+      spec.with srcDistSupplementaryFilesCopySpec
+      spec.with srcDistFilteredFilesCopySpec
+    }
+
+    def zipSources = project.tasks.create( TaskNames.ZIP_SOURCE_DIST, Zip ) { Zip task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = 'Assembles .zip source distribution.'
+      task.baseName = 'apache-polygene-java'
+      task.with srcDistCopySpec
+      task.classifier = 'src'
+    }
+    def tarSources = project.tasks.create( TaskNames.TAR_SOURCE_DIST, Tar ) { Tar task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = 'Assembles .tar.gz source distribution.'
+      task.baseName = 'apache-polygene-java'
+      task.with srcDistCopySpec
+      task.compression = Compression.GZIP
+      task.classifier = 'src'
+    }
+    project.artifacts.add( 'archives', zipSources )
+    project.artifacts.add( 'archives', tarSources )
+
+    project.tasks.create( TaskNames.STAGE_SOURCE_DIST, Copy ) { Copy task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = "Stages the source distribution in the build directory."
+      task.with srcDistCopySpec
+      task.into 'build/stage/source-distribution'
+    }
+  }
+
+  private static Task applySourceDistributionCheck( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    project.plugins.apply 'org.nosphere.apache.rat-base'
+    def unpackedSrcDistDir = project.file( "build/stage/source-distribution/apache-polygene-java-$project.version-src" )
+    project.tasks.create( TaskNames.RAT_SOURCE_DIST, RatTask, { RatTask task ->
+      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
+      task.description = 'Checks the source distribution using Apache RAT.'
+      task.dependsOn TaskNames.STAGE_SOURCE_DIST
+      task.setInputDir unpackedSrcDistDir.absolutePath
+      task.onlyIf { !releaseSpec.developmentVersion }
+      task.excludes = [
+        '**/.DS_Store/**', '**/._*',
+        // Git Files
+        '**/.git/**', '**/.gitignore',
+        // Gradle Files
+        'gradle/wrapper/**', '**/gradlew', '**/gradlew.bat', '**/.gradle/**',
+        // Build Output
+        '**/build/**', '**/derby.log', 'out/**',
+        // IDE Files
+        '**/.idea/**', '**/*.iml', '**/*.ipr', '**/*.iws',
+        '**/.settings/**', '**/.classpath', '**/.project',
+        '**/.gradletasknamecache', '**/private/cache/**',
+        '**/.nb-gradle-properties', '**/.nb-gradle/**',
+        // JSON files are not allowed to have comments, according to http://www.json.org/ and http://www.ietf.org/rfc/rfc4627.txt
+        '**/*.json',
+        // Various Text Resources
+        '**/README.*', '**/README*.*', '**/TODO',
+        '**/src/main/resources/**/*.txt',
+        '**/src/test/resources/**/*.txt',
+        'libraries/rest-server/src/main/resources/**/*.htm',
+        'libraries/rest-server/src/main/resources/**/*.atom',
+        'tools/qidea/src/main/resources/**/*.ft',
+        'tools/qidea/src/main/resources/**/*.template',
+        // Graphic Resources
+        '**/*.svg', '**/*.gif', '**/*.png', '**/*.jpg', '**/*.psd',
+        // Keystores
+        '**/*.jceks',
+        // Syntax Highlighter - MIT
+        'manual/**/sh*.css', 'manual/**/sh*.js',
+        // jQuery & plugins - MIT
+        'manual/**/jquery*.js',
+        // W3C XML Schemas - W3C Software License
+        'samples/rental/src/main/resources/*.xsd',
+        // Polygene Generator Heroes Templates - MIT
+        'tools/generator-polygene/app/templates/Heroes/**',
+        // templates that will become the user's source files, should not have license headers
+        'tools/shell/src/dist/etc/templates/**',
+      ]
+    } as Action<RatTask> )
+    project.tasks.create( TaskNames.BUILD_SOURCE_DIST, ExecLogged, { ExecLogged task ->
+      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
+      task.description = 'Checks the source distribution by running `gradle build` inside.'
+      task.dependsOn TaskNames.STAGE_SOURCE_DIST
+      task.mustRunAfter TaskNames.RAT_SOURCE_DIST
+      def workDir = project.file( "$project.buildDir/tmp/${ TaskNames.BUILD_SOURCE_DIST }" )
+      task.inputs.dir unpackedSrcDistDir
+      task.workingDir = workDir
+      task.commandLine = [ './gradlew', 'build', '-u', '-s', /* '-g', workDir */ ]
+      task.doFirst {
+        project.copy { CopySpec spec ->
+          spec.from unpackedSrcDistDir
+          spec.into workDir
+        }
+      }
+      task.doLast {
+        if( workDir.exists() )
+        {
+          FileUtils.deleteDirectory( workDir )
+        }
+      }
+    } as Action<ExecLogged> )
+    project.tasks.create( TaskNames.CHECK_SOURCE_DIST ) { Task task ->
+      task.description = "Checks the source distribution."
+      task.dependsOn TaskNames.RAT_SOURCE_DIST, TaskNames.BUILD_SOURCE_DIST
+    }
+  }
+
+  private static void applyBinaryDistribution( Project project )
+  {
+    def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
+    def reportsDistCopySpec = project.copySpec { CopySpec spec ->
+      spec.from "$project.rootProject.projectDir/reports/build/reports"
+      spec.into 'docs/reports'
+    }
+    def docsCopySpec = project.copySpec { CopySpec spec ->
+      spec.from "$project.rootProject.projectDir/reports/build/docs"
+      spec.from "$project.rootProject.projectDir/manual/build/docs/website"
+      spec.into 'docs'
+    }
+    def libsCopySpec = project.copySpec { CopySpec spec ->
+      spec.from project.tasks.getByName( TaskNames.STAGE_MAVEN_BINARIES )
+      spec.into 'libs/'
+      spec.exclude '**-testsources.jar'
+      spec.exclude '**/*.asc'
+    }
+    def extraDistTextCopySpec = project.copySpec { CopySpec spec ->
+      releaseSpec.publishedProjects.collect { p ->
+        spec.from project.fileTree( dir: "$p.projectDir/src/dist/", include: '**', exclude: "**/*.jar*" )
+        spec.eachFile { FileCopyDetails fcd ->
+          fcd.filter( ReplaceTokens, tokens: [ version: project.version ] )
+        }
+      }
+      spec.into '.'
+    }
+    def extraDistBinCopySpec = project.copySpec { CopySpec spec ->
+      releaseSpec.publishedProjects.collect { p ->
+        spec.from "$p.projectDir/src/dist/"
+        spec.include '**/*.jar'
+        spec.include '**/*.jar_'
+      }
+      spec.into '.'
+    }
+    def binDistNoticesCopySpec = project.copySpec { CopySpec spec ->
+      spec.from "$project.projectDir/LICENSE.txt"
+      spec.from "$project.projectDir/src/bin-dist"
+      spec.into '.'
+    }
+    def binDistImage = project.copySpec { CopySpec spec ->
+      spec.into "apache-polygene-java-$project.version-bin"
+      spec.with binDistNoticesCopySpec
+      spec.with docsCopySpec
+      spec.with reportsDistCopySpec
+      spec.with extraDistTextCopySpec
+      spec.with extraDistBinCopySpec
+      spec.with libsCopySpec
+    }
+
+    def binariesBuildDependencies = {
+      project.rootProject.allprojects
+             .findAll { p -> p.plugins.hasPlugin( PublishedCodePlugin ) || p.path == ':manual' || p.path == ':reports' }
+             .collect { p -> "${ p.path }:${ LifecycleBasePlugin.BUILD_TASK_NAME }" }
+    }
+
+    def zipBinaries = project.tasks.create( TaskNames.ZIP_BINARY_DIST, Zip ) { Zip task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = 'Assembles .zip binary distribution.'
+      task.dependsOn binariesBuildDependencies
+      task.baseName = 'apache-polygene-java'
+      task.classifier = 'bin'
+      task.with binDistImage
+    }
+    def tarBinaries = project.tasks.create( TaskNames.TAR_BINARY_DIST, Tar ) { Tar task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = 'Assembles .tar.gz binary distribution.'
+      task.dependsOn binariesBuildDependencies
+      task.baseName = 'apache-polygene-java'
+      task.classifier = 'bin'
+      task.compression = Compression.GZIP
+      task.with binDistImage
+    }
+    project.artifacts.add( 'archives', zipBinaries )
+    project.artifacts.add( 'archives', tarBinaries )
+
+    project.tasks.create( TaskNames.STAGE_BINARY_DIST, Copy ) { Copy task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = "Stages the binary distribution in the build directory."
+      task.with binDistImage
+      task.into 'build/stage/binary-distribution'
+    }
+  }
+
+  private static Task applyBinaryDistributionCheck( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    project.plugins.apply 'org.nosphere.apache.rat-base'
+    def unpackedBinDistDir = project.file( "build/stage/binary-distribution/apache-polygene-java-$project.version-bin" )
+    project.tasks.create( TaskNames.RAT_BINARY_DIST, RatTask, { RatTask task ->
+      task.group = TaskGroups.DISTRIBUTION_VERIFICATION
+      task.description = "Checks the binary distribution using Apache RAT."
+      task.onlyIf { !releaseSpec.developmentVersion }
+      task.dependsOn TaskNames.STAGE_BINARY_DIST
+      task.inputDir = unpackedBinDistDir.absolutePath
+      task.reportDir = project.file( 'build/reports/rat-bin-dist' )
+      task.excludes = [
+        '.gradle/**',
+        'docs/**',
+        'etc/templates/**',
+        'libs/**'
+      ]
+    } as Action<RatTask> )
+    project.tasks.create( TaskNames.CHECK_BINARY_DIST ) { Task task ->
+      task.description = 'Checks the binary distribution.'
+      task.dependsOn TaskNames.RAT_BINARY_DIST
+    }
+  }
+
+  @CompileStatic( TypeCheckingMode.SKIP )
+  private static void configureDistributionChecksums( Project project )
+  {
+    project.tasks.withType( Zip ) { Zip task ->
+      task.doLast {
+        project.ant.checksum file: task.archivePath, algorithm: 'MD5'
+        project.ant.checksum file: task.archivePath, algorithm: 'SHA-512'
+      }
+    }
+    project.tasks.withType( Tar ) { Tar task ->
+      task.doLast {
+        project.ant.checksum file: task.archivePath, algorithm: 'MD5'
+        project.ant.checksum file: task.archivePath, algorithm: 'SHA-512'
+      }
+    }
+  }
+
+  private static void applyStageBinariesMavenRepository( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    project.tasks.create( TaskNames.STAGE_MAVEN_BINARIES, Sync, { Sync task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = 'Stages published binaries as a maven repository in the build directory.'
+      releaseSpec.publishedProjects.each { p ->
+        task.dependsOn "${ p.path }:uploadStageArchives"
+        task.from "${ p.buildDir }/stage/archives"
+      }
+      task.into project.file( "$project.buildDir/stage/maven-binaries" )
+    } as Action<Sync> )
+  }
+
+  private static void applyStageLibrariesMavenRepository( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    def dependenciesDeclaration = project.rootProject.extensions.getByType DependenciesDeclarationExtension
+    def stageTask = project.tasks.create( TaskNames.STAGE_MAVEN_DEPENDENCIES ) { Task task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = 'Stages dependencies of published binaries as a maven repository in the build directory. (BIG)'
+      def output = project.file "$project.buildDir/stage/dependencies"
+      task.inputs.property 'libraries', dependenciesDeclaration.libraries
+      task.outputs.dir output
+      task.doLast {
+        // Resolve runtime dependencies across all staged projects
+        def libraries = [ ] as Set<Dependency>
+        releaseSpec.publishedProjects.each { p ->
+          libraries += p.configurations.getByName( 'runtime' ).allDependencies
+        }
+        def configuration = project.configurations.detachedConfiguration( libraries as Dependency[] )
+        DependenciesPlugin.applyDependencyResolutionRules configuration, dependenciesDeclaration
+        // Copy Maven POMs
+        def allDependencies = configuration.incoming.resolutionResult.allDependencies as Set<ResolvedDependencyResult>
+        def componentIds = allDependencies.collect { it.selected.id }
+        def result = project.dependencies.createArtifactResolutionQuery()
+                            .forComponents( componentIds )
+                            .withArtifacts( MavenModule, MavenPomArtifact )
+                            .execute()
+        result.resolvedComponents.each { ComponentArtifactsResult component ->
+          def id = component.id
+          if( id instanceof ModuleComponentIdentifier )
+          {
+            def artifact = component.getArtifacts( MavenPomArtifact )[ 0 ]
+            if( artifact instanceof ResolvedArtifactResult )
+            {
+              def groupDir = new File( output, id.getGroup().split( "\\." ).join( '/' ) )
+              File moduleDir = new File( groupDir, "${ id.getModule() }/${ id.getVersion() }" )
+              Files.createDirectories moduleDir.toPath()
+              def destination = new File( moduleDir, artifact.getFile().getName() ).toPath()
+              Files.exists( destination ) ?: Files.copy( artifact.getFile().toPath(), destination )
+            }
+          }
+        }
+        // Copy Maven artifacts using the Gradle IDE Model
+        // Include sources if available, otherwise include javadoc if available
+        IdeDependenciesExtractor dependenciesExtractor = new IdeDependenciesExtractor();
+        def ideDependencies = dependenciesExtractor.extractRepoFileDependencies project.dependencies,
+                                                                                [ configuration ], [ ],
+                                                                                true, true
+        ideDependencies.each { IdeExtendedRepoFileDependency ideDependency ->
+          def id = ideDependency.id
+          def groupDir = new File( output, id.group.split( "\\." ).join( '/' ) )
+          File moduleDir = new File( groupDir, "${ id.name }/${ id.version }" )
+          Files.createDirectories moduleDir.toPath()
+          Path destination = new File( moduleDir, ideDependency.file.name ).toPath()
+          Files.exists( destination ) ?: Files.copy( ideDependency.file.toPath(), destination )
+          if( ideDependency.sourceFile )
+          {
+            def sourceDestination = new File( moduleDir, ideDependency.sourceFile.name ).toPath()
+            Files.exists( sourceDestination ) ?: Files.copy( ideDependency.sourceFile.toPath(), sourceDestination )
+          }
+          else if( ideDependency.javadocFile )
+          {
+            def javadocDestination = new File( moduleDir, ideDependency.javadocFile.name ).toPath()
+            Files.exists( javadocDestination ) ?: Files.copy( ideDependency.javadocFile.toPath(), javadocDestination )
+          }
+        }
+      }
+    }
+    project.tasks.create( TaskNames.ZIP_DEPENDENCIES_DIST, Zip ) { Zip task ->
+      task.group = TaskGroups.DISTRIBUTION
+      task.description = 'Assemble .zip dependencies distribution (BIG)'
+      task.baseName = 'apache-polygene-java'
+      task.classifier = 'dependencies'
+      task.from stageTask
+      task.into "apache-polygene-java-$project.version-dependencies"
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/extensions/ExtensionPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/extensions/ExtensionPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/extensions/ExtensionPlugin.groovy
new file mode 100644
index 0000000..735952c
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/extensions/ExtensionPlugin.groovy
@@ -0,0 +1,33 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.extensions
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.code.PublishedCodePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+@CompileStatic
+class ExtensionPlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply PublishedCodePlugin
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalPlugin.groovy
new file mode 100644
index 0000000..baa8842
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/internals/InternalPlugin.groovy
@@ -0,0 +1,33 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.internals
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.code.CodePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+@CompileStatic
+class InternalPlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply CodePlugin
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/libraries/LibraryPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/libraries/LibraryPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/libraries/LibraryPlugin.groovy
new file mode 100644
index 0000000..7603e8b
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/libraries/LibraryPlugin.groovy
@@ -0,0 +1,31 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.libraries
+
+import org.apache.polygene.gradle.code.PublishedCodePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+class LibraryPlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply PublishedCodePlugin
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/AsciidocBuildInfoPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/AsciidocBuildInfoPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/AsciidocBuildInfoPlugin.groovy
new file mode 100644
index 0000000..220bc38
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/AsciidocBuildInfoPlugin.groovy
@@ -0,0 +1,60 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.manual
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.TaskGroups
+import org.gradle.api.Project
+import org.gradle.api.Plugin
+
+@CompileStatic
+class AsciidocBuildInfoPlugin implements Plugin<Project>
+{
+  final static String TASK_NAME = 'makeAsciidocBuildInfo'
+
+  void apply( Project project )
+  {
+    def buildInfoDir = new File( project.buildDir, "docs/buildinfo" );
+
+    def makeAsciidocBuildInfoTask = project.tasks.create( TASK_NAME )
+    makeAsciidocBuildInfoTask.group = TaskGroups.DOCUMENTATION
+    makeAsciidocBuildInfoTask.description = 'Generates asciidoc artifact snippet'
+    makeAsciidocBuildInfoTask.doLast {
+      buildInfoDir.mkdirs()
+
+      // GroupID, ArtifactID, Version table in artifact.txt
+      def artifactTableFile = new File( buildInfoDir, "artifact.txt" )
+      def artifactTable = """
+        |.Artifact
+        |[role="artifact", options="header,autowidth"]
+        ||===================================================
+        ||Group ID|Artifact ID|Version
+        ||${ project.group }|${ project.name }|${ project.version }
+        ||===================================================
+        """.stripMargin()
+      artifactTableFile.withWriter { out -> out.println( artifactTable ) }
+    }
+
+    // Declare inputs/outputs
+    if( project.getBuildFile() != null && project.getBuildFile().exists() )
+    {
+      makeAsciidocBuildInfoTask.getInputs().file( project.getBuildFile() )
+    }
+    makeAsciidocBuildInfoTask.getOutputs().file( buildInfoDir )
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/DocumentationTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/DocumentationTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/DocumentationTask.groovy
new file mode 100644
index 0000000..d32320d
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/DocumentationTask.groovy
@@ -0,0 +1,320 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.manual
+
+import groovy.io.FileType
+import groovy.transform.CompileStatic
+import groovy.transform.TypeCheckingMode
+import java.security.MessageDigest
+import org.apache.polygene.gradle.structure.release.ReleaseSpecExtension
+import org.apache.polygene.gradle.tasks.ExecLogged
+import org.gradle.api.Action
+import org.gradle.api.DefaultTask
+import org.gradle.api.file.CopySpec
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.InputDirectory
+import org.gradle.api.tasks.InputFiles
+import org.gradle.api.tasks.Internal
+import org.gradle.api.tasks.OutputDirectory
+import org.gradle.api.tasks.TaskAction
+import org.gradle.process.ExecSpec
+
+// TODO: try to use dependencies for FOP and execute within the same JVM.
+// TODO: move the bulk of resources into this plugin, instead of sitting in the project.
+@CompileStatic
+class DocumentationTask extends DefaultTask
+{
+  @Input
+  String docName
+  @Input
+  String docType
+
+  @InputDirectory
+  File getCommonResourcesDir()
+  { project.file( 'src/resources' ) }
+
+  @InputDirectory
+  File getConfigDir()
+  { project.file( 'src/conf' ) }
+
+  @InputDirectory
+  File getDocsDir()
+  { project.file( 'src/docs' ) }
+
+  @InputDirectory
+  File getSrcMainDir()
+  { project.file( 'src/main' ) }
+
+  @InputDirectory
+  File getXslDir()
+  { project.file( 'src/xsl' ) }
+
+  @InputDirectory
+  File getBuildSrcDir()
+  { project.rootProject.file( 'buildSrc/src' ) }
+
+  @InputFiles
+  getSubProjectsDocsDirs()
+  { project.rootProject.subprojects.collect { p -> p.file( 'src/docs' ) } }
+
+  @InputFiles
+  def getSubProjectsTestDirs()
+  { project.rootProject.subprojects.collect { p -> p.file( 'src/test' ) } }
+
+  @OutputDirectory
+  File getOutputDir()
+  { project.file( "${ project.buildDir }/docs/${ docName }/" ) }
+
+  @Internal
+  File getTempAsciidocDir()
+  { project.file( "${ project.buildDir }/tmp-asciidoc" ) }
+
+  @Internal
+  File getTempDir()
+  { project.file( "${ project.buildDir }/tmp/docs/${ docName }" ) }
+
+  @TaskAction
+  void generate()
+  {
+    installAsciidocFilters()
+
+    [ outputDir, tempAsciidocDir, tempDir ].each { it.deleteDir() }
+    [ outputDir, tempAsciidocDir, tempDir ].each { it.mkdirs() }
+
+    copySubProjectsDocsResources()
+    generateAsciidocAccordingToReleaseSpecification()
+    generateXDoc()
+    generateChunkedHtml()
+    // generateSingleHtml()
+    // generatePdf()
+  }
+
+  void installAsciidocFilters()
+  {
+    def digester = MessageDigest.getInstance( 'SHA' )
+    def filtersDir = project.rootProject.file( 'buildSrc/src/asciidoc/filters' )
+    def userHome = new File( System.getProperty( 'user.home' ) )
+    def dotAsciidocFiltersDir = new File( userHome, '.asciidoc/filters' )
+    def installSnippets = false
+    filtersDir.eachFileRecurse( FileType.FILES ) { originalFile ->
+      def targetFile = new File( dotAsciidocFiltersDir,
+                                 ( originalFile.toURI() as String ) - ( filtersDir.toURI() as String ) )
+      if( !targetFile.exists() )
+      {
+        installSnippets = true
+      }
+      else
+      {
+        def originalDigest = digester.digest( originalFile.bytes )
+        def targetDigest = digester.digest( targetFile.bytes )
+        if( originalDigest != targetDigest )
+        {
+          installSnippets = true
+        }
+      }
+    }
+    if( installSnippets )
+    {
+      dotAsciidocFiltersDir.mkdirs()
+      project.rootProject.copy { CopySpec spec ->
+        spec.from filtersDir
+        spec.into dotAsciidocFiltersDir
+      }
+      dotAsciidocFiltersDir.eachFileRecurse( FileType.FILES ) { file ->
+        if( file.name.endsWith( '.py' ) )
+        {
+          chmod( file, '755' )
+        }
+      }
+      println "Polygene Asciidoc Filters Installed!"
+    }
+  }
+
+  @CompileStatic( TypeCheckingMode.SKIP )
+  void chmod( File file, String permissions )
+  {
+    ant.chmod( file: file.absolutePath, perm: permissions )
+  }
+
+  def void copySubProjectsDocsResources()
+  {
+    project.rootProject.subprojects.each { p ->
+      p.copy { CopySpec spec ->
+        spec.from p.file( 'src/docs/resources' )
+        spec.into outputDir
+        spec.include '**'
+      }
+    }
+  }
+
+  void generateAsciidocAccordingToReleaseSpecification()
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    project.copy { CopySpec spec ->
+      spec.from docsDir
+      spec.into tempAsciidocDir
+      spec.include '**'
+    }
+    if( releaseSpec.releaseVersion )
+    {
+      def licenseFile = new File( tempAsciidocDir, 'userguide/libraries.txt' )
+      def extensionsFile = new File( tempAsciidocDir, 'userguide/extensions.txt' )
+      def toolsFile = new File( tempAsciidocDir, 'userguide/tools.txt' )
+      [ licenseFile, extensionsFile, toolsFile ].each { asciidocFile ->
+        def filteredFileContent = ''
+        asciidocFile.readLines().each { line ->
+          if( line.startsWith( 'include::' ) )
+          {
+            def approved = false
+            releaseSpec.approvedProjects.collect { it.projectDir }.each { approvedProjectDir ->
+              if( line.contains( "${ approvedProjectDir.parentFile.name }/${ approvedProjectDir.name }" ) )
+              {
+                approved = true
+              }
+            }
+            if( approved )
+            {
+              filteredFileContent += "$line\n"
+            }
+          }
+          else
+          {
+            filteredFileContent += "$line\n"
+          }
+        }
+        asciidocFile.text = filteredFileContent
+      }
+    }
+  }
+
+  void generateXDoc()
+  {
+    def outLog = getLogFile( 'adoc-2-docbook', 'stdout' )
+    def errLog = getLogFile( 'adoc-2-docbook', 'stderr' )
+    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
+      spec.executable = 'asciidoc'
+      spec.workingDir = '..'
+      def commonResourcesPath = relativePath( project.rootDir, commonResourcesDir )
+      def asciidocConfigPath = relativePath( project.rootDir, new File( configDir, 'asciidoc.conf' ) )
+      def docbookConfigPath = relativePath( project.rootDir, new File( configDir, 'docbook45.conf' ) )
+      def linkimagesConfigPath = relativePath( project.rootDir, new File( configDir, 'linkedimages.conf' ) )
+      def xdocOutputPath = relativePath( project.rootDir, new File( tempDir, 'xdoc-temp.xml' ) )
+      def asciidocIndexPath = relativePath( project.rootDir, new File( tempAsciidocDir, "$docName/index.txt" ) )
+      spec.args = [
+        '--attribute', 'revnumber=' + project.version,
+        '--attribute', 'level1=' + ( docType == 'article' ? 1 : 0 ),
+        '--attribute', 'level2=' + ( docType == 'article' ? 2 : 1 ),
+        '--attribute', 'level3=' + ( docType == 'article' ? 3 : 2 ),
+        '--attribute', 'level4=' + ( docType == 'article' ? 4 : 3 ),
+        '--attribute', 'importdir=' + commonResourcesPath,
+        '--backend', 'docbook',
+        '--attribute', 'docinfo1',
+        '--doctype', docType,
+        '--conf-file=' + asciidocConfigPath,
+        '--conf-file=' + docbookConfigPath,
+        '--conf-file=' + linkimagesConfigPath,
+        '--out-file', xdocOutputPath,
+        asciidocIndexPath
+      ]
+    } as Action<? super ExecSpec> )
+  }
+
+  void generateChunkedHtml()
+  {
+    project.copy { CopySpec spec ->
+      spec.from commonResourcesDir
+      spec.into outputDir
+      spec.include '**'
+    }
+    project.copy { CopySpec spec ->
+      spec.from "$docsDir/$docName/resources"
+      spec.into outputDir
+      spec.include '**'
+    }
+    def outLog = getLogFile( 'docbook-2-chunked-html', 'stdout' )
+    def errLog = getLogFile( 'docbook-2-chunked-html', 'stderr' )
+    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
+      def xsltFile = "$docsDir/$docName/xsl/chunked.xsl"
+      def outputPath = relativePath( project.projectDir, outputDir ) + '/'
+      spec.executable = 'xsltproc'
+      spec.args = [
+        '--nonet',
+        '--noout',
+        '--output', outputPath,
+        xsltFile,
+        "$tempDir/xdoc-temp.xml"
+      ]
+    } as Action<? super ExecSpec> )
+  }
+
+  void generateSingleHtml()
+  {
+    def outLog = getLogFile( 'docbook-2-html', 'stdout' )
+    def errLog = getLogFile( 'docbook-2-html', 'stderr' )
+    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
+      // XML_CATALOG_FILES=
+      String xsltFile = "$xslDir/xhtml.xsl"
+      spec.executable = 'xsltproc'
+      spec.args = [
+        '--nonet',
+        '--noout',
+        '--output', "$outputDir/${ docName }.html",
+        xsltFile,
+        "$tempDir/xdoc-temp.xml"
+      ]
+    } as Action<? super ExecSpec> )
+  }
+
+  void generatePdf()
+  {
+    // $ xsltproc --nonet ../docbook-xsl/fo.xsl article.xml > article.fo
+    def outLog = getLogFile( 'docbook-2-fo', 'stdout' )
+    def errLog = getLogFile( 'docbook-2-fo', 'stderr' )
+    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
+      String xsltFile = "$xslDir/fo.xsl"
+      spec.executable = 'xsltproc'
+      spec.args = [
+        '--nonet',
+        '--output', "$tempDir/${ docName }.fo",
+        xsltFile,
+        "$tempDir/xdoc-temp.xml"
+      ]
+    } as Action<? super ExecSpec> )
+
+    // $ fop article.fo article.pdf
+    outLog = getLogFile( 'fo-2-pdf', 'stdout' )
+    errLog = getLogFile( 'fo-2-pdf', 'stderr' )
+    ExecLogged.execLogged( project, outLog, errLog, { ExecSpec spec ->
+      spec.executable = 'fop'
+      spec.args = [
+        "$tempDir/${ docName }.fo",
+        "$outputDir/${ docName }.pdf"
+      ]
+    } as Action<? super ExecSpec> )
+  }
+
+  private File getLogFile( String step, String stream )
+  {
+    return project.file( "${ project.buildDir }/tmp/${ name }/${ step }-${ stream }.log" )
+  }
+
+  private static String relativePath( File root, File target )
+  {
+    new File( root.toURI().relativize( target.toURI() ).toString() ).path
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/ManualPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/ManualPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/ManualPlugin.groovy
new file mode 100644
index 0000000..94d0743
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/ManualPlugin.groovy
@@ -0,0 +1,93 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.manual
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.TaskGroups
+import org.apache.polygene.gradle.code.CodePlugin
+import org.apache.polygene.gradle.structure.release.ReleaseSpecExtension
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.Task
+import org.gradle.language.base.plugins.LifecycleBasePlugin
+
+// TODO Expose project output into configurations
+@CompileStatic
+class ManualPlugin implements Plugin<Project>
+{
+  static class TaskNames
+  {
+    static final String WEBSITE = "website"
+    static final String MANUALS = "manuals"
+  }
+
+  @Override
+  void apply( final Project project )
+  {
+    project.plugins.apply CodePlugin
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    def websiteTask = project.tasks.create( TaskNames.WEBSITE, DocumentationTask ) { DocumentationTask task ->
+      task.group = TaskGroups.DOCUMENTATION
+      task.description = 'Generates documentation website'
+      task.dependsOn project.rootProject.allprojects.findResults { Project p ->
+        p.tasks.findByName AsciidocBuildInfoPlugin.TASK_NAME
+      }
+      task.onlyIf { isAsciidocInstalled( project, releaseSpec ) }
+      task.docName = 'website'
+      task.docType = 'article'
+    }
+    def manualsTask = project.tasks.create( TaskNames.MANUALS ) { Task task ->
+      task.group = TaskGroups.DOCUMENTATION
+      task.description = 'Generates all documentation'
+      task.dependsOn websiteTask
+    }
+    project.tasks.getByName( LifecycleBasePlugin.BUILD_TASK_NAME ).dependsOn manualsTask
+  }
+
+  private static Boolean asciidocInstalled = null
+
+  // Force when building a release version
+  // Skip if skipAsciidocIfAbsent property is set
+  // Skip if asciidoc is not found in PATH when building a development version
+  private static boolean isAsciidocInstalled( Project project, ReleaseSpecExtension releaseSpec )
+  {
+    if( asciidocInstalled == null )
+    {
+      def skipAsciidocIfAbsent = project.findProperty 'skipAsciidocIfAbsent'
+      if( !skipAsciidocIfAbsent && releaseSpec.releaseVersion )
+      {
+        project.logger.info 'Asciidoc tasks forced for building a release version, hope you have Asciidoc installed'
+        asciidocInstalled = true
+      }
+      else
+      {
+        def pathDirs = System.getenv( 'PATH' ).split( File.pathSeparator )
+        def asciidocCandidates = pathDirs.collect( { String path ->
+          new File( path, 'asciidoc' )
+        } ).flatten() as List<File>
+        asciidocInstalled = asciidocCandidates.findAll( { it.isFile() } )
+        if( !asciidocInstalled )
+        {
+          project.logger.lifecycle 'WARNING Asciidoc not found in PATH, manual tasks will skip\n' +
+                                   '        Please install http://www.methods.co.nz/asciidoc/'
+        }
+      }
+    }
+    return asciidocInstalled
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/XsltTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/XsltTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/XsltTask.groovy
new file mode 100644
index 0000000..18af2bd
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/manual/XsltTask.groovy
@@ -0,0 +1,100 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.manual
+
+import groovy.transform.CompileStatic
+import org.gradle.api.file.EmptyFileVisitor
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.SourceTask
+import org.gradle.api.tasks.OutputDirectory
+import org.gradle.api.tasks.InputFile
+import org.gradle.api.tasks.TaskAction
+import org.gradle.api.file.FileVisitDetails
+import javax.xml.transform.TransformerFactory
+import javax.xml.transform.stream.StreamResult
+import javax.xml.transform.stream.StreamSource
+
+/**
+ *  Gradle task for running a set of one or more
+ *  files through an XSLT transform.  A styleSheet
+ *  file must be specified.  The source file(s) are
+ *  configured just like any other source task:
+ *     source <file>
+ *       ...or...
+ *     source <directory>
+ *       ...and then optionally...
+ *     include '*.xml'
+ *     exclude, etc.
+ *
+ *  One of destDir or destFile must be specified, though if
+ *  there are multiple source files then destFile will just
+ *  keep getting rewritten.
+ *
+ *  The extension is stripped from the source files and the
+ *  specified extension is appended (whether it is set or not)
+ *  it defaults to no extension.
+ *
+ *  Example task formatting a check style report:
+ *
+ *  task checkstyleReport(type: XsltTask, dependsOn: check) {
+ *      source project.checkstyleResultsDir
+ *      include '*.xml'
+ *
+ *      destDir = project.checkstyleResultsDir
+ *      extension = 'html'
+ *
+ *      stylesheetFile = file( 'config/checkstyle/checkstyle-noframes.xsl' )
+ * }
+ *
+ *  The above definition requires that the specified XSL file be
+ *  copied in with the other checkstyle configuration files.  (The
+ *  file in the example is part of the checkstyle distribution.)
+ *
+ */
+@CompileStatic
+class XsltTask extends SourceTask
+{
+
+  @OutputDirectory
+  File destDir
+
+  @Input
+  String extension = 'html'
+
+  @InputFile
+  File stylesheetFile
+
+  @TaskAction
+  def transform()
+  {
+    def factory = TransformerFactory.newInstance()
+    def transformer = factory.newTransformer( new StreamSource( stylesheetFile ) );
+
+    getSource().visit( new EmptyFileVisitor() {
+      @Override
+      void visitFile( FileVisitDetails fvd )
+      {
+        // Remove the extension from the file name
+        def name = fvd.file.name.replaceAll( '[.][^\\.]*$', '' )
+        name += '.' + extension
+        def destFile = new File( destDir, name )
+        transformer.transform( new StreamSource( fvd.file ), new StreamResult( destFile ) )
+      }
+    } )
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/CheckReleaseSpecTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/CheckReleaseSpecTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/CheckReleaseSpecTask.groovy
new file mode 100644
index 0000000..a0e0d6e
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/CheckReleaseSpecTask.groovy
@@ -0,0 +1,75 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.release
+
+import groovy.transform.CompileStatic
+import org.gradle.api.DefaultTask
+import org.gradle.api.GradleException
+import org.gradle.api.Project
+import org.gradle.api.artifacts.ProjectDependency
+import org.gradle.api.tasks.TaskAction
+
+@CompileStatic
+class CheckReleaseSpecTask extends DefaultTask
+{
+  CheckReleaseSpecTask()
+  {
+    description = 'Ensure that no releasable module depend on module(s) that don\'t fit the release criteria.'
+    dependsOn {
+      project.extensions.getByType( ReleaseSpecExtension ).approvedProjects
+             .collect { each -> each.configurations.getByName( 'runtime' ) }
+    }
+  }
+
+  @TaskAction
+  void check()
+  {
+    Map<Project, Set<ProjectDependency>> notReleasable = [ : ]
+    def approvedProjects = project.extensions.getByType( ReleaseSpecExtension ).approvedProjects
+    approvedProjects.each { approvedProject ->
+      def projectDependencies = approvedProject.configurations.getByName( 'runtime' ).allDependencies.findAll {
+        it instanceof ProjectDependency
+      } as Set<ProjectDependency>
+      projectDependencies.each { dep ->
+        def depNotReleaseApproved = approvedProjects.findAll { rp ->
+          rp.group == dep.dependencyProject.group && rp.name == dep.dependencyProject.name
+        }.isEmpty()
+        if( depNotReleaseApproved )
+        {
+          if( !notReleasable[ approvedProject ] )
+          {
+            notReleasable[ approvedProject ] = [ ] as Set
+          }
+          notReleasable[ approvedProject ] << dep
+        }
+      }
+    }
+    if( !notReleasable.isEmpty() )
+    {
+      def errorMessage = new StringBuilder()
+      errorMessage << "At least one releasable module depends on module(s) that don't fit the release criteria!\n"
+      errorMessage << "\tOffending module -> Non releasable dependencies\n"
+      notReleasable.each { k, v ->
+        def noRlsDeps = v.collect { d -> ':' + d.dependencyProject.group + ':' + d.dependencyProject.name }
+        errorMessage << "\t$k -> ${ noRlsDeps })\n"
+      }
+      errorMessage << "Check the dev-status.xml file content in each modules directory."
+      throw new GradleException( errorMessage.toString() )
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ModuleReleaseSpec.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ModuleReleaseSpec.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ModuleReleaseSpec.groovy
new file mode 100644
index 0000000..fb1665c
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ModuleReleaseSpec.groovy
@@ -0,0 +1,51 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.release;
+
+import org.gradle.api.Project
+
+class ModuleReleaseSpec
+{
+  boolean satisfiedBy( Project project )
+  {
+    def devStatusFile = new File( project.projectDir, "dev-status.xml" )
+    if( !devStatusFile.exists() )
+    {
+      return false
+    }
+    def module = new XmlSlurper().parse( devStatusFile )
+    def codebase = module.status.codebase.text() as String
+    def docs = module.status.documentation.text() as String
+    def tests = module.status.unittests.text() as String
+    return satisfiedBy( codebase, docs, tests )
+  }
+
+  boolean satisfiedBy( String codebase, String docs, String tests )
+  {
+    def satisfied = ( codebase == 'none' && docs == 'complete' )
+    satisfied |= ( codebase == 'early'
+            && ( docs == 'complete' || docs == 'good' )
+            && ( tests == 'complete' || tests == 'good' ) )
+    satisfied |= ( codebase == 'beta'
+            && ( docs == 'complete' || docs == 'good' || docs == 'brief' )
+            && ( tests == 'complete' || tests == 'good' || tests == 'some' ) )
+    satisfied |= ( codebase == 'stable' )
+    satisfied |= ( codebase == 'mature' )
+    return satisfied
+  }
+}


[09/19] zest-java git commit: build: fix maven publishing

Posted by pa...@apache.org.
build: fix maven publishing


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

Branch: refs/heads/develop
Commit: d53d02bba2d3417022add154eafd32898ef49a52
Parents: 05c8141
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Dec 18 01:41:59 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Dec 18 01:41:59 2016 +0100

----------------------------------------------------------------------
 .../org/apache/polygene/gradle/publish/PublishingPlugin.groovy     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/d53d02bb/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy
index 12d5666..843f519 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/publish/PublishingPlugin.groovy
@@ -135,7 +135,7 @@ class PublishingPlugin implements Plugin<Project>
     }
     uploadArchives.onlyIf {
       def notSkipped = !project.hasProperty( 'skipUpload' )
-      def approvedProject = project.extensions.getByType( ReleaseSpecExtension ).approvedProjects.contains( project )
+      def approvedProject = project.rootProject.extensions.getByType( ReleaseSpecExtension ).approvedProjects.contains( project )
       return notSkipped && ( !config.releaseSpec || ( approvedProject || project == project.rootProject ) )
     }
     uploadArchives.dependsOn project.tasks.getByName( 'check' )


[19/19] zest-java git commit: http: disable vhost tests when offline

Posted by pa...@apache.org.
http: disable vhost tests when offline


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

Branch: refs/heads/develop
Commit: 0984d0ba968fa91bcfe6e20b804e82bbd0c8dd71
Parents: 56b2626
Author: Paul Merlin <pa...@apache.org>
Authored: Sat Dec 24 11:21:26 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sat Dec 24 11:21:26 2016 +0100

----------------------------------------------------------------------
 libraries/http/build.gradle | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/0984d0ba/libraries/http/build.gradle
----------------------------------------------------------------------
diff --git a/libraries/http/build.gradle b/libraries/http/build.gradle
index 864b51f..d665eb3 100644
--- a/libraries/http/build.gradle
+++ b/libraries/http/build.gradle
@@ -63,6 +63,16 @@ if( JavaVersion.current() < JavaVersion.VERSION_1_9 )
     vhostTestCompile( libraries.dnsjava )
   }
   task vhostTest( type: Test ) {
+    // TODO Test JVM won't start when offline
+    try
+    {
+      new URL( 'https://polygene.apache.org/' ).text
+      enabled = true
+    }
+    catch( Exception ex )
+    {
+      enabled = false
+    }
     testClassesDir = sourceSets.vhostTest.output.classesDir
     classpath = sourceSets.vhostTest.runtimeClasspath
     systemProperties 'networkaddress.cache.ttl': '0'


[05/19] zest-java git commit: core/api: fix all javadoc warnings

Posted by pa...@apache.org.
core/api: fix all javadoc warnings


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

Branch: refs/heads/develop
Commit: 1fc02df3a2ec153f1066a0940b779cc76a83a581
Parents: c21df5f
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Dec 18 00:10:25 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Dec 18 00:10:25 2016 +0100

----------------------------------------------------------------------
 .../api/association/AssociationStateHolder.java |  3 +++
 .../api/composite/TransientBuilder.java         |  3 +++
 .../api/composite/TransientBuilderFactory.java  |  3 +++
 .../api/configuration/Configuration.java        |  6 +++--
 .../polygene/api/entity/EntityBuilder.java      |  3 +++
 .../polygene/api/metrics/MetricsTimer.java      |  2 ++
 .../polygene/api/object/ObjectFactory.java      |  4 +++-
 .../polygene/api/property/StateHolder.java      |  1 +
 .../org/apache/polygene/api/query/Query.java    |  3 +++
 .../apache/polygene/api/query/QueryBuilder.java |  2 ++
 .../polygene/api/query/QueryBuilderFactory.java |  1 +
 .../polygene/api/query/QueryExpressions.java    | 24 ++++++++++++++++++++
 .../polygene/api/service/ServiceActivation.java |  4 ++++
 .../polygene/api/service/ServiceFinder.java     |  4 ++++
 .../polygene/api/structure/MetaInfoHolder.java  |  1 +
 .../org/apache/polygene/api/type/ValueType.java |  5 +++-
 .../polygene/api/unitofwork/UnitOfWork.java     |  6 +++++
 .../api/unitofwork/UnitOfWorkCallback.java      |  9 ++++----
 .../api/unitofwork/UnitOfWorkFactory.java       |  5 ++++
 .../apache/polygene/api/value/ValueBuilder.java |  3 +++
 .../polygene/api/value/ValueBuilderFactory.java |  5 ++++
 .../polygene/api/value/ValueDeserializer.java   | 10 ++++++--
 22 files changed, 96 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateHolder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateHolder.java b/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateHolder.java
index 6b1cf42..9cf336b 100644
--- a/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateHolder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/association/AssociationStateHolder.java
@@ -32,6 +32,7 @@ public interface AssociationStateHolder
     /**
      * Get an association for a specific accessor method.
      *
+     * @param <T> Association type
      * @param associationMethod for the association
      *
      * @return the association
@@ -48,6 +49,7 @@ public interface AssociationStateHolder
     /**
      * Get a many-association for a specific accessor method.
      *
+     * @param <T> Association type
      * @param manyassociationMethod for the many-association
      *
      * @return the association
@@ -64,6 +66,7 @@ public interface AssociationStateHolder
     /**
      * Get a named-association for a specific accessor method.
      *
+     * @param <T> Association type
      * @param namedassociationMethod for the named-association
      *
      * @return the association

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilder.java b/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilder.java
index e42a904..76e755a 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilder.java
@@ -25,6 +25,8 @@ import org.apache.polygene.api.common.ConstructionException;
  * TransientBuilders are used to instantiate TransientComposites. They can be acquired from
  * {@link TransientBuilderFactory#newTransientBuilder(Class)} and allows the client
  * to provide additional settings before instantiating the TransientComposite.
+ *
+ * @param <T> Transient type
  */
 public interface TransientBuilder<T>
 {
@@ -53,6 +55,7 @@ public interface TransientBuilder<T>
      * Get a representation of the state of the given type for the new Composite.
      * This is primarily used if you want to provide state for a private mixin type.
      *
+     * @param <K> Mixin type
      * @param mixinType the mixin which you want to provide state for
      *
      * @return a proxy implementing the given mixin type

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java b/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java
index 7c6c7a1..5656c71 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/TransientBuilderFactory.java
@@ -34,6 +34,7 @@ public interface TransientBuilderFactory
     /**
      * Create a builder for creating new TransientComposites that implements the given TransientComposite type.
      *
+     * @param <T> Transient type
      * @param mixinType an interface that describes the TransientComposite to be instantiated
      *
      * @return a TransientBuilder for creation of TransientComposites implementing the interface
@@ -46,7 +47,9 @@ public interface TransientBuilderFactory
     /**
      * Instantiate a TransientComposite of the given type.
      *
+     * @param <T> Transient type
      * @param mixinType the TransientComposite type to instantiate
+     * @param uses The objects that can be injected into mixins
      *
      * @return a new TransientComposite instance
      *

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java b/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java
index 60da8eb..96822a0 100644
--- a/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java
+++ b/core/api/src/main/java/org/apache/polygene/api/configuration/Configuration.java
@@ -118,6 +118,8 @@ import org.apache.polygene.api.value.ValueSerialization;
  *     :
  * }
  * </code></pre>
+ *
+ * @param <T> Configuration type
  */
 @SuppressWarnings( "JavadocReference" )
 @Mixins( Configuration.ConfigurationMixin.class )
@@ -155,9 +157,9 @@ public interface Configuration<T>
      * This is effectively an internal class in Polygene and should never be used directly by user code.
      * </p>
      *
-     * @param <T>
+     * @param <T> Configuration type
      */
-    public class ConfigurationMixin<T>
+    class ConfigurationMixin<T>
         implements Configuration<T>
     {
         private T configuration;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/entity/EntityBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/entity/EntityBuilder.java b/core/api/src/main/java/org/apache/polygene/api/entity/EntityBuilder.java
index 0fcdeff..2e31766 100644
--- a/core/api/src/main/java/org/apache/polygene/api/entity/EntityBuilder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/entity/EntityBuilder.java
@@ -27,6 +27,8 @@ import org.apache.polygene.api.common.ConstructionException;
  * to provide additional settings before instantiating the Composite.
  *
  * After calling newInstance() the builder becomes invalid, and may not be called again.
+ *
+ * @param <T> Entity type
  */
 public interface EntityBuilder<T>
 {
@@ -43,6 +45,7 @@ public interface EntityBuilder<T>
      * Get a representation of the state of the given type for the new Composite.
      * This is primarily used if you want to provide state for a private mixin type.
      *
+     * @param <K> Mixin type
      * @param mixinType the mixin which you want to provide state for
      *
      * @return a proxy implementing the given mixin type

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/metrics/MetricsTimer.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/metrics/MetricsTimer.java b/core/api/src/main/java/org/apache/polygene/api/metrics/MetricsTimer.java
index c1eb9e1..1a2cc2c 100644
--- a/core/api/src/main/java/org/apache/polygene/api/metrics/MetricsTimer.java
+++ b/core/api/src/main/java/org/apache/polygene/api/metrics/MetricsTimer.java
@@ -27,6 +27,8 @@ public interface MetricsTimer extends Metric
 {
     /**
      * Start the Timer Metrics.
+     *
+     * @return the timer context
      */
     Context start();
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java b/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java
index bd9a723..fddeeb1 100644
--- a/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/object/ObjectFactory.java
@@ -29,7 +29,9 @@ public interface ObjectFactory
     /**
      * Create new objects of the given type.
      *
-     * @param type an object class which will be instantiated.
+     * @param <T> Object type
+     * @param type an object class which will be instantiated
+     * @param uses objects that can be injected into mixins
      *
      * @return new objects.
      *

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/property/StateHolder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/property/StateHolder.java b/core/api/src/main/java/org/apache/polygene/api/property/StateHolder.java
index 28c3620..bd80f13 100644
--- a/core/api/src/main/java/org/apache/polygene/api/property/StateHolder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/property/StateHolder.java
@@ -31,6 +31,7 @@ public interface StateHolder
     /**
      * Get a property for a specific accessor
      *
+     * @param <T> Property type
      * @param accessor of the property
      *
      * @return the property

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/query/Query.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/query/Query.java b/core/api/src/main/java/org/apache/polygene/api/query/Query.java
index dda526d..8ab52f1 100644
--- a/core/api/src/main/java/org/apache/polygene/api/query/Query.java
+++ b/core/api/src/main/java/org/apache/polygene/api/query/Query.java
@@ -36,6 +36,8 @@ import org.apache.polygene.api.query.grammar.OrderBy;
  * DDD tip: typically Queries are created in the Domain Model and passed to the UI,
  * which sets the order and paging before executing it.
  * </p>
+ *
+ * @param <T> Entity type
  */
 public interface Query<T>
     extends Iterable<T>, Serializable
@@ -112,6 +114,7 @@ public interface Query<T>
     /**
      * Get the value of a named variable.
      *
+     * @param <V> Variable type
      * @param name of the variable
      *
      * @return value of the variable

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilder.java b/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilder.java
index cd65e39..b130e13 100644
--- a/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilder.java
@@ -32,6 +32,8 @@ import org.apache.polygene.api.composite.Composite;
  * should be constructed in the domain model and handed over to
  * the UI, which can then further constrain it before actual
  * execution.
+ *
+ * @param <T> Entity type
  */
 public interface QueryBuilder<T>
 {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java b/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java
index be2666d..19ee958 100644
--- a/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/query/QueryBuilderFactory.java
@@ -29,6 +29,7 @@ public interface QueryBuilderFactory
     /**
      * Create a new QueryBuilder.
      *
+     * @param <T> Result type
      * @param resultType the type of the result that you want
      *
      * @return a QueryBuilder

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/query/QueryExpressions.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/query/QueryExpressions.java b/core/api/src/main/java/org/apache/polygene/api/query/QueryExpressions.java
index ca83940..6b26751 100644
--- a/core/api/src/main/java/org/apache/polygene/api/query/QueryExpressions.java
+++ b/core/api/src/main/java/org/apache/polygene/api/query/QueryExpressions.java
@@ -332,6 +332,7 @@ public final class QueryExpressions
     /**
      * Create a new EQUALS specification for a Property.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param value its value
      *
@@ -345,6 +346,7 @@ public final class QueryExpressions
     /**
      * Create a new EQUALS specification for a Property using a named Variable.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param variable a Query Variable
      *
@@ -359,6 +361,7 @@ public final class QueryExpressions
     /**
      * Create a new EQUALS specification for an Association.
      *
+     * @param <T> Association type
      * @param association an Association
      * @param value its value
      *
@@ -379,6 +382,7 @@ public final class QueryExpressions
     /**
      * Create a new GREATER OR EQUALS specification for a Property.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param value its value
      *
@@ -392,6 +396,7 @@ public final class QueryExpressions
     /**
      * Create a new GREATER OR EQUALS specification for a Property using a named Variable.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param variable a Query Variable
      *
@@ -406,6 +411,7 @@ public final class QueryExpressions
     /**
      * Create a new GREATER THAN specification for a Property.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param value its value
      *
@@ -419,6 +425,7 @@ public final class QueryExpressions
     /**
      * Create a new GREATER THAN specification for a Property using a named Variable.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param variable a Query Variable
      *
@@ -433,6 +440,7 @@ public final class QueryExpressions
     /**
      * Create a new LESS OR EQUALS specification for a Property.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param value its value
      *
@@ -446,6 +454,7 @@ public final class QueryExpressions
     /**
      * Create a new LESS OR EQUALS specification for a Property using a named Variable.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param variable a Query Variable
      *
@@ -460,6 +469,7 @@ public final class QueryExpressions
     /**
      * Create a new LESSER THAN specification for a Property.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param value its value
      *
@@ -473,6 +483,7 @@ public final class QueryExpressions
     /**
      * Create a new LESSER THAN specification for a Property using a named Variable.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param variable a Query Variable
      *
@@ -487,6 +498,7 @@ public final class QueryExpressions
     /**
      * Create a new NOT EQUALS specification for a Property.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param value its value
      *
@@ -500,6 +512,7 @@ public final class QueryExpressions
     /**
      * Create a new NOT EQUALS specification for a Property using a named Variable.
      *
+     * @param <T> Property type
      * @param property a Property
      * @param variable a Query Variable
      *
@@ -542,6 +555,7 @@ public final class QueryExpressions
     /**
      * Create a new NOT NULL specification for a Property.
      *
+     * @param <T> Property type
      * @param property a Property
      *
      * @return a new NOT NULL specification for a Property.
@@ -554,6 +568,7 @@ public final class QueryExpressions
     /**
      * Create a new NULL specification for a Property.
      *
+     * @param <T> Property type
      * @param property a Property
      *
      * @return a new NULL specification for a Property.
@@ -566,6 +581,7 @@ public final class QueryExpressions
     /**
      * Create a new NOT NULL specification for an Association.
      *
+     * @param <T> Association type
      * @param association an Association
      *
      * @return a new NOT NULL specification for an Association.
@@ -578,6 +594,7 @@ public final class QueryExpressions
     /**
      * Create a new NULL specification for an Association.
      *
+     * @param <T> Association type
      * @param association an Association
      *
      * @return a new NULL specification for an Association.
@@ -592,6 +609,7 @@ public final class QueryExpressions
     /**
      * Create a new CONTAINS ALL specification for a Collection Property.
      *
+     * @param <T> Collection property type
      * @param collectionProperty a Collection Property
      * @param values its values
      *
@@ -607,6 +625,7 @@ public final class QueryExpressions
     /**
      * Create a new CONTAINS ALL specification for a Collection Property using named Variables.
      *
+     * @param <T> Collection property type
      * @param collectionProperty a Collection Property
      * @param variables named Variables
      *
@@ -624,6 +643,7 @@ public final class QueryExpressions
     /**
      * Create a new CONTAINS specification for a Collection Property.
      *
+     * @param <T> Collection property type
      * @param collectionProperty a Collection Property
      * @param value the value
      *
@@ -639,6 +659,7 @@ public final class QueryExpressions
     /**
      * Create a new CONTAINS specification for a Collection Property using named Variables.
      *
+     * @param <T> Collection property type
      * @param collectionProperty a Collection Property
      * @param variable named Variable
      *
@@ -655,6 +676,7 @@ public final class QueryExpressions
     /**
      * Create a new CONTAINS specification for a ManyAssociation.
      *
+     * @param <T> ManyAssociation type
      * @param manyAssoc  a ManyAssociation
      * @param value the value
      *
@@ -668,6 +690,7 @@ public final class QueryExpressions
     /**
      * Create a new CONTAINS specification for a NamedAssociation.
      *
+     * @param <T> NamedAssociation type
      * @param namedAssoc  a NamedAssociation
      * @param value the value
      *
@@ -681,6 +704,7 @@ public final class QueryExpressions
     /**
      * Create a new CONTAINS NAME specification for a NamedAssociation.
      *
+     * @param <T> NamedAssociation type
      * @param namedAssoc  a NamedAssociation
      * @param name the name
      *

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/service/ServiceActivation.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/service/ServiceActivation.java b/core/api/src/main/java/org/apache/polygene/api/service/ServiceActivation.java
index 38c4020..33ac055 100644
--- a/core/api/src/main/java/org/apache/polygene/api/service/ServiceActivation.java
+++ b/core/api/src/main/java/org/apache/polygene/api/service/ServiceActivation.java
@@ -33,12 +33,16 @@ public interface ServiceActivation
 
     /**
      * Called after ServiceComposite Activation.
+     *
+     * @throws Exception if unable to activate
      */
     void activateService()
         throws Exception;
 
     /**
      * Called before ServiceComposite Passivation.
+     *
+     * @throws Exception if unable to passivate
      */
     void passivateService()
         throws Exception;

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java b/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java
index 038d8a3..8e7e9d5 100644
--- a/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/service/ServiceFinder.java
@@ -45,6 +45,7 @@ public interface ServiceFinder
     /**
      * Find a ServiceReference that implements the given type.
      *
+     * @param <T> Service type
      * @param serviceType the type that the Service must implement
      *
      * @return a ServiceReference if one is found
@@ -57,6 +58,7 @@ public interface ServiceFinder
     /**
      * Find a ServiceReference that implements the given type.
      *
+     * @param <T> Service type
      * @param serviceType the type that the Service must implement
      *
      * @return a ServiceReference if one is found
@@ -73,6 +75,7 @@ public interface ServiceFinder
      * Module is earlier in the list.
      * </p>
      *
+     * @param <T> Service type
      * @param serviceType the type that the Services must implement
      *
      * @return a stream of ServiceReferences for the given type. It is empty if none exist
@@ -86,6 +89,7 @@ public interface ServiceFinder
      * Module is earlier in the list.
      * </p>
      *
+     * @param <T> Service type
      * @param serviceType the type that the Services must implement
      *
      * @return a stream of ServiceReferences for the given type. It is empty if none exist

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/structure/MetaInfoHolder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/structure/MetaInfoHolder.java b/core/api/src/main/java/org/apache/polygene/api/structure/MetaInfoHolder.java
index eea762e..acfd747 100644
--- a/core/api/src/main/java/org/apache/polygene/api/structure/MetaInfoHolder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/structure/MetaInfoHolder.java
@@ -30,6 +30,7 @@ public interface MetaInfoHolder
      * Get metadata that implements the given type.
      * The info is registered during assembly of the application.
      *
+     * @param <T> metadata type
      * @param infoType the type of metadata to be returned
      *
      * @return the metadata for the given type, or <code>null</code> if

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/type/ValueType.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/type/ValueType.java b/core/api/src/main/java/org/apache/polygene/api/type/ValueType.java
index 13277d7..768750e 100644
--- a/core/api/src/main/java/org/apache/polygene/api/type/ValueType.java
+++ b/core/api/src/main/java/org/apache/polygene/api/type/ValueType.java
@@ -49,6 +49,7 @@ public class ValueType
      *     Date, BigInteger, BigDecimal and JodaTime types are not considered as Primitive Value Types.
      * </p>
      *
+     * @param object Object
      * @return true if object is a primitive value or an array of primitive values
      * @throws IllegalArgumentException if object is null
      */
@@ -102,7 +103,9 @@ public class ValueType
     }
 
     /**
-     * @see ValueType#isPrimitiveValue(java.lang.Object) 
+     * @see ValueType#isPrimitiveValue(java.lang.Object)
+     * @param type Type
+     * @return true if object is a primitive value or an array of primitive values
      */
     public static boolean isPrimitiveValueType( Class<?> type )
     {

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java b/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java
index 10e4216..974f8eb 100644
--- a/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java
+++ b/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWork.java
@@ -134,6 +134,7 @@ public interface UnitOfWork extends MetaInfoHolder, AutoCloseable
      * The reference of the Entity will be generated by the IdentityGenerator of the Module of the EntityComposite.
      * </p>
      *
+     * @param <T>  Entity type
      * @param type the mixin type that the EntityComposite must implement
      *
      * @return a new Entity
@@ -151,6 +152,7 @@ public interface UnitOfWork extends MetaInfoHolder, AutoCloseable
      * for Modules and Layers will be considered. If several
      * EntityComposites implement the type then an AmbiguousTypeException will be thrown.
      *
+     * @param <T>      Entity type
      * @param type     the mixin type that the EntityComposite must implement
      * @param identity the reference of the new Entity
      *
@@ -169,6 +171,7 @@ public interface UnitOfWork extends MetaInfoHolder, AutoCloseable
      * for Modules and Layers will be considered. If several
      * EntityComposites implement the type then an AmbiguousTypeException will be thrown.
      *
+     * @param <T>  Entity type
      * @param type the mixin type that the EntityComposite must implement
      *
      * @return a new EntityBuilder
@@ -185,6 +188,7 @@ public interface UnitOfWork extends MetaInfoHolder, AutoCloseable
      * for Modules and Layers will be considered. If several
      * mixins implement the type then an AmbiguousTypeException will be thrown.
      *
+     * @param <T>      Entity type
      * @param type     the mixin type that the EntityComposite must implement
      * @param identity the reference of the new Entity
      *
@@ -255,6 +259,7 @@ public interface UnitOfWork extends MetaInfoHolder, AutoCloseable
      * Find an Entity of the given mixin type with the give reference. This
      * method verifies that it exists by asking the underlying EntityStore.
      *
+     * @param <T>      Entity type
      * @param type     of the entity
      * @param identity of the entity
      *
@@ -271,6 +276,7 @@ public interface UnitOfWork extends MetaInfoHolder, AutoCloseable
      * UnitOfWork and want to create a reference to it in this
      * UnitOfWork, then call this method.
      *
+     * @param <T>    Entity type
      * @param entity the Entity to be dereferenced
      *
      * @return an Entity from this UnitOfWork

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkCallback.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkCallback.java b/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkCallback.java
index f8e467b..b52ddce 100644
--- a/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkCallback.java
+++ b/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkCallback.java
@@ -30,11 +30,10 @@ public interface UnitOfWorkCallback
 {
     /**
      * This is called before the completion of the UnitOfWork.
-     * The callback may do any validation checks and throw
-     * UnitOfWorkCompletionException if there is any reason
-     * why the UnitOfWork is not in a valid state to be completed.
+     * The callback may do any validation checks.
      *
-     * @throws UnitOfWorkCompletionException
+     * @throws UnitOfWorkCompletionException if there is any reason why the UnitOfWork is not in a valid state to be
+     *                                       completed
      */
     void beforeCompletion()
         throws UnitOfWorkCompletionException;
@@ -46,7 +45,7 @@ public interface UnitOfWorkCallback
      * UnitOfWork is no longer active when this method is
      * called, so no methods on it may be invoked.
      *
-     * @param status
+     * @param status the UnitOfWork status
      */
     void afterCompletion( UnitOfWorkStatus status );
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkFactory.java b/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkFactory.java
index 98d23ba..c59e154 100644
--- a/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/unitofwork/UnitOfWorkFactory.java
@@ -46,6 +46,9 @@ public interface UnitOfWorkFactory
      * <p>
      * The UnitOfWork will use the default Usecase settings.
      * </p>
+     *
+     * @param currentTime the current time for this UnitOfWork
+     *
      * @return a new UnitOfWork
      */
     UnitOfWork newUnitOfWork( Instant currentTime );
@@ -65,6 +68,8 @@ public interface UnitOfWorkFactory
      * Create a new UnitOfWork for the given Usecase and associate it with the current thread.
      *
      * @param usecase the Usecase for this UnitOfWork
+     * @param currentTime the current time for this UnitOfWork
+     *
      *
      * @return a new UnitOfWork
      */

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilder.java b/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilder.java
index fe7a8e1..2698305 100644
--- a/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilder.java
+++ b/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilder.java
@@ -25,6 +25,8 @@ import org.apache.polygene.api.common.ConstructionException;
 
 /**
  * Builder for Values.
+ *
+ * @param <T> Value type
  */
 public interface ValueBuilder<T>
 {
@@ -43,6 +45,7 @@ public interface ValueBuilder<T>
      * Get a representation of the state of the given type for the new ValueComposite.
      * This is primarily used if you want to provide state for a private mixin type.
      *
+     * @param <K> Mixin type
      * @param mixinType the mixin which you want to provide state for
      *
      * @return a proxy implementing the given mixin type

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java b/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java
index b23889c..510c373 100644
--- a/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java
+++ b/core/api/src/main/java/org/apache/polygene/api/value/ValueBuilderFactory.java
@@ -36,6 +36,7 @@ public interface ValueBuilderFactory
     /**
      * Instantiate a Value of the given type.
      *
+     * @param <T> Value type
      * @param valueType the Value type to instantiate
      *
      * @return a new Value instance
@@ -50,6 +51,7 @@ public interface ValueBuilderFactory
      * Create a builder for creating new Values that implements the given Value type.
      * <p>The returned ValueBuilder can be reused to create several Values instances.</p>
      *
+     * @param <T> Value type
      * @param valueType an interface that describes the Composite to be instantiated
      *
      * @return a ValueBuilder for creation of ValueComposites implementing the interface
@@ -63,6 +65,7 @@ public interface ValueBuilderFactory
      * Create a builder for creating a new Value starting with the given prototype.
      * <p>The returned ValueBuilder can only be used ONCE.</p>
      *
+     * @param <T> Value type
      * @param prototype a prototype the builder will use
      *
      * @return a ValueBuilder for creation of ValueComposites implementing the interface of the prototype
@@ -75,6 +78,7 @@ public interface ValueBuilderFactory
      * Create a builder for creating a new Value starting with the given state.
      * <p>The returned ValueBuilder can only be used ONCE.</p>
      *
+     * @param <T> Value type
      * @param mixinType an interface that describes the Composite to be instantiated
      * @param propertyFunction a function providing the state of properties
      * @param associationFunction a function providing the state of associations
@@ -94,6 +98,7 @@ public interface ValueBuilderFactory
     /**
      * Instantiate a Value of the given type using the serialized state given as String.
      *
+     * @param <T> Value type
      * @param valueType the Value type to instantiate
      * @param serializedState  the state of the Value
      *

http://git-wip-us.apache.org/repos/asf/zest-java/blob/1fc02df3/core/api/src/main/java/org/apache/polygene/api/value/ValueDeserializer.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/value/ValueDeserializer.java b/core/api/src/main/java/org/apache/polygene/api/value/ValueDeserializer.java
index 5f2628c..88afc3a 100644
--- a/core/api/src/main/java/org/apache/polygene/api/value/ValueDeserializer.java
+++ b/core/api/src/main/java/org/apache/polygene/api/value/ValueDeserializer.java
@@ -79,8 +79,9 @@ public interface ValueDeserializer
      *
      * <p>The returned Function may throw {@link ValueSerializationException}.</p>
      *
-     * @param type the value type
      * @param <T>  the parametrized function return type
+     * @param module the module
+     * @param type the value type
      *
      * @return a deserialization function
      */
@@ -91,8 +92,9 @@ public interface ValueDeserializer
      *
      * <p>The returned Function may throw {@link ValueSerializationException}.</p>
      *
+     * @param <T> the parametrized function return type
+     * @param module the module
      * @param valueType the value type
-     * @param <T>       the parametrized function return type
      *
      * @return a deserialization function
      */
@@ -112,6 +114,7 @@ public interface ValueDeserializer
      * Deserialize a value from a state.
      *
      * @param <T>   the parametrized returned type
+     * @param module the module
      * @param type  the value type
      * @param input the state
      *
@@ -126,6 +129,7 @@ public interface ValueDeserializer
      * Deserialize a value from a state.
      *
      * @param <T>       the parametrized returned type
+     * @param module the module
      * @param valueType the value type
      * @param input     the state
      *
@@ -140,6 +144,7 @@ public interface ValueDeserializer
      * Deserialize a value from a state.
      *
      * @param <T>   the parametrized returned type
+     * @param module the module
      * @param type  the value type
      * @param input the state stream
      *
@@ -154,6 +159,7 @@ public interface ValueDeserializer
      * Deserialize a value from a state.
      *
      * @param <T>       the parametrized returned type
+     * @param module the module
      * @param valueType the value type
      * @param input     the state stream
      *


[06/19] zest-java git commit: locking: remove workaround for old HotSpot bug fixed in h17(b06)

Posted by pa...@apache.org.
locking: remove workaround for old HotSpot bug fixed in h17(b06)

See http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6822370
That\u2019s Java 6 something


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

Branch: refs/heads/develop
Commit: 3565bcba7bcf2e4ad62a96c8daff72178c3e9d1a
Parents: 1fc02df
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Dec 18 00:32:03 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Dec 18 00:33:36 2016 +0100

----------------------------------------------------------------------
 .../library/locking/WriteLockConcern.java       | 32 ++------------------
 1 file changed, 2 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/3565bcba/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java
----------------------------------------------------------------------
diff --git a/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java b/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java
index 53fd4e6..c9b632b 100644
--- a/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java
+++ b/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java
@@ -21,7 +21,6 @@ package org.apache.polygene.library.locking;
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
-import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 import org.apache.polygene.api.common.AppliesTo;
@@ -32,20 +31,17 @@ import org.apache.polygene.api.injection.scope.This;
  * Applies write-lock to Composite
  */
 @AppliesTo( WriteLock.class )
-public class WriteLockConcern
-    extends ConcernOf<InvocationHandler>
+public class WriteLockConcern extends ConcernOf<InvocationHandler>
     implements InvocationHandler
 {
-    private
     @This
-    ReadWriteLock lock;
+    private ReadWriteLock lock;
 
     @Override
     public Object invoke( Object o, Method method, Object[] objects )
         throws Throwable
     {
         Lock writeLock = lock.writeLock();
-        lock(writeLock);
         try
         {
             return next.invoke( o, method, objects );
@@ -55,28 +51,4 @@ public class WriteLockConcern
             writeLock.unlock();
         }
     }
-
-    /**
-     * Fix for this bug:
-     * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6822370
-     */
-    protected void lock(Lock lock)
-    {
-        while(true)
-        {
-            try
-            {
-                //noinspection StatementWithEmptyBody
-                while( !lock.tryLock( 1000, TimeUnit.MILLISECONDS ) )
-                {
-                    // On timeout, try again
-                }
-                return; // Finally got a lock
-            }
-            catch( InterruptedException e )
-            {
-                // Try again
-            }
-        }
-    }
 }
\ No newline at end of file


[12/19] zest-java git commit: Revert "locking: remove workaround for old HotSpot bug fixed in h17(b06)"

Posted by pa...@apache.org.
Revert "locking: remove workaround for old HotSpot bug fixed in h17(b06)"

This reverts commit 3565bcba7bcf2e4ad62a96c8daff72178c3e9d1a.


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

Branch: refs/heads/develop
Commit: 42e2b7cc9f0063c6971a68c369170f6ba5e7130b
Parents: 90bc41c
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Dec 18 13:17:27 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Dec 18 13:17:27 2016 +0100

----------------------------------------------------------------------
 .../library/locking/WriteLockConcern.java       | 32 ++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/42e2b7cc/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java
----------------------------------------------------------------------
diff --git a/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java b/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java
index c9b632b..53fd4e6 100644
--- a/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java
+++ b/libraries/locking/src/main/java/org/apache/polygene/library/locking/WriteLockConcern.java
@@ -21,6 +21,7 @@ package org.apache.polygene.library.locking;
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 import org.apache.polygene.api.common.AppliesTo;
@@ -31,17 +32,20 @@ import org.apache.polygene.api.injection.scope.This;
  * Applies write-lock to Composite
  */
 @AppliesTo( WriteLock.class )
-public class WriteLockConcern extends ConcernOf<InvocationHandler>
+public class WriteLockConcern
+    extends ConcernOf<InvocationHandler>
     implements InvocationHandler
 {
+    private
     @This
-    private ReadWriteLock lock;
+    ReadWriteLock lock;
 
     @Override
     public Object invoke( Object o, Method method, Object[] objects )
         throws Throwable
     {
         Lock writeLock = lock.writeLock();
+        lock(writeLock);
         try
         {
             return next.invoke( o, method, objects );
@@ -51,4 +55,28 @@ public class WriteLockConcern extends ConcernOf<InvocationHandler>
             writeLock.unlock();
         }
     }
+
+    /**
+     * Fix for this bug:
+     * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6822370
+     */
+    protected void lock(Lock lock)
+    {
+        while(true)
+        {
+            try
+            {
+                //noinspection StatementWithEmptyBody
+                while( !lock.tryLock( 1000, TimeUnit.MILLISECONDS ) )
+                {
+                    // On timeout, try again
+                }
+                return; // Finally got a lock
+            }
+            catch( InterruptedException e )
+            {
+                // Try again
+            }
+        }
+    }
 }
\ No newline at end of file


[17/19] zest-java git commit: build: detangle buildSrc

Posted by pa...@apache.org.
build: detangle buildSrc

Build structure and tasks revamped
See manual/src/docs/tutorials/howto-build-system.txt


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

Branch: refs/heads/develop
Commit: de73010f9523c6104caefffeccc5993248616265
Parents: 42e2b7c
Author: Paul Merlin <pa...@apache.org>
Authored: Sat Dec 24 02:40:31 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sat Dec 24 02:40:31 2016 +0100

----------------------------------------------------------------------
 build.gradle                                    |  11 +-
 buildSrc/build.gradle                           |   6 +-
 .../polygene/gradle/AllProjectsPlugin.groovy    | 214 --------
 .../apache/polygene/gradle/BasePlugin.groovy    |  61 +++
 .../polygene/gradle/CodeProjectsPlugin.groovy   | 172 ------
 .../polygene/gradle/PolygeneExtension.groovy    |  79 ---
 .../polygene/gradle/RootProjectPlugin.groovy    | 273 ----------
 .../apache/polygene/gradle/TaskGroups.groovy    |   5 +-
 .../polygene/gradle/code/CodePlugin.groovy      | 201 +++++++
 .../polygene/gradle/code/MavenMetadata.groovy   | 281 ++++++++++
 .../polygene/gradle/code/PublishNaming.groovy   |  40 ++
 .../gradle/code/PublishedCodePlugin.groovy      | 152 ++++++
 .../gradle/code/PublishingPlugin.groovy         | 211 ++++++++
 .../gradle/code/VersionClassPlugin.groovy       |  94 ++++
 .../DependenciesDeclarationExtension.groovy     |   4 +-
 .../DependenciesDeclarationPlugin.groovy        |   2 +
 .../DependenciesDownloadTask.groovy             |  34 ++
 .../dependencies/DependenciesPlugin.groovy      |  55 +-
 .../dependencies/PolygeneExtension.groovy       |  69 +++
 .../gradle/dist/DistributionPlugin.groovy       | 387 --------------
 .../gradle/dist/GoOfflineHelpersTasks.groovy    | 345 ------------
 .../gradle/doc/AsciidocBuildInfoPlugin.groovy   |  60 ---
 .../gradle/doc/DocumentationTask.groovy         | 292 -----------
 .../polygene/gradle/doc/ManualPlugin.groovy     | 115 ----
 .../apache/polygene/gradle/doc/XsltTask.groovy  | 100 ----
 .../performance/PerformanceTestsPlugin.groovy   |  62 ---
 .../gradle/publish/MavenMetadata.groovy         | 281 ----------
 .../gradle/publish/PublishingPlugin.groovy      | 183 -------
 .../gradle/release/CheckReleaseSpecTask.groovy  |  75 ---
 .../gradle/release/ModuleReleaseSpec.groovy     |  53 --
 .../release/ReleaseApprovedProjectsTask.groovy  |  57 --
 .../gradle/release/ReleaseSpecExtension.groovy  |  40 --
 .../gradle/release/ReleaseSpecPlugin.groovy     |  56 --
 .../polygene/gradle/structure/RootPlugin.groovy |  45 ++
 .../gradle/structure/SettingsPlugin.groovy      |  41 ++
 .../gradle/structure/core/CorePlugin.groovy     |  46 ++
 .../distributions/DistributionsPlugin.groovy    | 523 +++++++++++++++++++
 .../structure/extensions/ExtensionPlugin.groovy |  33 ++
 .../structure/internals/InternalPlugin.groovy   |  33 ++
 .../structure/libraries/LibraryPlugin.groovy    |  31 ++
 .../manual/AsciidocBuildInfoPlugin.groovy       |  60 +++
 .../structure/manual/DocumentationTask.groovy   | 320 ++++++++++++
 .../gradle/structure/manual/ManualPlugin.groovy |  93 ++++
 .../gradle/structure/manual/XsltTask.groovy     | 100 ++++
 .../release/CheckReleaseSpecTask.groovy         |  75 +++
 .../structure/release/ModuleReleaseSpec.groovy  |  51 ++
 .../release/ReleaseApprovedProjectsTask.groovy  |  62 +++
 .../structure/release/ReleasePlugin.groovy      | 277 ++++++++++
 .../release/ReleaseSpecExtension.groovy         |  64 +++
 .../structure/release/ReleaseSpecPlugin.groovy  |  63 +++
 .../release/ReleaseSpecReportTask.groovy        |  45 ++
 .../reports/AggregatedJacocoReportTask.groovy   |  99 ++++
 .../structure/reports/ReportsPlugin.groovy      | 152 ++++++
 .../structure/samples/SamplePlugin.groovy       |  33 ++
 .../tests/PerformanceTestsPlugin.groovy         |  62 +++
 .../gradle/structure/tests/TestPlugin.groovy    |  33 ++
 .../gradle/structure/tools/ToolPlugin.groovy    |  31 ++
 .../structure/tutorials/TutorialPlugin.groovy   |  33 ++
 .../polygene/gradle/tasks/ExecLogged.groovy     |  70 ++-
 .../test/AggregatedJacocoReportTask.groovy      |  91 ----
 .../polygene/gradle/util/Environment.groovy     |  30 ++
 .../polygene/gradle/util/Licensing.groovy       |  49 ++
 .../gradle/version/VersionClassPlugin.groovy    |  98 ----
 .../gradle-plugins/polygene-core.properties     |  18 +
 ...polygene-dependencies-declaration.properties |  18 +
 .../polygene-distributions.properties           |  18 +
 .../polygene-extension.properties               |  18 +
 .../gradle-plugins/polygene-internal.properties |  18 +
 .../gradle-plugins/polygene-library.properties  |  18 +
 .../gradle-plugins/polygene-manual.properties   |  18 +
 .../gradle-plugins/polygene-release.properties  |  18 +
 .../gradle-plugins/polygene-reports.properties  |  18 +
 .../gradle-plugins/polygene-root.properties     |  18 +
 .../gradle-plugins/polygene-sample.properties   |  18 +
 .../gradle-plugins/polygene-settings.properties |  18 +
 .../gradle-plugins/polygene-test.properties     |  18 +
 .../gradle-plugins/polygene-tool.properties     |  18 +
 .../gradle-plugins/polygene-tutorial.properties |  18 +
 .../gradle/release/ModuleReleaseSpecTest.groovy |   1 +
 .../polygene/gradle/tasks/ExecLoggedTest.groovy |  84 +++
 core/api/build.gradle                           |   2 +
 core/bootstrap/build.gradle                     |   2 +
 core/runtime/build.gradle                       |   2 +
 core/spi/build.gradle                           |   2 +
 core/testsupport/build.gradle                   |   4 +-
 distributions/build.gradle                      |   2 +
 distributions/src/bin-dist/NOTICE.txt           |   5 +
 distributions/src/bin-dist/README.txt           |  50 ++
 distributions/src/src-dist/README.txt           |  64 +++
 extensions/cache-ehcache/build.gradle           |   2 +
 extensions/cache-memcache/build.gradle          |   2 +
 extensions/entitystore-file/build.gradle        |   2 +
 extensions/entitystore-geode/build.gradle       |   2 +
 extensions/entitystore-hazelcast/build.gradle   |   2 +
 extensions/entitystore-jclouds/build.gradle     |   2 +
 extensions/entitystore-jdbm/build.gradle        |   2 +
 extensions/entitystore-leveldb/build.gradle     |   2 +
 extensions/entitystore-memory/build.gradle      |   2 +
 extensions/entitystore-mongodb/build.gradle     |   2 +
 extensions/entitystore-preferences/build.gradle |   2 +
 extensions/entitystore-redis/build.gradle       |   2 +
 extensions/entitystore-riak/build.gradle        |   2 +
 extensions/entitystore-sql/build.gradle         |   2 +
 extensions/indexing-elasticsearch/build.gradle  |   2 +
 extensions/indexing-rdf/build.gradle            |   2 +
 extensions/indexing-solr/build.gradle           |   2 +
 extensions/indexing-sql/build.gradle            |   2 +
 extensions/metrics-codahale/build.gradle        |   2 +
 extensions/migration/build.gradle               |   2 +
 extensions/reindexer/build.gradle               |   2 +
 .../valueserialization-jackson/build.gradle     |   2 +
 .../valueserialization-orgjson/build.gradle     |   2 +
 extensions/valueserialization-stax/build.gradle |   2 +
 gradle.properties                               |   4 +-
 libraries/alarm/build.gradle                    |   2 +
 libraries/circuitbreaker/build.gradle           |   2 +
 libraries/constraints/build.gradle              |   2 +
 libraries/fileconfig/build.gradle               |   2 +
 libraries/http/build.gradle                     |   2 +
 libraries/invocation-cache/build.gradle         |   2 +
 libraries/jmx/build.gradle                      |   5 +-
 libraries/lang-groovy/build.gradle              |   2 +
 libraries/lang-javascript/build.gradle          |   2 +
 libraries/locking/build.gradle                  |   2 +
 libraries/logging/build.gradle                  |   2 +
 libraries/metrics/build.gradle                  |   2 +
 libraries/osgi/build.gradle                     |   2 +
 libraries/rdf/build.gradle                      |   2 +
 libraries/rest-client/build.gradle              |   2 +
 libraries/rest-common/build.gradle              |   2 +
 libraries/rest-server/build.gradle              |   2 +
 libraries/rest/build.gradle                     |   2 +
 libraries/restlet/build.gradle                  |   5 +-
 libraries/scripting/build.gradle                |   2 +
 libraries/servlet/build.gradle                  |   2 +
 libraries/shiro-core/build.gradle               |   2 +
 libraries/shiro-web/build.gradle                |   2 +
 libraries/spring/build.gradle                   |   2 +
 libraries/sql-bonecp/build.gradle               |   2 +
 libraries/sql-dbcp/build.gradle                 |   2 +
 libraries/sql-liquibase/build.gradle            |   2 +
 libraries/sql/build.gradle                      |   2 +
 libraries/uid/build.gradle                      |   2 +
 libraries/uowfile/build.gradle                  |   2 +
 manual/build.gradle                             |   5 +-
 .../src/docs/tutorials/howto-build-system.txt   |  88 ++--
 release/build.gradle                            |   2 +
 reports/build.gradle                            |   2 +
 reports/src/javadoc/overview.html               |  26 +
 samples/dci/build.gradle                        |   1 +
 samples/forum/build.gradle                      |   5 +-
 samples/rental/build.gradle                     |   7 +-
 samples/sql-support/build.gradle                |   5 +-
 samples/swing/build.gradle                      |   5 +-
 settings.gradle                                 |  19 +-
 src/bin-dist/NOTICE.txt                         |   5 -
 src/bin-dist/README.txt                         |  50 --
 src/javadoc/overview.html                       |  26 -
 tests/performance/build.gradle                  |   4 +-
 tests/regression/build.gradle                   |   2 +
 .../test/regression/ConcernsOnPropertyTest.java | 115 ++++
 .../polygene/test/regression/Regressions.java   |  30 --
 .../niclas2/ConcernsOnPropertyTest.java         | 115 ----
 tests/unit/README.txt                           |   7 -
 tools/envisage/build.gradle                     |   5 +-
 tools/model-detail/build.gradle                 |   2 +
 tools/qidea/build.gradle                        |   2 +
 tools/shell/build.gradle                        |   4 +
 tools/shell/src/dist/bin/polygene-boot          |   2 +-
 tutorials/cargo/build.gradle                    |   2 +
 tutorials/composites/build.gradle               |   2 +
 tutorials/hello/build.gradle                    |   2 +
 tutorials/introduction/build.gradle             |   2 +
 tutorials/introduction/tenminutes/build.gradle  |   2 +
 .../introduction/thirtyminutes/build.gradle     |   2 +
 tutorials/introduction/twominutes/build.gradle  |   2 +
 tutorials/services/build.gradle                 |   2 +
 177 files changed, 4574 insertions(+), 3395 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 4147856..ff63c21 100644
--- a/build.gradle
+++ b/build.gradle
@@ -15,14 +15,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-import org.apache.polygene.gradle.AllProjectsPlugin
-import org.apache.polygene.gradle.RootProjectPlugin
-import org.apache.polygene.gradle.dependencies.DependenciesDeclarationPlugin
 
-apply plugin: DependenciesDeclarationPlugin
+apply plugin: 'polygene-dependencies-declaration'
 apply from: 'dependencies.gradle'
-
-allprojects {
-  apply plugin: AllProjectsPlugin
-}
-apply plugin: RootProjectPlugin
+apply plugin: 'polygene-root'

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/build.gradle
----------------------------------------------------------------------
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index 8f292ab..aa94907 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -28,9 +28,11 @@ repositories {
 dependencies {
   compile gradleApi()
   compile localGroovy()
-  compile 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.2.2'
-  compile 'gradle.plugin.org.nosphere.honker:honker-gradle:0.2.3'
+  compile 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.3.0'
+  compile 'gradle.plugin.org.nosphere.honker:honker-gradle:0.3.0'
   compile 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1'
+  compile 'org.apache.httpcomponents:httpclient:4.5.2'
+  compile 'org.apache.httpcomponents:httpmime:4.5.2'
 
   testCompile 'junit:junit:4.12'
   testCompile( 'org.spockframework:spock-core:1.0-groovy-2.4' ) { exclude module: 'groovy-all' }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
deleted file mode 100644
index f890e46..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle
-
-import groovy.transform.CompileStatic
-import org.apache.polygene.gradle.dependencies.DependenciesPlugin
-import org.apache.polygene.gradle.publish.PublishingPlugin
-import org.gradle.api.JavaVersion
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.plugins.JavaPluginConvention
-import org.gradle.api.tasks.compile.JavaCompile
-import org.gradle.api.tasks.diagnostics.DependencyReportTask
-import org.gradle.api.tasks.javadoc.Javadoc
-import org.gradle.api.tasks.testing.Test
-import org.gradle.api.tasks.testing.logging.TestExceptionFormat
-import org.gradle.external.javadoc.StandardJavadocDocletOptions
-import org.nosphere.honker.gradle.HonkerExtension
-import org.nosphere.honker.gradle.HonkerGenDependenciesTask
-import org.nosphere.honker.gradle.HonkerGenLicenseTask
-import org.nosphere.honker.gradle.HonkerGenNoticeTask
-import org.nosphere.honker.gradle.HonkerLicenseOverrideCandidate
-
-@CompileStatic
-class AllProjectsPlugin implements Plugin<Project>
-{
-  @Override
-  void apply( final Project project )
-  {
-    project.defaultTasks = [ 'classes', 'test' ]
-    project.group = project.rootProject == project ?
-                    'org.apache.polygene' :
-                    "org.apache.polygene.${ project.path.split( ':' ).drop( 1 ).dropRight( 1 ).join( '.' ) }"
-
-    applyDefaultVersion( project )
-    applyPolygeneExtension( project )
-
-    if( project.rootProject == project || CodeProjectsPlugin.isCodeProject( project ) )
-    {
-      configureJava( project )
-      project.plugins.apply DependenciesPlugin
-      configureJavadoc( project )
-      configureTest( project )
-    }
-    if( CodeProjectsPlugin.isCodeProject( project ) )
-    {
-      project.plugins.apply CodeProjectsPlugin
-    }
-    if( project.rootProject == project || CodeProjectsPlugin.isCodeProject( project ) )
-    {
-      configureDependencyReport( project )
-      configureHonker( project )
-      project.plugins.apply PublishingPlugin
-    }
-  }
-
-  private static void applyDefaultVersion( Project project )
-  {
-    if( project.version == 'unspecified' )
-    {
-      project.version = System.properties.version ?: '0'
-    }
-  }
-
-  private static void applyPolygeneExtension( Project project )
-  {
-    project.extensions.create( "polygene", PolygeneExtension, project )
-  }
-
-  private static void configureJava( Project project )
-  {
-    project.plugins.apply 'java'
-    def javaConvention = project.convention.getPlugin( JavaPluginConvention )
-    javaConvention.targetCompatibility = JavaVersion.VERSION_1_8
-    javaConvention.sourceCompatibility = JavaVersion.VERSION_1_8
-    project.tasks.withType( JavaCompile ) { JavaCompile task ->
-      task.options.encoding = 'UTF-8'
-      // Deprecation warnings for all compilations
-      task.options.compilerArgs << "-Xlint:deprecation"
-      // Unchecked warnings for non-test core compilations
-      if( 'org.apache.polygene.core' == project.group && !task.name.toLowerCase( Locale.US ).contains( 'test' ) )
-      {
-        task.options.compilerArgs << "-Xlint:unchecked"
-      }
-    }
-  }
-
-  private static void configureJavadoc( Project project )
-  {
-    project.tasks.withType( Javadoc ) { Javadoc task ->
-      def options = task.options as StandardJavadocDocletOptions
-      options.encoding = 'UTF-8'
-      options.docEncoding = 'UTF-8'
-      options.charSet = 'UTF-8'
-      options.noTimestamp = true
-      options.links = [
-        'http://docs.oracle.com/javase/8/docs/api/',
-        'https://stleary.github.io/JSON-java/',
-        'http://junit.org/junit4/javadoc/latest/'
-      ]
-      // exclude '**/internal/**'
-    }
-  }
-
-  private static void configureTest( Project project )
-  {
-    // Match --max-workers and Test maxParallelForks, use 1 if parallel is disabled
-    def parallel = project.gradle.startParameter.parallelProjectExecutionEnabled
-    def maxTestWorkers = ( parallel ? project.gradle.startParameter.maxWorkerCount : 1 ) as int
-    // The space in the directory name is intentional
-    def allTestsDir = project.file( "$project.buildDir/tmp/test files" )
-    project.tasks.withType( Test ) { Test testTask ->
-      testTask.onlyIf { !project.hasProperty( 'skipTests' ) }
-      testTask.testLogging.info.exceptionFormat = TestExceptionFormat.FULL
-      testTask.maxHeapSize = '1g'
-      testTask.maxParallelForks = maxTestWorkers
-      testTask.systemProperties = [ 'proxySet' : System.properties[ 'proxySet' ],
-                                    'proxyHost': System.properties[ 'proxyHost' ],
-                                    'proxyPort': System.properties[ 'proxyPort' ] ]
-      testTask.reports.html.enabled = true
-      def testDir = new File( allTestsDir, testTask.name )
-      def workDir = new File( testDir, 'work' )
-      def tmpDir = new File( testDir, 'tmp' )
-      def homeDir = new File( testDir, 'home' )
-      testTask.workingDir = workDir
-      testTask.systemProperties << ( [
-        'user.dir'      : workDir.absolutePath,
-        'java.io.tmpdir': tmpDir.absolutePath,
-        'home.dir'      : homeDir.absolutePath
-      ] as Map<String, Object> )
-      testTask.environment << ( [
-        'HOME'       : homeDir.absolutePath,
-        'USERPROFILE': homeDir.absolutePath
-      ] as Map<String, Object> )
-      testTask.doFirst { Test task ->
-        [ workDir, tmpDir, homeDir ]*.mkdirs()
-      }
-      testTask.doLast { Test task ->
-        if( !task.state.failure )
-        {
-          project.delete testDir
-        }
-      }
-    }
-  }
-
-  // Dependency Report generate only the runtime configuration
-  // The report is packaged in the SDK distributions
-  private static void configureDependencyReport( Project project )
-  {
-    project.plugins.apply 'project-report'
-    def dependencyReport = project.tasks.getByName( 'dependencyReport' ) as DependencyReportTask
-    dependencyReport.configurations = [ project.configurations.getByName( 'runtime' ) ] as Set
-  }
-
-  private static void configureHonker( Project project )
-  {
-    project.plugins.apply 'org.nosphere.honker'
-    def honkerGenDependencies = project.tasks.getByName( 'honkerGenDependencies' ) as HonkerGenDependenciesTask
-    def honkerGenLicense = project.tasks.getByName( 'honkerGenLicense' ) as HonkerGenLicenseTask
-    def honkerGenNotice = project.tasks.getByName( 'honkerGenNotice' ) as HonkerGenNoticeTask
-    def javaConvention = project.convention.getPlugin( JavaPluginConvention )
-    def mainSourceSet = javaConvention.sourceSets.getByName( 'main' )
-    mainSourceSet.output.dir( [ builtBy: honkerGenDependencies ] as Map<String, Object>,
-                              honkerGenDependencies.outputDir )
-    mainSourceSet.output.dir( [ builtBy: honkerGenLicense ] as Map<String, Object>,
-                              honkerGenLicense.outputDir )
-    mainSourceSet.output.dir( [ builtBy: honkerGenNotice ] as Map<String, Object>,
-                              honkerGenNotice.outputDir )
-    def honker = project.extensions.getByType( HonkerExtension )
-    // Project License, applied to all submodules
-    honker.license 'Apache 2'
-    // Dependencies (transitive or not) with no license information, overriding them
-    honker.licenseOverride { HonkerLicenseOverrideCandidate candidate ->
-      if( candidate.group == 'asm' || candidate.module == 'prefuse-core' )
-      {
-        candidate.license = 'BSD 3-Clause'
-      }
-      if( candidate.group == 'javax.websocket'
-        || candidate.group == 'javax.xml.bind' )
-      {
-        candidate.license = 'CDDL'
-      }
-      if( candidate.group == 'org.apache.httpcomponents'
-        || candidate.group == 'net.java.dev.jna'
-        || candidate.group == 'lucene'
-        || candidate.group == 'jdbm'
-        || candidate.group == 'org.osgi'
-        || candidate.group.startsWith( 'org.restlet' ) )
-      {
-        candidate.license = 'Apache 2'
-      }
-    }
-    honkerGenNotice.header = 'Apache Polygene'
-    honkerGenNotice.footer = 'This product includes software developed at\n' +
-                             'The Apache Software Foundation (http://www.apache.org/).\n'
-    project.tasks.getByName( 'check' ).dependsOn project.tasks.getByName( 'honkerCheck' )
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/BasePlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/BasePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/BasePlugin.groovy
new file mode 100644
index 0000000..05f7610
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/BasePlugin.groovy
@@ -0,0 +1,61 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.dependencies.PolygeneExtension
+import org.apache.polygene.gradle.structure.release.ReleaseSpecPlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+/**
+ * Plugin applied to all Polygene projects.
+ */
+@CompileStatic
+class BasePlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    applyGroup project
+    applyVersion project
+    project.plugins.apply ReleaseSpecPlugin
+    applyPolygeneExtension project
+    project.defaultTasks 'classes', 'test'
+  }
+
+  private static void applyGroup( Project project )
+  {
+    project.group = project.path == ':' ?
+                    'org.apache.polygene' :
+                    "org.apache.polygene.${ project.path.split( ':' ).drop( 1 ).dropRight( 1 ).join( '.' ) }"
+  }
+
+  private static void applyVersion( Project project )
+  {
+    if( project.version == 'unspecified' )
+    {
+      project.version = System.properties.version ?: '0'
+    }
+  }
+
+  private static void applyPolygeneExtension( Project project )
+  {
+    project.extensions.create 'polygene', PolygeneExtension, project
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy
deleted file mode 100644
index 5eeaca0..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle
-
-import groovy.transform.CompileStatic
-import org.apache.polygene.gradle.dependencies.DependenciesDeclarationExtension
-import org.apache.polygene.gradle.doc.AsciidocBuildInfoPlugin
-import org.apache.polygene.gradle.version.VersionClassPlugin
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.plugins.JavaPluginConvention
-import org.gradle.api.plugins.osgi.OsgiManifest
-import org.gradle.api.tasks.bundling.AbstractArchiveTask
-import org.gradle.api.tasks.javadoc.Javadoc
-import org.gradle.jvm.tasks.Jar
-import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
-import org.gradle.testing.jacoco.tasks.JacocoReport
-
-@CompileStatic
-class CodeProjectsPlugin implements Plugin<Project>
-{
-  static boolean isCodeProject( Project project )
-  {
-    [ 'src/main/java', 'src/test/java',
-      'src/main/groovy', 'src/test/groovy' ].collect { path ->
-      new File( "$project.projectDir/$path" )
-    }.any { dir -> dir.isDirectory() }
-  }
-
-  @Override
-  void apply( final Project project )
-  {
-    project.plugins.apply VersionClassPlugin
-    project.plugins.apply AsciidocBuildInfoPlugin
-
-    configureJar( project )
-    configureSupplementaryArchives( project )
-    configureArchivesBaseName( project )
-
-    configureJacoco( project )
-    configureCheckstyle( project )
-  }
-
-  private static void configureJar( Project project )
-  {
-    project.plugins.apply 'osgi'
-    def jar = project.tasks.getByName( 'jar' ) as Jar
-    def manifest = jar.manifest as OsgiManifest
-    manifest.attributes( [
-      license    : 'http://www.apache.org/licenses/LICENSE-2.0.txt',
-      docURL     : 'https://polygene.apache.org/',
-      description: project.description ?:
-                   'Apache Polygene\u2122 (Java Edition) is a platform for Composite Oriented Programming',
-      vendor     : 'The Apache Software Foundation, https://www.apache.org',
-    ] )
-    manifest.instruction '-debug', 'true'
-  }
-
-  private static void configureSupplementaryArchives( Project project )
-  {
-    def javaConvention = project.convention.getPlugin( JavaPluginConvention )
-    def sourceJar = project.tasks.create( 'sourceJar', Jar ) { Jar task ->
-      task.description = 'Builds -sources.jar'
-      task.classifier = 'sources'
-      task.from javaConvention.sourceSets.getByName( 'main' ).allSource
-    }
-    def testSourceJar = project.tasks.create( 'testSourceJar', Jar ) { Jar task ->
-      task.description = 'Builds -testsources.jar'
-      task.classifier = 'testsources'
-      task.from javaConvention.sourceSets.getByName( 'test' ).allSource
-    }
-    def javadoc = project.tasks.getByName( 'javadoc' ) as Javadoc
-    def javadocJar = project.tasks.create( 'javadocJar', Jar ) { Jar task ->
-      task.description = 'Builds -javadoc.jar'
-      task.classifier = 'javadoc'
-      task.from javadoc.destinationDir
-      task.dependsOn javadoc
-    }
-    project.artifacts.add( 'archives', sourceJar )
-    project.artifacts.add( 'archives', testSourceJar )
-    project.artifacts.add( 'archives', javadocJar )
-  }
-
-  private static void configureArchivesBaseName( Project project )
-  {
-    project.tasks.withType( AbstractArchiveTask ) { AbstractArchiveTask task ->
-      def toName = { List<String> path -> path.drop( 1 ).join( '.' ) }
-      def path = project.path.split( ':' ).drop( 1 ) as List<String>
-      if( path[ 0 ] == 'libraries' )
-      {
-        task.baseName = "org.apache.polygene.library.${ toName( path ) }"
-      }
-      else if( path[ 0 ].endsWith( 's' ) )
-      {
-        task.baseName = "org.apache.polygene.${ path[ 0 ].substring( 0, path[ 0 ].length() - 1 ) }.${ toName( path ) }"
-      }
-      else if( path.size() > 1 )
-      {
-        task.baseName = "org.apache.polygene.${ path[ 0 ] }.${ toName( path ) }"
-      }
-      else
-      {
-        task.baseName = "org.apache.polygene.${ path[ 0 ] }"
-      }
-    }
-  }
-
-  private static void configureJacoco( Project project )
-  {
-    def dependencies = project.rootProject.extensions.getByType( DependenciesDeclarationExtension )
-    project.plugins.apply 'jacoco'
-    def jacoco = project.extensions.getByType( JacocoPluginExtension )
-    jacoco.toolVersion = dependencies.buildToolsVersions.jacoco
-    project.tasks.withType( JacocoReport ) { JacocoReport task ->
-      task.group = TaskGroups.VERIFICATION
-      task.description = 'Generates test coverage report.'
-    }
-  }
-
-  private static void configureCheckstyle( Project project )
-  {
-    // project.plugins.apply 'checkstyle'
-    //    if( name == "org.apache.polygene.core.runtime" )
-    //    {
-    //      checkstyleMain {
-    //        configFile = new File( "$rootProject.projectDir.absolutePath/etc/polygene-runtime-checkstyle.xml" )
-    //        ignoreFailures = true
-    //      }
-    //    }
-    //    else
-    //    {
-    //      checkstyleMain {
-    //        configFile = new File( rootProject.projectDir.absolutePath.toString() + '/etc/polygene-api-checkstyle.xml' )
-    //        ignoreFailures = true
-    //        reporting.baseDir = "$rootProject.reporting.baseDir/checkstyle"
-    //      }
-    //    }
-    //    checkstyleTest {
-    //      configFile = new File( "$rootProject.projectDir.absolutePath/etc/polygene-tests-checkstyle.xml" )
-    //      ignoreFailures = true
-    //    }
-    //
-    //    checkstyleVersion {
-    //      configFile = new File( "$rootProject.projectDir.absolutePath/etc/polygene-tests-checkstyle.xml" )
-    //      ignoreFailures = true
-    //    }
-    //    // Create checkstyle report
-    //    task checkstyleReport( type: XsltTask, dependsOn: check ) {
-    //      source project.checkstyle.reportsDir
-    //      include '*.xml'
-    //      destDir = file( "build/reports/checkstyle/" )
-    //      extension = 'html'
-    //      stylesheetFile = file( "$rootProject.projectDir/etc/checkstyle-noframes.xsl" )
-    //    }
-    //
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy
deleted file mode 100644
index f20a610..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle
-
-import groovy.transform.CompileStatic
-import org.gradle.api.Project
-import org.gradle.api.artifacts.Dependency
-
-@CompileStatic
-class PolygeneExtension
-{
-  private final Project project
-  final Core core
-
-  PolygeneExtension( Project project )
-  {
-    this.project = project
-    this.core = new Core()
-  }
-
-  boolean isDevelopmentVersion()
-  {
-    return project.version == '0' || project.version.toString().contains( 'SNAPSHOT' )
-  }
-
-  boolean isReleaseVersion()
-  {
-    return !isDevelopmentVersion()
-  }
-
-  class Core
-  {
-    Dependency api = core( 'api' )
-    Dependency spi = core( 'spi' )
-    Dependency runtime = core( 'runtime' )
-    Dependency bootstrap = core( 'bootstrap' )
-    Dependency testsupport = core( 'testsupport' )
-  }
-
-  private Dependency core( String name )
-  {
-    return dependency( 'core', name )
-  }
-
-  Dependency library( String name )
-  {
-    return dependency( 'libraries', name )
-  }
-
-  Dependency extension( String name )
-  {
-    return dependency( 'extensions', name )
-  }
-
-  Dependency tool( String name )
-  {
-    return dependency( 'tools', name )
-  }
-
-  private Dependency dependency( String group, String name )
-  {
-    project.dependencies.project( path: ":$group:$name" )
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
deleted file mode 100644
index a0de513..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle
-
-import groovy.transform.CompileStatic
-import org.apache.rat.gradle.RatTask
-import org.apache.polygene.gradle.dependencies.DependenciesDeclarationExtension
-import org.apache.polygene.gradle.dist.DistributionPlugin
-import org.apache.polygene.gradle.release.ReleaseSpecExtension
-import org.apache.polygene.gradle.release.ReleaseSpecPlugin
-import org.apache.polygene.gradle.test.AggregatedJacocoReportTask
-import org.gradle.api.GradleException
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.Task
-import org.gradle.api.artifacts.Configuration
-import org.gradle.api.plugins.JavaPluginConvention
-import org.gradle.api.tasks.Copy
-import org.gradle.api.tasks.javadoc.Javadoc
-import org.gradle.api.tasks.testing.Test
-import org.gradle.api.tasks.testing.TestReport
-import org.gradle.external.javadoc.StandardJavadocDocletOptions
-
-@CompileStatic
-class RootProjectPlugin implements Plugin<Project>
-{
-  static final String PROJECT_TITLE = 'Apache Polygene\u2122 (Java Edition) SDK'
-  static final String PROJECT_DESCRIPTION = 'Apache Polygene\u2122 (Java Edition) is a framework for domain centric ' +
-                                            'application development, including evolved concepts from AOP, DI and DDD.'
-
-  static class TaskNames
-  {
-    static final String GO_OFFLINE = 'goOffline'
-    static final String GLOBAL_TEST_REPORT = 'globalTestReport'
-    static final String JAVADOCS = 'javadocs'
-    static final String ARCHIVE_JAVADOCS = 'archiveJavadocs'
-    static final String BUILD_ALL = 'buildAll'
-  }
-
-  @Override
-  void apply( Project project )
-  {
-    project.plugins.apply ReleaseSpecPlugin
-
-    applyProjectMetadata( project )
-    applyHelperTasks( project )
-    applyPlugins( project )
-
-    configureJacoco( project )
-    configureTestReport( project )
-    configureJavadocs( project )
-    configureRat( project )
-
-    project.plugins.apply DistributionPlugin
-    configureReleaseTask( project )
-  }
-
-  private static void applyProjectMetadata( Project project )
-  {
-    def extraProperties = project.extensions.extraProperties
-    extraProperties.set 'title', PROJECT_TITLE
-    extraProperties.set 'description', PROJECT_DESCRIPTION
-  }
-
-  private static void applyHelperTasks( Project project )
-  {
-    project.tasks.create( TaskNames.GO_OFFLINE ) { Task task ->
-      task.group = TaskGroups.HELP
-      task.description = 'Resolves all dependencies configuration'
-      task.doLast {
-        def allConfigurations = project.allprojects.collect { Project each ->
-          each.configurations
-        }.flatten() as Set<Configuration>
-        allConfigurations*.resolvedConfiguration
-      }
-    }
-    def buildAll = project.tasks.create( TaskNames.BUILD_ALL )
-    buildAll.group = TaskGroups.BUILD
-    buildAll.description = 'Builds all'
-    buildAll.dependsOn 'javadocs', 'check', 'jar',
-                       project.subprojects
-                              .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
-                              .collect { p -> p.tasks.getByName( 'dependencyReport' ) },
-                       project.subprojects
-                              .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
-                              .collect { p -> p.tasks.getByName( 'assemble' ) },
-                       ':manual:website'
-  }
-
-  private static void applyPlugins( Project project )
-  {
-    project.plugins.apply 'org.nosphere.apache.rat'
-  }
-
-  private static void configureJacoco( Project project )
-  {
-    def dependencies = project.rootProject.extensions.getByType( DependenciesDeclarationExtension )
-    project.configurations.create( 'jacoco' )
-    project.dependencies.add( 'jacoco', "org.jacoco:org.jacoco.ant:${ dependencies.buildToolsVersions.jacoco }" )
-    def task = project.tasks.create( 'coverageReport', AggregatedJacocoReportTask ) { AggregatedJacocoReportTask task ->
-      task.group = TaskGroups.VERIFICATION
-      task.description = 'Generates global coverage report'
-      task.dependsOn project.subprojects
-                            .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
-                            .collect( { Project p -> p.tasks.getByName( 'test' ) } )
-    }
-    project.tasks.getByName( 'check' ).dependsOn task
-  }
-
-  private static void configureTestReport( Project project )
-  {
-    project.tasks.create( TaskNames.GLOBAL_TEST_REPORT, TestReport ) { TestReport task ->
-      task.group = TaskGroups.VERIFICATION
-      task.description = 'Generates global test report'
-      task.destinationDir = project.file( "$project.buildDir/reports/tests" )
-      task.reportOn project.subprojects
-                           .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
-                           .collect { it.tasks.getByName( 'test' ) }
-    }
-    def test = project.tasks.getByName( 'test' ) as Test
-    test.dependsOn project.subprojects.collect { it.tasks.getByName( 'test' ) }
-    test.dependsOn project.tasks.getByName( TaskNames.GLOBAL_TEST_REPORT )
-    test.reports.html.enabled = false
-  }
-
-  private static void configureJavadocs( Project project )
-  {
-    def polygene = project.extensions.getByType( PolygeneExtension )
-    def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
-    project.tasks.create( TaskNames.JAVADOCS, Javadoc ) { Javadoc task ->
-      task.group = TaskGroups.DOCUMENTATION
-      task.description = 'Builds the whole SDK public Javadoc'
-      task.dependsOn ReleaseSpecPlugin.TaskNames.RELEASE_APPROVED_PROJECTS
-      def options = task.options as StandardJavadocDocletOptions
-      options.docFilesSubDirs = true
-      options.encoding = "UTF-8"
-      options.overview = "${ project.projectDir }/src/javadoc/overview.html"
-      task.title = "${ PROJECT_TITLE } ${ project.version }"
-      def apiSources = releaseSpec.approvedProjects.findAll { approved ->
-        ( approved.name.startsWith( 'org.apache.polygene.core' ) &&
-          !approved.name.startsWith( 'org.apache.polygene.core.runtime' ) ) ||
-        approved.name.startsWith( 'org.apache.polygene.library' ) ||
-        approved.name.startsWith( 'org.apache.polygene.extension' ) ||
-        approved.name.startsWith( 'org.apache.polygene.tool' )
-      }
-      task.source apiSources.collect { each ->
-        each.convention.getPlugin( JavaPluginConvention ).sourceSets.getByName( 'main' ).allJava
-      }
-      task.destinationDir = project.file( "${ project.convention.getPlugin( JavaPluginConvention ).docsDir }/javadocs" )
-      task.classpath = project.files( apiSources.collect { apiProject ->
-        apiProject.convention.getPlugin( JavaPluginConvention ).sourceSets.getByName( 'main' ).compileClasspath
-      } )
-      options.group( [
-        "Core API"      : [ "org.apache.polygene.api",
-                            "org.apache.polygene.api.*" ],
-        "Core Bootstrap": [ "org.apache.polygene.bootstrap",
-                            "org.apache.polygene.bootstrap.*" ],
-        "Core SPI"      : [ "org.apache.polygene.spi",
-                            "org.apache.polygene.spi.*" ],
-        "Libraries"     : [ "org.apache.polygene.library.*" ],
-        "Extensions"    : [ "org.apache.polygene.valueserialization.*",
-                            "org.apache.polygene.entitystore.*",
-                            "org.apache.polygene.index.*",
-                            "org.apache.polygene.metrics.*",
-                            "org.apache.polygene.cache.*",
-                            "org.apache.polygene.migration",
-                            "org.apache.polygene.migration.*" ],
-        "Tools"         : [ "org.apache.polygene.tools.*",
-                            "org.apache.polygene.envisage",
-                            "org.apache.polygene.envisage.*" ],
-        "Test Support"  : [ "org.apache.polygene.test",
-                            "org.apache.polygene.test.*" ]
-      ] )
-    }
-    project.tasks.create( TaskNames.ARCHIVE_JAVADOCS, Copy ) { Copy task ->
-      task.group = TaskGroups.DOCUMENTATION
-      task.description = 'Copy SDK public Javadoc to ../polygene-web'
-      task.dependsOn TaskNames.JAVADOCS
-      task.from 'build/docs/javadoc/'
-      if( polygene.developmentVersion )
-      {
-        task.into( "$project.projectDir/../polygene-web/site/content/java/develop/javadocs/" )
-      }
-      else
-      {
-        task.into( "$project.projectDir/../polygene-web/site/content/java/$project.version/javadocs/" )
-      }
-    }
-  }
-
-  private static void configureRat( Project project )
-  {
-    def rat = project.tasks.getByName( 'rat' ) as RatTask
-    rat.group = TaskGroups.VERIFICATION
-    rat.onlyIf { project.version != '0' }
-    rat.excludes = [
-      '**/.DS_Store/**', '**/._*',
-      // Git Files
-      '**/.git/**', '**/.gitignore',
-      // Gradle Files
-      'gradle/wrapper/**', '**/gradlew', '**/gradlew.bat', '**/.gradle/**',
-      // Build Output
-      '**/build/**', '**/derby.log', 'out/**',
-      // IDE Files
-      '**/.idea/**', '**/*.iml', '**/*.ipr', '**/*.iws',
-      '**/.settings/**', '**/.classpath', '**/.project',
-      '**/.gradletasknamecache', '**/private/cache/**',
-      '**/.nb-gradle-properties', '**/.nb-gradle/**',
-      // JSON files are not allowed to have comments, according to http://www.json.org/ and http://www.ietf.org/rfc/rfc4627.txt
-      '**/*.json',
-      // Various Text Resources
-      '**/README.*', '**/README*.*', '**/TODO',
-      '**/src/main/resources/**/*.txt',
-      '**/src/test/resources/**/*.txt',
-      'libraries/rest-server/src/main/resources/**/*.htm',
-      'libraries/rest-server/src/main/resources/**/*.atom',
-      'tools/qidea/src/main/resources/**/*.ft',
-      'tools/qidea/src/main/resources/**/*.template',
-      // Graphic Resources
-      '**/*.svg', '**/*.gif', '**/*.png', '**/*.jpg', '**/*.psd',
-      // Keystores
-      '**/*.jceks',
-      // Syntax Highlighter - MIT
-      'manual/**/sh*.css', 'manual/**/sh*.js',
-      // jQuery & plugins - MIT
-      'manual/**/jquery*.js',
-      // W3C XML Schemas - W3C Software License
-      'samples/rental/src/main/resources/*.xsd',
-      // Polygene Generator Heroes Templates - MIT
-      'tools/generator-polygene/app/templates/Heroes/**',
-      // templates that will become the user's source files, should not have license headers
-      'tools/shell/src/dist/etc/templates/**',
-    ]
-  }
-
-  private static void configureReleaseTask( Project project )
-  {
-    def polygene = project.extensions.getByType( PolygeneExtension )
-    def release = project.tasks.create( 'release' )
-    release.description = 'Builds, tests and uploads the release artifacts'
-    release.group = TaskGroups.RELEASE
-    release.doFirst {
-      if( polygene.developmentVersion )
-      {
-        throw new GradleException( "Cannot release development version $project.version, use '-Dversion=X.Y.Z'" )
-      }
-    }
-    release.dependsOn 'checkReleaseSpec',
-                      'rat',
-                      'archiveJavadocs',
-                      ':org.apache.polygene.manual:copyWebsite',
-                      project.allprojects
-                             .findAll { p -> CodeProjectsPlugin.isCodeProject( p ) }
-                             .collect { it.tasks.getByName( 'uploadArchives' ) },
-                      'uploadArchives',
-                      'dist'
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/TaskGroups.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/TaskGroups.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/TaskGroups.groovy
index 61d3d0d..bf435a7 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/TaskGroups.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/TaskGroups.groovy
@@ -17,19 +17,20 @@
  */
 package org.apache.polygene.gradle
 
-import org.gradle.api.plugins.ApplicationPlugin
+import groovy.transform.CompileStatic
 import org.gradle.api.plugins.BasePlugin
 import org.gradle.api.plugins.HelpTasksPlugin
 import org.gradle.api.plugins.JavaBasePlugin
 import org.gradle.language.base.plugins.LifecycleBasePlugin
 
+@CompileStatic
 class TaskGroups
 {
   static final String HELP = HelpTasksPlugin.HELP_GROUP
   static final String BUILD = LifecycleBasePlugin.BUILD_GROUP
   static final String VERIFICATION = LifecycleBasePlugin.VERIFICATION_GROUP
   static final String DOCUMENTATION = JavaBasePlugin.DOCUMENTATION_GROUP
-  static final String DISTRIBUTION = ApplicationPlugin.APPLICATION_GROUP
+  static final String DISTRIBUTION = 'distribution'
   static final String DISTRIBUTION_VERIFICATION = 'distribution verification'
   static final String PERFORMANCE = 'performance'
   static final String PERFORMANCE_VERIFICATION = 'performance verification'

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/CodePlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/CodePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/CodePlugin.groovy
new file mode 100644
index 0000000..6c143c8
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/CodePlugin.groovy
@@ -0,0 +1,201 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.code
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.BasePlugin
+import org.apache.polygene.gradle.TaskGroups
+import org.apache.polygene.gradle.dependencies.DependenciesDeclarationExtension
+import org.apache.polygene.gradle.dependencies.DependenciesPlugin
+import org.gradle.api.JavaVersion
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.plugins.JavaPluginConvention
+import org.gradle.api.plugins.osgi.OsgiManifest
+import org.gradle.api.tasks.bundling.AbstractArchiveTask
+import org.gradle.api.tasks.compile.JavaCompile
+import org.gradle.api.tasks.testing.Test
+import org.gradle.api.tasks.testing.logging.TestExceptionFormat
+import org.gradle.jvm.tasks.Jar
+import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
+import org.gradle.testing.jacoco.tasks.JacocoReport
+
+@CompileStatic
+class CodePlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply BasePlugin
+    applyJava project
+    project.plugins.apply DependenciesPlugin
+    configureDefaultDependencies project
+    configureTest project
+    configureJar project
+    configureArchivesBaseName project
+    configureJacoco project
+    configureCheckstyle project
+  }
+
+  private static void applyJava( Project project )
+  {
+    project.plugins.apply 'java'
+    def javaConvention = project.convention.getPlugin JavaPluginConvention
+    javaConvention.targetCompatibility = JavaVersion.VERSION_1_8
+    javaConvention.sourceCompatibility = JavaVersion.VERSION_1_8
+    project.tasks.withType( JavaCompile ) { JavaCompile task ->
+      task.options.encoding = 'UTF-8'
+      task.options.compilerArgs << '-Xlint:deprecation'
+    }
+  }
+
+  private static void configureDefaultDependencies( Project project )
+  {
+    def declaration = project.rootProject.extensions.getByType DependenciesDeclarationExtension
+    declaration.defaultDependencies.each { String configuration, List<Object> dependencies ->
+      dependencies.each { dependency ->
+        if( dependency instanceof Collection )
+        {
+          dependency.each { subdep ->
+            project.dependencies.add configuration, subdep
+          }
+        }
+        else
+        {
+          project.dependencies.add configuration, dependency
+        }
+      }
+    }
+  }
+
+  private static void configureTest( Project project )
+  {
+    // Match --max-workers and Test maxParallelForks, use 1 if parallel is disabled
+    def parallel = project.gradle.startParameter.parallelProjectExecutionEnabled
+    def maxTestWorkers = ( parallel ? project.gradle.startParameter.maxWorkerCount : 1 ) as int
+    // The space in the directory name is intentional
+    def allTestsDir = project.file "$project.buildDir/tmp/test files"
+    project.tasks.withType( Test ) { Test testTask ->
+      testTask.onlyIf { !project.hasProperty( 'skipTests' ) }
+      testTask.testLogging.info.exceptionFormat = TestExceptionFormat.FULL
+      testTask.maxHeapSize = '1g'
+      testTask.maxParallelForks = maxTestWorkers
+      testTask.systemProperties = [ 'proxySet' : System.properties[ 'proxySet' ],
+                                    'proxyHost': System.properties[ 'proxyHost' ],
+                                    'proxyPort': System.properties[ 'proxyPort' ] ]
+      testTask.reports.html.enabled = true
+      def testDir = new File( allTestsDir, testTask.name )
+      def workDir = new File( testDir, 'work' )
+      def tmpDir = new File( testDir, 'tmp' )
+      def homeDir = new File( testDir, 'home' )
+      testTask.workingDir = workDir
+      testTask.systemProperties << ( [
+        'user.dir'      : workDir.absolutePath,
+        'java.io.tmpdir': tmpDir.absolutePath,
+        'home.dir'      : homeDir.absolutePath
+      ] as Map<String, Object> )
+      testTask.environment << ( [
+        'HOME'       : homeDir.absolutePath,
+        'USERPROFILE': homeDir.absolutePath
+      ] as Map<String, Object> )
+      testTask.doFirst { Test task ->
+        [ workDir, tmpDir, homeDir ]*.mkdirs()
+      }
+      testTask.doLast { Test task ->
+        if( !task.state.failure )
+        {
+          project.delete testDir
+        }
+      }
+    }
+  }
+
+  private static void configureJar( Project project )
+  {
+    project.plugins.apply 'osgi'
+    def jar = project.tasks.getByName( 'jar' ) as Jar
+    def manifest = jar.manifest as OsgiManifest
+    manifest.attributes( [
+      license    : 'http://www.apache.org/licenses/LICENSE-2.0.txt',
+      docURL     : 'https://polygene.apache.org/',
+      description: project.description ?:
+                   'Apache Polygene\u2122 (Java Edition) is a platform for Composite Oriented Programming',
+      vendor     : 'The Apache Software Foundation, https://www.apache.org',
+    ] )
+    manifest.instruction '-debug', 'true'
+  }
+
+
+  private static void configureArchivesBaseName( Project project )
+  {
+    def publishedName = PublishNaming.publishedNameFor( project.path )
+    project.tasks.withType( AbstractArchiveTask ) { AbstractArchiveTask task ->
+      task.baseName = publishedName
+    }
+  }
+
+  private static void configureJacoco( Project project )
+  {
+    def dependencies = project.rootProject.extensions.getByType DependenciesDeclarationExtension
+    project.plugins.apply 'jacoco'
+    def jacoco = project.extensions.getByType JacocoPluginExtension
+    jacoco.toolVersion = dependencies.buildToolsVersions.jacoco
+    project.tasks.withType( JacocoReport ) { JacocoReport task ->
+      task.group = TaskGroups.VERIFICATION
+      task.description = 'Generates test coverage report.'
+    }
+  }
+
+  private static void configureCheckstyle( Project project )
+  {
+    // project.plugins.apply 'checkstyle'
+    //    if( name == "org.apache.polygene.core.runtime" )
+    //    {
+    //      checkstyleMain {
+    //        configFile = new File( "$rootProject.projectDir.absolutePath/etc/polygene-runtime-checkstyle.xml" )
+    //        ignoreFailures = true
+    //      }
+    //    }
+    //    else
+    //    {
+    //      checkstyleMain {
+    //        configFile = new File( rootProject.projectDir.absolutePath.toString() + '/etc/polygene-api-checkstyle.xml' )
+    //        ignoreFailures = true
+    //        reporting.baseDir = "$rootProject.reporting.baseDir/checkstyle"
+    //      }
+    //    }
+    //    checkstyleTest {
+    //      configFile = new File( "$rootProject.projectDir.absolutePath/etc/polygene-tests-checkstyle.xml" )
+    //      ignoreFailures = true
+    //    }
+    //
+    //    checkstyleVersion {
+    //      configFile = new File( "$rootProject.projectDir.absolutePath/etc/polygene-tests-checkstyle.xml" )
+    //      ignoreFailures = true
+    //    }
+    //    // Create checkstyle report
+    //    task checkstyleReport( type: XsltTask, dependsOn: check ) {
+    //      source project.checkstyle.reportsDir
+    //      include '*.xml'
+    //      destDir = file( "build/reports/checkstyle/" )
+    //      extension = 'html'
+    //      stylesheetFile = file( "$rootProject.projectDir/etc/checkstyle-noframes.xsl" )
+    //    }
+    //
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/MavenMetadata.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/MavenMetadata.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/MavenMetadata.groovy
new file mode 100644
index 0000000..c10ccda
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/MavenMetadata.groovy
@@ -0,0 +1,281 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.code
+
+import org.gradle.api.artifacts.maven.MavenDeployer
+
+class MavenMetadata
+{
+  static void applyTo( MavenDeployer mavenDeployer )
+  {
+    mavenDeployer.pom {
+      project {
+        url 'https://polygene.apache.org/'
+        organization {
+          name 'The Apache Software Foundation'
+          url 'https://apache.org/'
+        }
+        inceptionYear '2007'
+        issueManagement {
+          system 'jira'
+          url 'https://issues.apache.org/jira/browse/POLYGENE'
+        }
+        scm {
+          url "https://github.com/apache/polygene-java"
+          connection "scm:git:https://git-wip-us.apache.org/repos/asf/polygene-java.git"
+          developerConnection "scm:git:https://git-wip-us.apache.org/repos/asf/polygene-java.git"
+        }
+        licenses {
+          license {
+            name 'Apache License, version 2.0.'
+            url 'http://www.apache.org/licenses/LICENSE-2.0'
+          }
+        }
+        mailingLists {
+          mailingList {
+            name 'Users List'
+            subscribe 'users-subscribe@polygene.apache.org'
+            unsubscribe 'users-unsubscribe@polygene.apache.org'
+            post 'users@polygene.apache.org'
+            archive 'https://mail-archives.apache.org/mod_mbox/polygene-users/'
+            otherArchives {
+              otherArchive 'https://www.apache.org/foundation/mailinglists.html#archives'
+            }
+          }
+          mailingList {
+            name 'Development List'
+            subscribe 'dev-subscribe@polygene.apache.org'
+            unsubscribe 'dev-unsubscribe@polygene.apache.org'
+            post 'dev@polygene.apache.org'
+            archive 'https://mail-archives.apache.org/mod_mbox/polygene-dev/'
+            otherArchives {
+              otherArchive 'https://www.apache.org/foundation/mailinglists.html#archives'
+            }
+          }
+          mailingList {
+            name 'Commits List'
+            subscribe 'commits-subscribe@polygene.apache.org'
+            unsubscribe 'commits-unsubscribe@polygene.apache.org'
+            post 'commits@polygene.apache.org'
+            archive 'https://mail-archives.apache.org/mod_mbox/polygene-commits/'
+            otherArchives {
+              otherArchive 'https://www.apache.org/foundation/mailinglists.html#archives'
+            }
+          }
+        }
+        developers {
+          developer {
+            id 'niclas@hedhman.org'
+            name 'Niclas Hedhman'
+            email 'niclas@hedhman.org'
+            roles {
+              role 'Core Team'
+            }
+            organizationUrl 'http://polygene.apache.org'
+            timezone 'UTC+8'
+          }
+          developer {
+            id 'rickardoberg'
+            name 'Rickard \u00F6berg'
+            email 'rickard.oberg@jayway.se'
+            roles {
+              role 'Core Team'
+            }
+            url 'http://www.neotechnology.com'
+            organization 'Neo Technology AB'
+            organizationUrl 'http://www.neotechnology.com'
+            timezone 'UTC+8'
+          }
+          developer {
+            id 'edward.yakop@gmail.com'
+            name 'Edward Yakop'
+            email 'efy@codedragons.com'
+            roles {
+              role 'Core Team'
+            }
+            organizationUrl 'http://polygene.apache.org'
+            timezone 'UTC+8'
+          }
+          developer {
+            id 'adreghiciu@gmail.com'
+            name 'Alin Dreghiciu'
+            email 'adreghiciu@codedragons.com'
+            roles {
+              role 'Core Team'
+            }
+            organizationUrl 'http://polygene.apache.org'
+            timezone 'UTC+2'
+          }
+          developer {
+            id 'mesirii'
+            name 'Michael Hunger'
+            email 'qi4j@jexp.de'
+            roles {
+              role 'Core Team'
+            }
+            timezone 'CET'
+          }
+
+          developer {
+            id "muhdkamil"
+            name "Muhd Kamil bin Mohd Baki"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "UTC+8"
+          }
+
+          developer {
+            id "ops4j@leangen.net"
+            name "David Leangen"
+            organization "Bioscene"
+            email "ops4j@leangen.net"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "UTC+9"
+          }
+
+          developer {
+            id "sonny.gill@jayway.net"
+            name "Sonny Gill"
+            email "sonny.public@gmail.com"
+            roles {
+              role 'Community Team'
+            }
+            timezone "UTC+8"
+          }
+
+          developer {
+            id "taowen"
+            name "Tao Wen"
+            organization ""
+            email "taowen@gmail.com"
+            roles {
+              role 'Community Team'
+            }
+            timezone "UTC+8"
+          }
+
+          developer {
+            id "thobe"
+            name "Tobias Ivarsson"
+            email "tobias@neotechnology.com"
+            url "http://www.neotechnology.com"
+            organization "NeoTechnology"
+            organizationUrl "http://www.neotechnology.com"
+            roles {
+              role "Platform Team"
+            }
+            timezone "CET"
+          }
+
+          developer {
+            id "boon"
+            name "Lan Boon Ping"
+            email "boonping81@gmail.com"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "UTC+8"
+          }
+
+          developer {
+            id "jan.kronquist@gmail.com"
+            name "Jan Kronquist"
+            email "jan.kronquist@gmail.com"
+            organization "Jayway"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "CET"
+          }
+
+          developer {
+            id "nmwael"
+            name "Nino Saturnino Martinez Vazquez Wael"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "CET"
+          }
+
+          developer {
+            id "peter@neubauer.se"
+            name "Peter Neubauer"
+            email "peter@neubauer.se"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "CET"
+          }
+
+          developer {
+            id "rwallace"
+            name "Richard Wallace"
+            email "rwallace@thewallacepack.net"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "UTC-7"
+          }
+
+          developer {
+            id "siannyhalim@gmail.com"
+            name "Sianny Halim"
+            email "siannyhalim@gmail.com"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "UTC+8"
+          }
+
+          developer {
+            id "paul@nosphere.org"
+            name "Paul Merlin"
+            email "paul@nosphere.org"
+            roles {
+              role 'Core Team'
+            }
+            timezone "CET"
+          }
+
+          developer {
+            id "stas.dev+qi4j@gmail.com"
+            name "Stanislav Muhametsin"
+            email "stas.dev+qi4j@gmail.com"
+            roles {
+              role 'Platform Team'
+            }
+            timezone "UTC+2"
+          }
+
+          developer {
+            id "tonny"
+            name "Tonny Kohar"
+            roles {
+              role "Community Team"
+            }
+            email "tonny.kohar@gmail.com"
+            timezone "UTC+7"
+          }
+        }
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishNaming.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishNaming.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishNaming.groovy
new file mode 100644
index 0000000..2347329
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishNaming.groovy
@@ -0,0 +1,40 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.code
+
+class PublishNaming
+{
+  static String publishedNameFor( String projectPath )
+  {
+    def toName = { List<String> path -> path.drop( 1 ).join( '.' ) }
+    def path = projectPath.split( ':' ).drop( 1 ) as List<String>
+    if( path[ 0 ] == 'libraries' )
+    {
+      return "org.apache.polygene.library.${ toName( path ) }"
+    }
+    else if( path[ 0 ].endsWith( 's' ) )
+    {
+      return "org.apache.polygene.${ path[ 0 ].substring( 0, path[ 0 ].length() - 1 ) }.${ toName( path ) }"
+    }
+    else if( path.size() > 1 )
+    {
+      return "org.apache.polygene.${ path[ 0 ] }.${ toName( path ) }"
+    }
+    return "org.apache.polygene.${ path[ 0 ] }"
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishedCodePlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishedCodePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishedCodePlugin.groovy
new file mode 100644
index 0000000..a97b4d9
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishedCodePlugin.groovy
@@ -0,0 +1,152 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.code
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.structure.manual.AsciidocBuildInfoPlugin
+import org.apache.polygene.gradle.structure.release.ReleaseSpecExtension
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.plugins.JavaPluginConvention
+import org.gradle.api.tasks.javadoc.Javadoc
+import org.gradle.external.javadoc.StandardJavadocDocletOptions
+import org.gradle.jvm.tasks.Jar
+import org.nosphere.honker.gradle.HonkerCheckTask
+import org.nosphere.honker.gradle.HonkerExtension
+import org.nosphere.honker.gradle.HonkerGenDependenciesTask
+import org.nosphere.honker.gradle.HonkerGenLicenseTask
+import org.nosphere.honker.gradle.HonkerGenNoticeTask
+import org.nosphere.honker.gradle.HonkerLicenseOverrideCandidate
+
+@CompileStatic
+class PublishedCodePlugin implements Plugin<Project>
+{
+  @Override
+  void apply( final Project project )
+  {
+    project.plugins.apply CodePlugin
+    configureJavadoc project
+    configureHonker( project )
+    project.plugins.apply VersionClassPlugin
+    project.plugins.apply AsciidocBuildInfoPlugin
+    applySupplementaryArchives project
+    project.plugins.apply PublishingPlugin
+  }
+
+  static void configureJavadoc( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    project.tasks.withType( Javadoc ) { Javadoc task ->
+      task.onlyIf { !releaseSpec.developmentVersion }
+      def options = task.options as StandardJavadocDocletOptions
+      options.encoding = 'UTF-8'
+      options.docEncoding = 'UTF-8'
+      options.charSet = 'UTF-8'
+      options.noTimestamp = true
+      options.links = [
+        'http://docs.oracle.com/javase/8/docs/api/',
+        'https://stleary.github.io/JSON-java/',
+        'http://junit.org/junit4/javadoc/latest/'
+      ]
+      // exclude '**/internal/**'
+    }
+  }
+
+  private static void configureHonker( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    if( releaseSpec.developmentVersion )
+    {
+      return
+    }
+    project.plugins.apply 'org.nosphere.honker'
+    def honkerGenDependencies = project.tasks.getByName( 'honkerGenDependencies' ) as HonkerGenDependenciesTask
+    def honkerGenLicense = project.tasks.getByName( 'honkerGenLicense' ) as HonkerGenLicenseTask
+    def honkerGenNotice = project.tasks.getByName( 'honkerGenNotice' ) as HonkerGenNoticeTask
+    def honkerCheck = project.tasks.getByName( 'honkerCheck' ) as HonkerCheckTask
+    [ honkerGenDependencies, honkerGenLicense, honkerGenNotice, honkerCheck ].group = null
+    def javaConvention = project.convention.getPlugin JavaPluginConvention
+    def mainSourceSet = javaConvention.sourceSets.getByName 'main'
+    mainSourceSet.output.dir( [ builtBy: honkerGenDependencies ] as Map<String, Object>,
+                              honkerGenDependencies.outputDir )
+    mainSourceSet.output.dir( [ builtBy: honkerGenLicense ] as Map<String, Object>,
+                              honkerGenLicense.outputDir )
+    mainSourceSet.output.dir( [ builtBy: honkerGenNotice ] as Map<String, Object>,
+                              honkerGenNotice.outputDir )
+    def honker = project.extensions.getByType HonkerExtension
+    // Project License, applied to all submodules
+    honker.license 'Apache 2'
+    // Dependencies (transitive or not) with no license information, overriding them
+    honker.licenseOverride { HonkerLicenseOverrideCandidate candidate ->
+      if( candidate.group == 'asm' || candidate.module == 'prefuse-core' )
+      {
+        candidate.license = 'BSD 3-Clause'
+      }
+      if( candidate.group == 'javax.json'
+        || candidate.group == 'javax.websocket'
+        || candidate.group == 'javax.xml.bind' )
+      {
+        candidate.license = 'CDDL'
+      }
+      if( candidate.group == 'org.apache.httpcomponents'
+        || candidate.group == 'net.java.dev.jna'
+        || candidate.group == 'lucene'
+        || candidate.group == 'jdbm'
+        || candidate.group == 'org.osgi'
+        || candidate.group.startsWith( 'org.restlet' ) )
+      {
+        candidate.license = 'Apache 2'
+      }
+    }
+    honkerGenNotice.header = 'Apache Polygene'
+    honkerGenNotice.footer = 'This product includes software developed at\n' +
+                             'The Apache Software Foundation (http://www.apache.org/).\n'
+    project.tasks.getByName( 'check' ).dependsOn honkerCheck
+  }
+
+  private static void applySupplementaryArchives( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    def javaConvention = project.convention.getPlugin JavaPluginConvention
+    def sourceJar = project.tasks.create( 'sourceJar', Jar ) { Jar task ->
+      task.description = 'Builds -sources.jar'
+      task.classifier = 'sources'
+      task.from javaConvention.sourceSets.getByName( 'main' ).allSource
+    }
+    def testSourceJar = project.tasks.create( 'testSourceJar', Jar ) { Jar task ->
+      task.description = 'Builds -testsources.jar'
+      task.classifier = 'testsources'
+      task.onlyIf { !releaseSpec.developmentVersion }
+      task.from javaConvention.sourceSets.getByName( 'test' ).allSource
+    }
+    def javadoc = project.tasks.getByName( 'javadoc' ) as Javadoc
+    def javadocJar = project.tasks.create( 'javadocJar', Jar ) { Jar task ->
+      task.description = 'Builds -javadoc.jar'
+      task.classifier = 'javadoc'
+      task.onlyIf { !releaseSpec.developmentVersion }
+      task.from javadoc.destinationDir
+      task.dependsOn javadoc
+    }
+    project.artifacts.add 'archives', sourceJar
+    if( !releaseSpec.developmentVersion )
+    {
+      project.artifacts.add 'archives', testSourceJar
+      project.artifacts.add 'archives', javadocJar
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishingPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishingPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishingPlugin.groovy
new file mode 100644
index 0000000..e8ec046
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/code/PublishingPlugin.groovy
@@ -0,0 +1,211 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.code
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.structure.release.ReleaseSpecExtension
+import org.gradle.api.GradleException
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.artifacts.maven.MavenDeployer
+import org.gradle.api.artifacts.maven.MavenDeployment
+import org.gradle.api.internal.plugins.DslObject
+import org.gradle.api.plugins.MavenRepositoryHandlerConvention
+import org.gradle.api.publication.maven.internal.deployer.BaseMavenDeployer
+import org.gradle.api.publication.maven.internal.deployer.MavenRemoteRepository
+import org.gradle.api.tasks.Upload
+import org.gradle.plugins.signing.Sign
+import org.gradle.plugins.signing.SigningExtension
+
+/**
+ * Publishing.
+ *
+ * <strong>Configuration</strong>
+ *
+ * By default RELEASES are signed, SNAPSHOTS are not.
+ * Signing can be turned on or off by setting the {@literal uploadSigned} property.
+ *
+ * By default RELEASES must satisfy {@link org.apache.polygene.gradle.structure.release.ModuleReleaseSpec}, SNAPSHOT don't.
+ * This can be turned on or off by setting the {@literal uploadReleaseSpec} property.
+ *
+ * By default RELEASES and SNAPSHOTS are uploaded using HTTP.
+ * Used Wagon can be overridden by setting the {@literal uploadWagon} property.
+ *
+ * By default RELEASES and SNAPSHOTS are uploaded to Apache Nexus.
+ * Target repository can be overridden by setting the {@literal uploadRepository} property.
+ *
+ * No username/password is provided by default.
+ * If needed set them using the uploadUsername and {@literal uploadPassword} properties.
+ */
+@CompileStatic
+class PublishingPlugin implements Plugin<Project>
+{
+  static final String WAGON_HTTP = 'org.apache.maven.wagon:wagon-http:2.2'
+  static final String WAGON_SSH = 'org.apache.maven.wagon:wagon-ssh:2.2'
+  static final String WAGON_WEBDAV = 'org.apache.maven.wagon:wagon-webdav:1.0-beta-2'
+
+  static final String RELEASES_REPOSITORY_NAME = 'apache.releases.https'
+  static final String RELEASES_REPOSITORY_URL = 'https://repository.apache.org/service/local/staging/deploy/maven2'
+  static final String SNAPSHOTS_REPOSITORY_NAME = 'apache.snapshots.https'
+  static final String SNAPSHOTS_REPOSITORY_URL = 'https://repository.apache.org/content/repositories/snapshots'
+
+  static class Config
+  {
+    boolean snapshots
+    boolean releases
+    boolean signed
+    boolean releaseSpec
+    String wagon
+    String repositoryName
+    String repositoryUrl
+    String username
+    String password
+  }
+
+  @Override
+  void apply( final Project project )
+  {
+    Config config = configFor project
+    applyWagonConfiguration project, config
+    configureSigning project, config
+    configureUploadArchives project, config
+    configureStageArchives project
+    configureMavenMetadata project
+    applyMavenPublishAuth project
+  }
+
+  private static Config configFor( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    def config = new Config()
+    config.snapshots = releaseSpec.snapshotVersion
+    config.releases = releaseSpec.releaseVersion
+    config.signed = project.findProperty( 'uploadSigned' ) ?: config.releases
+    config.releaseSpec = project.findProperty( 'uploadReleaseSpec' ) ?: config.releases
+    config.wagon = project.findProperty( 'uploadWagon' ) ?: WAGON_HTTP
+    config.repositoryName = project.findProperty( 'uploadRepositoryName' ) ?:
+                            config.releases ? RELEASES_REPOSITORY_NAME : SNAPSHOTS_REPOSITORY_NAME
+    config.repositoryUrl = project.findProperty( 'uploadRepository' ) ?:
+                           config.releases ? RELEASES_REPOSITORY_URL : SNAPSHOTS_REPOSITORY_URL
+    config.username = project.findProperty( 'uploadUsername' )
+    config.password = project.findProperty( 'uploadPassword' )
+    return config
+  }
+
+  private static void applyWagonConfiguration( Project project, Config config )
+  {
+    project.configurations.create( 'deployersJars' )
+    project.dependencies.add( 'deployersJars', config.wagon )
+  }
+
+  private static void configureSigning( Project project, Config config )
+  {
+    project.plugins.apply 'signing'
+    def signing = project.extensions.getByType SigningExtension
+    signing.required = config.signed
+    signing.sign project.configurations.getByName( 'archives' )
+    def signArchives = project.tasks.getByName( 'signArchives' ) as Sign
+    signArchives.onlyIf { !project.findProperty( 'skipSigning' ) }
+  }
+
+  private static void configureUploadArchives( Project project, Config config )
+  {
+    project.plugins.apply 'maven'
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    def uploadArchives = project.tasks.getByName( 'uploadArchives' ) as Upload
+    uploadArchives.doFirst {
+      if( !config.snapshots && !config.releases )
+      {
+        throw new GradleException( "'version' must be given as a system property to perform a release." )
+      }
+    }
+    uploadArchives.onlyIf {
+      def notSkipped = !project.hasProperty( 'skipUpload' )
+      def approvedProject = releaseSpec.publishedProjects.contains project
+      return notSkipped && ( !config.releaseSpec || ( approvedProject || project == project.rootProject ) )
+    }
+    uploadArchives.dependsOn project.tasks.getByName( 'check' )
+    def mavenDeployer = getMavenDeployer uploadArchives
+    if( config.signed )
+    {
+      mavenDeployer.beforeDeployment { MavenDeployment deployment ->
+        project.extensions.getByType( SigningExtension ).signPom deployment
+      }
+    }
+    mavenDeployer.configuration = project.configurations.getByName( 'deployersJars' )
+    def repository = new MavenRemoteRepository()
+    repository.id = config.repositoryName
+    repository.url = config.repositoryUrl
+    if( config.username )
+    {
+      repository.authentication.userName = config.username
+      repository.authentication.password = config.password
+    }
+    if( config.releases )
+    {
+      mavenDeployer.repository = repository
+    }
+    else
+    {
+      mavenDeployer.snapshotRepository = repository
+    }
+  }
+
+  private static void configureStageArchives( Project project )
+  {
+    def stageConfiguration = project.configurations.create 'stageArchives'
+    stageConfiguration.extendsFrom project.configurations.getByName( 'archives' )
+
+    def stageTask = project.tasks.getByName( 'uploadStageArchives' ) as Upload
+    stageTask.uploadDescriptor = true
+    def mavenDeployer = getMavenDeployer stageTask
+    def repository = new MavenRemoteRepository()
+    repository.id = 'stageArchives'
+    repository.url = "file://${ project.buildDir.absolutePath }/stage/archives"
+    mavenDeployer.repository = repository
+    mavenDeployer.snapshotRepository = repository
+  }
+
+  private static void configureMavenMetadata( Project project )
+  {
+    project.tasks.withType( Upload ) { Upload task ->
+      def mavenDeployer = task.repositories.findByName( 'mavenDeployer' ) as MavenDeployer
+      if( mavenDeployer )
+      {
+        MavenMetadata.applyTo mavenDeployer
+      }
+    }
+  }
+
+  private static void applyMavenPublishAuth( final Project project )
+  {
+    // Bug in maven-publish-auth require apply after uploadArchives setup
+    project.plugins.apply 'maven-publish-auth'
+  }
+
+  private static BaseMavenDeployer getMavenDeployer( Upload uploadTask )
+  {
+    // TODO Remove use of Gradle internals
+    // DslObject to get the Upload task convention
+    // MavenRepositoryHandlerConvention & BaseMavenDeployer to configure Wagon, Authentication and Signing
+    def repositoriesConvention = new DslObject( uploadTask.repositories )
+      .getConvention()
+      .getPlugin( MavenRepositoryHandlerConvention )
+    return repositoriesConvention.mavenDeployer() as BaseMavenDeployer
+  }
+}


[14/19] zest-java git commit: build: detangle buildSrc

Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseApprovedProjectsTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseApprovedProjectsTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseApprovedProjectsTask.groovy
new file mode 100644
index 0000000..e95e405
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseApprovedProjectsTask.groovy
@@ -0,0 +1,62 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.release
+
+import groovy.json.JsonBuilder
+import groovy.transform.CompileStatic
+import org.gradle.api.DefaultTask
+import org.gradle.api.file.FileCollection
+import org.gradle.api.tasks.InputFiles
+import org.gradle.api.tasks.OutputFile
+import org.gradle.api.tasks.TaskAction
+
+/**
+ * Write paths of release approved projects to a JSON file.
+ *
+ * This task sole purpose is proper up-do-date behaviour when changing {@literal dev-status.xml} files.
+ */
+@CompileStatic
+class ReleaseApprovedProjectsTask extends DefaultTask
+{
+  ReleaseApprovedProjectsTask()
+  {
+    description = 'Apply release specification to projects in the build'
+  }
+
+  @InputFiles
+  FileCollection getDevStatusFiles()
+  {
+    return project.files( project.allprojects
+                                 .collect( { project -> project.file( 'dev-status.xml' ) } )
+                                 .findAll( { it.exists() } ) )
+  }
+
+  @OutputFile
+  File getJsonApprovedProjects()
+  {
+    return new File( new File( project.buildDir, 'release' ), 'approved-projects.json' )
+  }
+
+  @TaskAction
+  void approveProjects()
+  {
+    def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
+    jsonApprovedProjects.parentFile.mkdirs()
+    jsonApprovedProjects.text = new JsonBuilder( releaseSpec.approvedProjects.collect( { it.path } ) ).toPrettyString()
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleasePlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleasePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleasePlugin.groovy
new file mode 100644
index 0000000..b36a967
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleasePlugin.groovy
@@ -0,0 +1,277 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.release
+
+import groovy.transform.CompileStatic
+import org.apache.http.client.methods.CloseableHttpResponse
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.entity.ContentType
+import org.apache.http.entity.mime.MultipartEntityBuilder
+import org.apache.http.impl.client.CloseableHttpClient
+import org.apache.http.impl.client.HttpClients
+import org.apache.polygene.gradle.BasePlugin
+import org.apache.polygene.gradle.TaskGroups
+import org.apache.polygene.gradle.structure.distributions.DistributionsPlugin
+import org.apache.polygene.gradle.structure.manual.ManualPlugin
+import org.apache.polygene.gradle.structure.reports.ReportsPlugin
+import org.gradle.api.GradleException
+import org.gradle.api.InvalidUserDataException
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.Task
+import org.gradle.api.execution.TaskExecutionGraph
+import org.gradle.api.file.CopySpec
+import org.gradle.api.tasks.Copy
+import org.gradle.api.tasks.bundling.Zip
+import org.gradle.language.base.plugins.LifecycleBasePlugin
+
+@CompileStatic
+class ReleasePlugin implements Plugin<Project>
+{
+  static class TaskNames
+  {
+    static final String RELEASE_ASF = 'releaseAsf'
+    static final String PUBLISH_ASF_MAVEN = 'publishAsfMavenArtifacts'
+    private static final String PREPARE_ASF_MAVEN = 'prepareAsfMavenBundle'
+    private static final String UPLOAD_ASF_MAVEN = 'uploadAsfMavenBundle'
+    private static final String CLOSE_ASF_MAVEN = 'closeAsfMavenRepository'
+    private static final String CHECK_ASF_MAVEN = 'checkAsfMavenArtifacts'
+    private static final String PROMOTE_ASF_MAVEN = 'promoteAsfMavenRepository'
+    static final String PUBLISH_ASF_DIST = 'publishAsfDistributions'
+    private static final String CHECKOUT_ASF_DIST = 'checkoutAsfDistributions'
+    private static final String COPY_ASF_DIST = 'copyAsfDistributions'
+    private static final String COMMIT_ASF_DIST = 'commitAsfDistributions'
+    static final String PUBLISH_ASF_DOC = 'publishAsfDocumentation'
+    private static final String CHECKOUT_ASF_DOC = 'checkoutAsfDocumentation'
+    private static final String COPY_ASF_DOC = 'copyAsfDocumentation'
+    private static final String COPY_ASF_DOC_LATEST = 'copyAsfDocumentationAsLatest'
+    private static final String COMMIT_ASF_DOC = 'commitAsfDocumentation'
+  }
+
+  @Override
+  void apply( final Project project )
+  {
+    project.plugins.apply BasePlugin
+    project.gradle.taskGraph.whenReady { TaskExecutionGraph taskGraph ->
+      def check = taskGraph.allTasks.any { task -> task.name.contains( 'Asf' ) }
+      if( check )
+      {
+        checkAsfPreconditions( project )
+      }
+    }
+    applyAsfRelease project
+  }
+
+  static void checkAsfPreconditions( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    if( releaseSpec.developmentVersion )
+    {
+      throw new InvalidUserDataException(
+        'Development version is unreleasable, please clean and retry with a -Dversion=' )
+    }
+    def polygeneWeb = new File( project.rootProject.projectDir.parentFile, 'polygene-web' )
+    if( !polygeneWeb.exists() )
+    {
+      throw new InvalidUserDataException(
+        'To perform ASF releases you need to checkout the SVN web site directory under ../polygene-web' )
+    }
+    def polygeneDist = new File( project.rootProject.projectDir.parentFile, 'polygene-dist' )
+    if( !polygeneDist.exists() )
+    {
+      throw new InvalidUserDataException(
+        'To perform ASF releases you need to checkout the SVN dist directory under ../polygene-dist' )
+    }
+    // TODO Check Nexus credentials availability
+    // TODO Check svn command line availability
+  }
+
+  static void applyAsfRelease( Project project )
+  {
+    Task releaseTask = project.tasks.create( TaskNames.RELEASE_ASF ) { Task task ->
+      task.group = TaskGroups.RELEASE
+      task.description = 'Rolls out an Apache Software Foundation release.'
+    }
+    def subTasks = [
+      applyPublishAsfMavenArtifacts( project ),
+      applyPublishAsfDistributions( project ),
+      applyPublishAsfDocumentation( project )
+    ]
+    // Two upload strategies for now
+    if( project.findProperty( 'useMavenBundle' ) )
+    {
+      // Use maven artifact bundle
+      releaseTask.dependsOn subTasks
+    }
+    else
+    {
+      // Use :**:uploadArchives for now
+      // TODO Remove this once the bundle strategy is done
+      def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+      releaseSpec.publishedProjects.each { p ->
+        releaseTask.dependsOn "${ p.path }:uploadArchives"
+      }
+      releaseTask.dependsOn subTasks.drop( 1 )
+    }
+  }
+
+  static Task applyPublishAsfMavenArtifacts( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    def distributions = project.rootProject.project ':distributions'
+    def prepare = project.tasks.create( TaskNames.PREPARE_ASF_MAVEN, Zip ) { Zip task ->
+      // TODO Consume distributions through configurations
+      task.dependsOn "${ distributions.path }:${ DistributionsPlugin.TaskNames.STAGE_MAVEN_BINARIES }"
+      task.from "${ distributions.buildDir }/stage/maven-binaries"
+      task.into '.'
+      task.destinationDir = project.file( "$project.buildDir/asf/maven" )
+      task.baseName = "apache-polygene-${ project.version }-maven-artifacts"
+      task.exclude '**/maven-metadata*.*'
+    }
+    def upload = project.tasks.create( TaskNames.UPLOAD_ASF_MAVEN ) { Task task ->
+      task.dependsOn prepare
+      // ASF Nexus instance is a Nexus Pro so has the Unpack Plugin that allow uploading
+      // artifacts "en masse" as a ZIP file
+      // TODO Ensure that we have the 'Unpack' privilege in ASF Nexus
+      // Looks like we can upload 'Artifact Bundles' using Nexus UI
+      task.doLast {
+        def uploadUrl = releaseSpec.releaseVersion ?
+                        'https://repository.apache.org/service/local/staging/deploy/maven2' :
+                        'https://repository.apache.org/content/repositories/snapshots'
+        CloseableHttpClient httpClient = HttpClients.createDefault()
+        try
+        {
+          // TODO Add Nexus Authentication
+          HttpPost post = new HttpPost( "$uploadUrl/content-compressed" )
+          MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+          builder.addBinaryBody( 'fieldname',
+                                 prepare.archivePath,
+                                 ContentType.APPLICATION_OCTET_STREAM,
+                                 prepare.archivePath.getName() )
+          post.setEntity( builder.build() )
+          CloseableHttpResponse response = httpClient.execute( post )
+          if( response.statusLine.statusCode != 200 )
+          {
+            throw new GradleException( "Unable to upload maven artifacts to ASF Nexus, got ${ response.statusLine }" )
+          }
+        }
+        finally
+        {
+          httpClient.close()
+        }
+      }
+    }
+    def close = project.tasks.create( TaskNames.CLOSE_ASF_MAVEN ) { Task task ->
+      task.mustRunAfter upload
+      // TODO Close Nexus repository
+      task.enabled = false
+    }
+    def check = project.tasks.create( TaskNames.CHECK_ASF_MAVEN ) { Task task ->
+      task.mustRunAfter close
+      // TODO Run tests against binaries from Nexus staged repository
+      task.enabled = false
+    }
+    def promote = project.tasks.create( TaskNames.PROMOTE_ASF_MAVEN ) { Task task ->
+      task.mustRunAfter check
+      // TODO Promote Nexus repository
+      task.enabled = false
+    }
+    def publish = project.tasks.create( TaskNames.PUBLISH_ASF_MAVEN ) { Task task ->
+      task.group = TaskGroups.RELEASE
+      task.description = 'Publishes maven artifacts to ASF Nexus.'
+      task.dependsOn upload, close, check, promote
+    }
+    return publish
+  }
+
+  static Task applyPublishAsfDistributions( Project project )
+  {
+    def distributions = project.rootProject.project ':distributions'
+    def checkout = project.tasks.create( TaskNames.CHECKOUT_ASF_DIST ) { Task task ->
+      // TODO SVN checkout ASF distribution directory
+      task.enabled = false
+    }
+    def copy = project.tasks.create( TaskNames.COPY_ASF_DIST, Copy ) { Copy task ->
+      task.mustRunAfter checkout
+      // TODO Consume distributions through configurations
+      task.dependsOn "${ distributions.path }:${ LifecycleBasePlugin.ASSEMBLE_TASK_NAME }"
+      task.from new File( distributions.buildDir, 'distributions' )
+      task.into new File( project.rootProject.projectDir.parentFile, 'polygene-dist' )
+    }
+    def commit = project.tasks.create( TaskNames.COMMIT_ASF_DIST ) { Task task ->
+      task.mustRunAfter copy
+      // TODO SVN commit ASF distribution directory
+      task.enabled = false
+    }
+    def publish = project.tasks.create( TaskNames.PUBLISH_ASF_DIST ) { Task task ->
+      task.group = TaskGroups.RELEASE
+      task.description = 'Publishes distributions to ASF SVN.'
+      task.dependsOn checkout, copy, commit
+    }
+    // TODO SVN Upload DISTRIBUTIONS using svn command line so credentials are handled outside of the build
+    return publish
+  }
+
+  static Task applyPublishAsfDocumentation( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    def manual = project.rootProject.project ':manual'
+    def reports = project.rootProject.project ':reports'
+    def checkout = project.tasks.create( TaskNames.CHECKOUT_ASF_DOC ) { Task task ->
+      // TODO SVN checkout ASF distribution directory
+      task.enabled = false
+    }
+    def copy = project.tasks.create( TaskNames.COPY_ASF_DOC, Copy ) { Copy task ->
+      task.mustRunAfter checkout
+      // TODO Consume documentation and reports through configurations
+      task.dependsOn "${ manual.path }:${ ManualPlugin.TaskNames.WEBSITE }"
+      task.dependsOn "${ reports.path }:${ ReportsPlugin.TaskNames.JAVADOCS }"
+      def webRoot = new File( project.rootProject.projectDir.parentFile, 'polygene-web' )
+      def dirName = releaseSpec.releaseVersion ? project.version : 'develop'
+      task.destinationDir = webRoot
+      task.from( new File( manual.buildDir, 'docs/website' ) ) { CopySpec spec ->
+        spec.into "site/content/java/$dirName"
+      }
+      task.from( new File( reports.buildDir, 'docs/javadocs' ) ) { CopySpec spec ->
+        spec.into "site/content/java/$dirName/javadocs"
+      }
+    }
+    project.tasks.create( TaskNames.COPY_ASF_DOC_LATEST, Copy ) { Copy task ->
+      def webRoot = new File( project.rootProject.projectDir.parentFile, 'polygene-web' )
+      task.from new File( webRoot, "site/content/java/$project.version" )
+      task.into new File( webRoot, "site/content/java/latest" )
+      task.doFirst {
+        if( !releaseSpec.releaseVersion )
+        {
+          throw new InvalidUserDataException( 'Development version cannot be `latest`.' )
+        }
+      }
+    }
+    def commit = project.tasks.create( TaskNames.COMMIT_ASF_DOC ) { Task task ->
+      task.mustRunAfter copy
+      // TODO SVN commit ASF documentation directory
+      task.enabled = false
+    }
+    def publish = project.tasks.create( TaskNames.PUBLISH_ASF_DOC ) { Task task ->
+      task.group = TaskGroups.RELEASE
+      task.description = 'Publishes documentation to ASF HTTP.'
+      task.dependsOn checkout, copy, commit
+    }
+    return publish
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecExtension.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecExtension.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecExtension.groovy
new file mode 100644
index 0000000..5051400
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecExtension.groovy
@@ -0,0 +1,64 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.release
+
+import groovy.transform.CompileStatic
+import org.gradle.api.Project
+
+/**
+ * Provide release approved projects.
+ *
+ * There's no up-to-date checking on Gradle extensions.
+ * Depend on {@link ReleaseApprovedProjectsTask} to get a good up-to-date behavior.
+ */
+@CompileStatic
+class ReleaseSpecExtension
+{
+  static final String NAME = 'releaseSpec'
+
+  private final Project project
+
+  final Set<Project> approvedProjects
+  final Set<Project> unapprovedProjects
+  final Set<Project> publishedProjects
+
+  ReleaseSpecExtension( Project project )
+  {
+    this.project = project
+    def spec = new ModuleReleaseSpec()
+    def candidateProjects = project.allprojects.findAll { p -> p.file( 'dev-status.xml' ).exists() }
+    approvedProjects = candidateProjects.findAll { p -> spec.satisfiedBy p }
+    unapprovedProjects = candidateProjects.minus approvedProjects
+    publishedProjects = releaseVersion ? approvedProjects : candidateProjects
+  }
+
+  boolean isDevelopmentVersion()
+  {
+    return project.version == '0'
+  }
+
+  boolean isSnapshotVersion()
+  {
+    return project.version.toString().contains( 'SNAPSHOT' )
+  }
+
+  boolean isReleaseVersion()
+  {
+    return !snapshotVersion && !developmentVersion
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecPlugin.groovy
new file mode 100644
index 0000000..fd2d35a
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecPlugin.groovy
@@ -0,0 +1,63 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.release
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.TaskGroups
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.Task
+
+@CompileStatic
+class ReleaseSpecPlugin implements Plugin<Project>
+{
+  static class TaskNames
+  {
+    static final String RELEASE_APPROVED_PROJECTS = 'releaseSpecApprovedProjects'
+    static final String REPORT_RELEASE_SPEC = 'reportReleaseSpec'
+    static final String CHECK_RELEASE_SPEC = 'checkReleaseSpec'
+  }
+
+  @Override
+  void apply( final Project project )
+  {
+    applyReleaseSpecExtension project
+    if( project == project.rootProject )
+    {
+      configureReleaseSpecTasks project
+    }
+  }
+
+  private static void applyReleaseSpecExtension( Project project )
+  {
+    project.extensions.create( ReleaseSpecExtension.NAME, ReleaseSpecExtension, project.rootProject )
+  }
+
+  private static void configureReleaseSpecTasks( Project project )
+  {
+    project.tasks.create( TaskNames.RELEASE_APPROVED_PROJECTS, ReleaseApprovedProjectsTask ) { Task task ->
+      task.group = TaskGroups.RELEASE
+    }
+    project.tasks.create( TaskNames.REPORT_RELEASE_SPEC, ReleaseSpecReportTask ) { Task task ->
+      task.group = TaskGroups.RELEASE
+    }
+    project.tasks.create( TaskNames.CHECK_RELEASE_SPEC, CheckReleaseSpecTask ) { Task task ->
+      task.group = TaskGroups.RELEASE_VERIFICATION
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecReportTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecReportTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecReportTask.groovy
new file mode 100644
index 0000000..3ecd8f5
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/release/ReleaseSpecReportTask.groovy
@@ -0,0 +1,45 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.release
+
+import groovy.transform.CompileStatic
+import org.gradle.api.DefaultTask
+import org.gradle.api.tasks.TaskAction
+
+@CompileStatic
+class ReleaseSpecReportTask extends DefaultTask
+{
+  ReleaseSpecReportTask()
+  {
+    description = 'Report module(s) that do or don\'t fit the release criteria.'
+    dependsOn {
+      project.extensions.getByType( ReleaseSpecExtension ).approvedProjects
+             .collect { each -> each.configurations.getByName( 'runtime' ) }
+    }
+  }
+
+  @TaskAction
+  void report()
+  {
+    def releaseSpec = project.extensions.getByType( ReleaseSpecExtension )
+    println 'Approved Projects'
+    releaseSpec.approvedProjects.each { println "\t${ it.path }" }
+    println 'NOT Approved Projects'
+    releaseSpec.unapprovedProjects.each { println "\t${ it.path }" }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/AggregatedJacocoReportTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/AggregatedJacocoReportTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/AggregatedJacocoReportTask.groovy
new file mode 100644
index 0000000..155853d
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/AggregatedJacocoReportTask.groovy
@@ -0,0 +1,99 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.reports
+
+import groovy.transform.CompileStatic
+import groovy.transform.TypeCheckingMode
+import org.gradle.api.DefaultTask
+import org.gradle.api.Project
+import org.gradle.api.file.FileCollection
+import org.gradle.api.tasks.InputFiles
+import org.gradle.api.tasks.OutputDirectory
+import org.gradle.api.tasks.TaskAction
+
+@CompileStatic
+class AggregatedJacocoReportTask extends DefaultTask
+{
+  public static final String JACOCO_CONFIGURATION = 'jacoco'
+
+  @InputFiles
+  FileCollection getJacocoExecDataDirectories()
+  {
+    return project.files( project.subprojects.collect( { Project p -> "${ p.buildDir.absolutePath }/jacoco" } ) )
+  }
+
+  @OutputDirectory
+  File getOutputDirectory()
+  {
+    return project.file( "$project.buildDir/reports/coverage" )
+  }
+
+  @CompileStatic( TypeCheckingMode.SKIP )
+  @TaskAction
+  void report()
+  {
+    def coveredProjects = project.rootProject.subprojects.findAll { p -> new File( p.buildDir, 'jacoco' ).exists() }
+    def coreProjects = coveredProjects.findAll { p -> p.path.startsWith ':core' }
+    def libProjects = coveredProjects.findAll { p -> p.path.startsWith ':libraries' }
+    def extProjects = coveredProjects.findAll { p -> p.path.startsWith ':extensions' }
+    def toolsProjects = coveredProjects.findAll { p -> p.path.startsWith ':tools' }
+    def tutoProjects = coveredProjects.findAll { p -> p.path.startsWith ':tutorials' }
+    def samplesProjects = coveredProjects.findAll { p -> p.path.startsWith ':samples' }
+    def classpath = project.configurations.getByName( JACOCO_CONFIGURATION ).asPath
+    project.ant {
+      taskdef name: 'jacocoreport', classname: 'org.jacoco.ant.ReportTask', classpath: classpath
+      mkdir dir: outputDirectory
+      jacocoreport {
+        executiondata {
+          coveredProjects.collect { p ->
+            fileset( dir: "${ p.buildDir.path }/jacoco" ) { include name: '*.exec' }
+          }
+        }
+        structure( name: 'Apache Polygene\u2122 (Java Edition) SDK' ) {
+          group( name: 'Core' ) {
+            classfiles { coreProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
+            sourcefiles { coreProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
+          }
+          group( name: 'Libraries' ) {
+            classfiles { libProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
+            sourcefiles { libProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
+          }
+          group( name: 'Extensions' ) {
+            classfiles { extProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
+            sourcefiles { extProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
+          }
+          group( name: 'Tools' ) {
+            classfiles { toolsProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
+            sourcefiles { toolsProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
+          }
+          group( name: 'Tutorials' ) {
+            classfiles { tutoProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
+            sourcefiles { tutoProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
+          }
+          group( name: 'Samples' ) {
+            classfiles { samplesProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
+            sourcefiles { samplesProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
+          }
+        }
+        csv destfile: "${ outputDirectory }/jacoco.csv", encoding: 'UTF-8'
+        xml destfile: "${ outputDirectory }/jacoco.xml", encoding: 'UTF-8'
+        html destdir: outputDirectory, encoding: 'UTF-8', locale: 'en', footer: 'Apache Polygene\u2122 (Java Edition) SDK'
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy
new file mode 100644
index 0000000..0452d04
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/reports/ReportsPlugin.groovy
@@ -0,0 +1,152 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.reports
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.BasePlugin
+import org.apache.polygene.gradle.TaskGroups
+import org.apache.polygene.gradle.code.CodePlugin
+import org.apache.polygene.gradle.code.PublishedCodePlugin
+import org.apache.polygene.gradle.dependencies.DependenciesDeclarationExtension
+import org.apache.polygene.gradle.dependencies.DependenciesPlugin
+import org.apache.polygene.gradle.structure.RootPlugin
+import org.apache.polygene.gradle.structure.release.ReleaseSpecExtension
+import org.apache.polygene.gradle.structure.release.ReleaseSpecPlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.plugins.JavaPlugin
+import org.gradle.api.plugins.JavaPluginConvention
+import org.gradle.api.plugins.ReportingBasePlugin
+import org.gradle.api.tasks.javadoc.Javadoc
+import org.gradle.api.tasks.testing.TestReport
+import org.gradle.external.javadoc.StandardJavadocDocletOptions
+import org.gradle.language.base.plugins.LifecycleBasePlugin
+
+// TODO Expose project output into configurations
+@CompileStatic
+class ReportsPlugin implements Plugin<Project>
+{
+  static class TaskNames
+  {
+    static final String COVERAGE = 'coverage'
+    static final String TEST = 'test'
+    static final String JAVADOCS = 'javadocs'
+  }
+
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply BasePlugin
+    project.plugins.apply org.gradle.api.plugins.BasePlugin
+    project.plugins.apply ReportingBasePlugin
+    project.plugins.apply DependenciesPlugin
+    applyTest project
+    applyCoverage project
+    applyJavadocs project
+    PublishedCodePlugin.configureJavadoc project
+  }
+
+  private static void applyTest( Project project )
+  {
+    def task = project.tasks.create( TaskNames.TEST, TestReport ) { TestReport task ->
+      task.group = TaskGroups.VERIFICATION
+      task.description = 'Generates global test report'
+      task.destinationDir = project.file( "$project.buildDir/reports/tests" )
+      task.reportOn {
+        project.rootProject.subprojects
+               .findAll { p -> p.plugins.hasPlugin CodePlugin }
+               .collect { it.tasks.getByName( 'test' ) }
+      }
+    }
+    project.tasks.getByName( LifecycleBasePlugin.CHECK_TASK_NAME ).dependsOn task
+  }
+
+  private static void applyCoverage( Project project )
+  {
+    def dependencies = project.rootProject.extensions.getByType DependenciesDeclarationExtension
+    project.configurations.create AggregatedJacocoReportTask.JACOCO_CONFIGURATION
+    project.dependencies.add AggregatedJacocoReportTask.JACOCO_CONFIGURATION,
+                             "org.jacoco:org.jacoco.ant:${ dependencies.buildToolsVersions.jacoco }"
+    def task = project.tasks.create( TaskNames.COVERAGE, AggregatedJacocoReportTask )
+      { AggregatedJacocoReportTask task ->
+        task.group = TaskGroups.VERIFICATION
+        task.description = 'Generates global coverage report'
+        task.dependsOn {
+          project.rootProject.subprojects
+                 .findAll { p -> p.plugins.hasPlugin CodePlugin }
+                 .collect( { p -> p.tasks.getByName JavaPlugin.TEST_TASK_NAME } )
+        }
+      }
+    project.tasks.getByName( LifecycleBasePlugin.CHECK_TASK_NAME ).dependsOn task
+  }
+
+  private static void applyJavadocs( Project project )
+  {
+    def releaseSpec = project.extensions.getByType ReleaseSpecExtension
+    def javadocsTask = project.tasks.create( TaskNames.JAVADOCS, Javadoc ) { Javadoc task ->
+      task.onlyIf { !releaseSpec.developmentVersion }
+      task.group = TaskGroups.DOCUMENTATION
+      task.description = 'Builds the whole SDK public Javadoc'
+      task.dependsOn { project.rootProject.tasks.getByName ReleaseSpecPlugin.TaskNames.RELEASE_APPROVED_PROJECTS }
+      task.destinationDir = project.file "$project.buildDir/docs/javadocs"
+      def options = task.options as StandardJavadocDocletOptions
+      options.docFilesSubDirs = true
+      options.encoding = 'UTF-8'
+      options.overview = "${ project.projectDir }/src/javadoc/overview.html"
+      task.title = "${ RootPlugin.PROJECT_TITLE } ${ project.version }"
+      options.group( [
+        "Core API"      : [ "org.apache.polygene.api",
+                            "org.apache.polygene.api.*" ],
+        "Core Bootstrap": [ "org.apache.polygene.bootstrap",
+                            "org.apache.polygene.bootstrap.*" ],
+        "Core SPI"      : [ "org.apache.polygene.spi",
+                            "org.apache.polygene.spi.*" ],
+        "Libraries"     : [ "org.apache.polygene.library.*" ],
+        "Extensions"    : [ "org.apache.polygene.valueserialization.*",
+                            "org.apache.polygene.entitystore.*",
+                            "org.apache.polygene.index.*",
+                            "org.apache.polygene.metrics.*",
+                            "org.apache.polygene.cache.*",
+                            "org.apache.polygene.migration",
+                            "org.apache.polygene.migration.*" ],
+        "Tools"         : [ "org.apache.polygene.tools.*",
+                            "org.apache.polygene.envisage",
+                            "org.apache.polygene.envisage.*" ],
+        "Test Support"  : [ "org.apache.polygene.test",
+                            "org.apache.polygene.test.*" ]
+      ] )
+    }
+    project.tasks.getByName( LifecycleBasePlugin.CHECK_TASK_NAME ).dependsOn javadocsTask
+    project.tasks.withType( Javadoc ) { Javadoc task ->
+      def apiSources = releaseSpec.publishedProjects.findAll { approved ->
+        ( approved.path.startsWith( ':core' ) && !approved.path.startsWith( ':core:runtime' ) ) ||
+        approved.path.startsWith( ':libraries' ) ||
+        approved.path.startsWith( ':extensions' ) ||
+        approved.path.startsWith( ':tools' )
+      }
+      apiSources.each { Project apiProject ->
+        apiProject.afterEvaluate { Project evaluatedApiProject ->
+          def mainSourceSet = evaluatedApiProject.convention.getPlugin( JavaPluginConvention )
+                                                 .sourceSets.getByName( 'main' )
+          task.source mainSourceSet.allJava
+          task.classpath += mainSourceSet.compileClasspath
+        }
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/samples/SamplePlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/samples/SamplePlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/samples/SamplePlugin.groovy
new file mode 100644
index 0000000..6970463
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/samples/SamplePlugin.groovy
@@ -0,0 +1,33 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.samples
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.code.CodePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+@CompileStatic
+class SamplePlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply CodePlugin
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/PerformanceTestsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/PerformanceTestsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/PerformanceTestsPlugin.groovy
new file mode 100644
index 0000000..a1890d8
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/PerformanceTestsPlugin.groovy
@@ -0,0 +1,62 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.tests
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.TaskGroups
+import org.gradle.api.Action
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.plugins.JavaPluginConvention
+import org.gradle.api.tasks.bundling.Jar
+import org.gradle.api.tasks.testing.Test
+import org.gradle.language.base.plugins.LifecycleBasePlugin
+
+// TODO Add profiling tasks (jfr or honest? flamegraphs?)
+// TODO Add simple regression assertions, how? testing against a previous version?
+@CompileStatic
+class PerformanceTestsPlugin implements Plugin<Project>
+{
+  static class TaskNames
+  {
+    static final String PERFORMANCE_TEST = 'performanceTest'
+    static final String PERFORMANCE_PROFILE = 'performanceProfile'
+    static final String PERFORMANCE_CHECK = 'performanceCheck'
+  }
+
+  @Override
+  void apply( final Project project )
+  {
+    def sourceSets = project.convention.getPlugin( JavaPluginConvention ).sourceSets
+    sourceSets.create 'perf'
+    project.dependencies.add 'perfCompile', sourceSets.getByName( 'main' ).output
+    project.dependencies.add 'perfCompile', sourceSets.getByName( 'test' ).output
+    project.dependencies.add 'perfCompile', project.configurations.getByName( 'testCompile' )
+    project.dependencies.add 'perfRuntime', project.configurations.getByName( 'testRuntime' )
+    project.tasks.getByName( LifecycleBasePlugin.CHECK_TASK_NAME ).dependsOn 'compilePerfJava'
+    project.tasks.create( TaskNames.PERFORMANCE_TEST, Test, { Test task ->
+      task.group = TaskGroups.PERFORMANCE
+      task.description = 'Runs performance tests.'
+      task.maxParallelForks = 1
+      task.forkEvery = 1L
+      task.testClassesDir = sourceSets.getByName( 'perf' ).output.classesDir
+      task.classpath = sourceSets.getByName( 'perf' ).runtimeClasspath
+      task.systemProperty 'jar.path', ( project.tasks.getByName( 'jar' ) as Jar ).archivePath
+    } as Action<Test> )
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/TestPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/TestPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/TestPlugin.groovy
new file mode 100644
index 0000000..5f91dfe
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tests/TestPlugin.groovy
@@ -0,0 +1,33 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.tests
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.code.CodePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+@CompileStatic
+class TestPlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply CodePlugin
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tools/ToolPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tools/ToolPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tools/ToolPlugin.groovy
new file mode 100644
index 0000000..a57a129
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tools/ToolPlugin.groovy
@@ -0,0 +1,31 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.tools
+
+import org.apache.polygene.gradle.code.PublishedCodePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+class ToolPlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply PublishedCodePlugin
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tutorials/TutorialPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tutorials/TutorialPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tutorials/TutorialPlugin.groovy
new file mode 100644
index 0000000..a831fd8
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/tutorials/TutorialPlugin.groovy
@@ -0,0 +1,33 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.structure.tutorials
+
+import groovy.transform.CompileStatic
+import org.apache.polygene.gradle.code.CodePlugin
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+@CompileStatic
+class TutorialPlugin implements Plugin<Project>
+{
+  @Override
+  void apply( Project project )
+  {
+    project.plugins.apply CodePlugin
+  }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/tasks/ExecLogged.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/tasks/ExecLogged.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/tasks/ExecLogged.groovy
index 01b4e71..b3ba57d 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/tasks/ExecLogged.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/tasks/ExecLogged.groovy
@@ -18,6 +18,8 @@
 package org.apache.polygene.gradle.tasks
 
 import groovy.transform.CompileStatic
+import java.nio.file.Files
+import java.util.function.BiConsumer
 import org.gradle.api.Action
 import org.gradle.api.GradleException
 import org.gradle.api.Project
@@ -27,14 +29,19 @@ import org.gradle.api.tasks.TaskAction
 import org.gradle.internal.logging.ConsoleRenderer
 import org.gradle.process.ExecSpec
 
+/**
+ * Execute command and log standard output and error to files.
+ *
+ * See the {@literal stdoutFile} and {@literal stderrFile} properties.
+ */
 @CompileStatic
 class ExecLogged extends AbstractExecTask<ExecLogged>
 {
   @OutputFile
-  File stdoutFile = project.file( "$project.buildDir/tmp/${ getName() }/stdout.log" )
+  File stdoutFile = project.file "$project.buildDir/log/${ getName() }/${ getName() }-stdout.log"
 
   @OutputFile
-  File stderrFile = project.file( "$project.buildDir/tmp/${ getName() }/stderr.log" )
+  File stderrFile = project.file "$project.buildDir/log/${ getName() }/${ getName() }-stderr.log"
 
   ExecLogged()
   {
@@ -44,36 +51,51 @@ class ExecLogged extends AbstractExecTask<ExecLogged>
   @TaskAction
   protected void exec()
   {
-    [ stdoutFile, stderrFile ].each { it.parentFile.mkdirs() }
-    def outStream = stdoutFile.newOutputStream()
-    def errStream = stderrFile.newOutputStream()
-    try
-    {
+    doExecLogged stdoutFile, stderrFile, { OutputStream outStream, OutputStream errStream ->
+      standardOutput = outStream
+      errorOutput = errStream
       super.exec()
     }
-    catch( Exception ex )
-    {
-      throw new GradleException( errorMessage( ex, stdoutFile, stderrFile ), ex )
-    }
-    finally
-    {
-      close outStream, errStream
-    }
   }
 
+  /**
+   * Execute command and log standard output and error to files.
+   *
+   * @param project Project reference
+   * @param stdoutFile Standard output log file
+   * @param stderrFile Standard error log file
+   * @param specAction Execution specification
+   */
   static void execLogged( Project project, File stdoutFile, File stderrFile, Action<? super ExecSpec> specAction )
   {
-    [ stdoutFile, stderrFile ].each { it.parentFile.mkdirs() }
-    def outStream = stdoutFile.newOutputStream()
-    def errStream = stderrFile.newOutputStream()
-    try
-    {
+    doExecLogged stdoutFile, stderrFile, { OutputStream outStream, OutputStream errStream ->
       project.exec { ExecSpec spec ->
-        specAction.execute( spec )
         spec.standardOutput = outStream
         spec.errorOutput = errStream
+        specAction.execute spec
       }
     }
+  }
+
+  private static void doExecLogged( File stdoutFile, File stderrFile,
+                                    BiConsumer<OutputStream, OutputStream> exec )
+  {
+    [ stdoutFile, stderrFile ].each { Files.createDirectories( it.parentFile.toPath() ) }
+    def outStream, errStream
+    if( stdoutFile.absolutePath == stderrFile.absolutePath )
+    {
+      outStream = stdoutFile.newOutputStream()
+      errStream = outStream
+    }
+    else
+    {
+      outStream = stdoutFile.newOutputStream()
+      errStream = stderrFile.newOutputStream()
+    }
+    try
+    {
+      exec.accept( outStream, errStream )
+    }
     catch( Exception ex )
     {
       throw new GradleException( errorMessage( ex, stdoutFile, stderrFile ), ex )
@@ -88,8 +110,7 @@ class ExecLogged extends AbstractExecTask<ExecLogged>
     throws IOException
   {
     def errors = [ ] as List<IOException>
-    for( Closeable closeable : closeables )
-    {
+    closeables.each { Closeable closeable ->
       try
       {
         closeable.close()
@@ -101,7 +122,7 @@ class ExecLogged extends AbstractExecTask<ExecLogged>
     }
     if( !errors.empty )
     {
-      def ex = new IOException( 'Failed to close some' )
+      def ex = new IOException( 'Failed to close some stream(s)' )
       errors.each { ex.addSuppressed it }
       throw ex
     }
@@ -109,6 +130,7 @@ class ExecLogged extends AbstractExecTask<ExecLogged>
 
   private static String errorMessage( Exception ex, File stdoutFile, File stderrFile )
   {
+    // TODO Remove use of Gradle internals
     def consoleRenderer = new ConsoleRenderer()
     return "${ ex.message }\n" +
            "\tSTDOUT ${ consoleRenderer.asClickableFileUrl( stdoutFile ) }\n" +

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/test/AggregatedJacocoReportTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/test/AggregatedJacocoReportTask.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/test/AggregatedJacocoReportTask.groovy
deleted file mode 100644
index ca10b80..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/test/AggregatedJacocoReportTask.groovy
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.test
-
-import org.gradle.api.DefaultTask
-import org.gradle.api.Project
-import org.gradle.api.file.FileCollection
-import org.gradle.api.tasks.InputFiles
-import org.gradle.api.tasks.OutputDirectory
-import org.gradle.api.tasks.TaskAction
-
-class AggregatedJacocoReportTask extends DefaultTask
-{
-  @InputFiles
-  FileCollection getJacocoExecDataDirectories()
-  {
-    return project.files( project.subprojects.collect( { Project p -> "${ p.buildDir.path }/jacoco" } ) )
-  }
-
-  @OutputDirectory
-  File getOutputDirectory()
-  {
-    return project.file( "$project.buildDir/reports/coverage" )
-  }
-
-  @TaskAction
-  void report()
-  {
-    def coveredProjects = project.subprojects.findAll { p -> new File( "${ p.buildDir.path }/jacoco" ).exists() }
-    def coreProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.polygene.core' ) }
-    def libProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.polygene.lib' ) }
-    def extProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.polygene.ext' ) }
-    def toolsProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.polygene.tool' ) }
-    def tutoProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.polygene.tuto' ) }
-    def samplesProjects = coveredProjects.findAll { p -> p.name.startsWith( 'org.apache.polygene.sample' ) }
-    def classpath = project.configurations.getByName( 'jacoco' ).asPath
-    project.ant {
-      taskdef name: 'jacocoreport', classname: 'org.jacoco.ant.ReportTask', classpath: classpath
-      mkdir dir: outputDirectory
-      jacocoreport {
-        executiondata {
-          coveredProjects.collect { p -> fileset( dir: "${ p.buildDir.path }/jacoco" ) { include( name: '*.exec' ) } }
-        }
-        structure( name: "Apache Polygene\u2122 (Java Edition) SDK" ) {
-          group( name: "Core" ) {
-            classfiles { coreProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
-            sourcefiles { coreProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
-          }
-          group( name: "Libraries" ) {
-            classfiles { libProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
-            sourcefiles { libProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
-          }
-          group( name: "Extensions" ) {
-            classfiles { extProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
-            sourcefiles { extProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
-          }
-          group( name: "Tools" ) {
-            classfiles { toolsProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
-            sourcefiles { toolsProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
-          }
-          group( name: "Tutorials" ) {
-            classfiles { tutoProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
-            sourcefiles { tutoProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
-          }
-          group( name: "Samples" ) {
-            classfiles { samplesProjects.collect { p -> fileset dir: "${ p.buildDir.path }/classes/main" } }
-            sourcefiles { samplesProjects.collect { p -> fileset dir: "${ p.projectDir.path }/src/main/java" } }
-          }
-        }
-        csv destfile: "${ outputDirectory }/jacoco.csv", encoding: "UTF-8"
-        xml destfile: "${ outputDirectory }/jacoco.xml", encoding: "UTF-8"
-        html destdir: outputDirectory, encoding: "UTF-8", locale: "en", footer: "Apache Polygene\u2122 (Java Edition) SDK"
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/util/Environment.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/util/Environment.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/util/Environment.groovy
new file mode 100644
index 0000000..1362821
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/util/Environment.groovy
@@ -0,0 +1,30 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.util
+
+class Environment
+{
+  static boolean isExecutableInPath( String executable )
+  {
+    def pathDirs = System.getenv( 'PATH' ).split( File.pathSeparator )
+    def flattened = pathDirs.collect( { String pathDir -> new File( pathDir, 'executable' ) } ).flatten() as List<File>
+    return flattened.find( { File pathDir -> pathDir.isFile() } ) != null
+  }
+
+  private Environment() {}
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/util/Licensing.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/util/Licensing.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/util/Licensing.groovy
new file mode 100644
index 0000000..319ea20
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/util/Licensing.groovy
@@ -0,0 +1,49 @@
+/*
+ *  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.
+ */
+package org.apache.polygene.gradle.util
+
+class Licensing
+{
+  static String withLicenseHeader( String base, String flavour )
+  {
+    def header
+    switch( flavour )
+    {
+      case 'java': case 'groovy': case 'js':
+        header = licenseHeader_wrap( base, '/*', ' * ', ' */' ); break
+      case 'xml': case 'html':
+        header = licenseHeader_wrap( base, '<!--', '  ', '-->' ); break
+      case 'txt': case 'shell': case 'python': case 'ruby':
+        header = licenseHeader_wrap( base, null, '# ', null ); break
+      case 'adoc': case 'asciidoc':
+        header = licenseHeader_wrap( base, null, '// ', null ); break
+      default:
+        header = base
+    }
+    header
+  }
+
+  private static String licenseHeader_wrap( String base, String top, String left, String bottom )
+  {
+    ( top ? "$top\n" : '' ) +
+    base.readLines().collect { "${ left }${ it }" }.join( '\n' ) + '\n' +
+    ( bottom ? "$bottom\n" : '' )
+  }
+
+  private Licensing() {}
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/groovy/org/apache/polygene/gradle/version/VersionClassPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/version/VersionClassPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/version/VersionClassPlugin.groovy
deleted file mode 100644
index 2a99206..0000000
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/version/VersionClassPlugin.groovy
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *  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.
- */
-package org.apache.polygene.gradle.version
-
-import groovy.transform.CompileStatic
-import org.gradle.api.Project
-import org.gradle.api.Plugin
-import org.gradle.api.Task
-import org.gradle.api.file.SourceDirectorySet
-import org.gradle.api.plugins.JavaPlugin
-import org.gradle.api.plugins.JavaPluginConvention
-import org.gradle.api.tasks.SourceSet
-import org.gradle.api.tasks.bundling.Jar
-
-// TODO:release:perf Placeholder for date for dev versions
-// TODO:release:perf Add git data, placeholders for dev versions
-@CompileStatic
-class VersionClassPlugin implements Plugin<Project>
-{
-  def void apply( Project project )
-  {
-    project.getPlugins().apply( JavaPlugin.class )
-    def genSrc = 'generated-src/version'
-    def generatedSrcDir = new File( project.buildDir, genSrc )
-
-    Task makeVersionClassTask = project.task( 'makeVersionClass' )
-    makeVersionClassTask.doLast {
-      def now = new Date()
-      def tmpGroup = project.name
-      if( tmpGroup.startsWith( "org.apache.polygene.core" ) )
-      {
-        tmpGroup = tmpGroup - ".core"
-      }
-      tmpGroup = tmpGroup.replace( '-', '_' )
-      def outFilename = "java/" + tmpGroup.replace( '.', '/' ) + "/BuildVersion.java"
-      def outFile = new File( generatedSrcDir, outFilename )
-      outFile.getParentFile().mkdirs()
-      def f = new FileWriter( outFile )
-      f.write( 'package ' + tmpGroup + ';\n' )
-      f.write( """
-/**
- * Simple class for storing the version derived from the build system.
- *
- */
-public interface BuildVersion
-{
-    /** The version of the project from the gradle build.gradle file. */
-    String VERSION = \"""" + project.version + """\";
-
-    /** The name of the project from the gradle build.gradle file. */
-    String NAME = \"""" + project.name + """\";
-
-    /** The group of the project from the gradle build.gradle file. */
-    String GROUP = \"""" + project.group + """\";
-
-    /** The date this file was generated, usually the last date that the project was modified. */
-    String DATE = \"""" + now + """\";
-
-    /** The full details of the version, including the build date. */
-    String DETAILED_VERSION = GROUP + ":" + NAME + ":" + VERSION + " " + DATE;
-}\n
-""" )
-      f.close()
-    }
-    def sourceSets = project.convention.getPlugin( JavaPluginConvention ).sourceSets
-    sourceSets.create( "version" ) { SourceSet sourceSet ->
-      sourceSet.java { SourceDirectorySet dirSet ->
-        dirSet.srcDir project.buildDir.name + '/' + genSrc + '/java'
-      }
-    }
-    makeVersionClassTask.getInputs().files( sourceSets.getByName( 'main' ).allSource )
-    makeVersionClassTask.getOutputs().file( generatedSrcDir )
-    if( project.getBuildFile() != null && project.getBuildFile().exists() )
-    {
-      makeVersionClassTask.getInputs().files( project.getBuildFile() )
-    }
-    project.getTasks().getByName( 'compileJava' ).dependsOn( 'compileVersionJava' )
-    project.getTasks().getByName( 'compileVersionJava' ).dependsOn( 'makeVersionClass' )
-    project.getTasks().getByName( 'jar' ) { Jar task ->
-      task.from sourceSets.getByName( 'version' ).output
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-core.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-core.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-core.properties
new file mode 100644
index 0000000..d6a8da2
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-core.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.core.CorePlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-dependencies-declaration.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-dependencies-declaration.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-dependencies-declaration.properties
new file mode 100644
index 0000000..eb710e6
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-dependencies-declaration.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.dependencies.DependenciesDeclarationPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-distributions.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-distributions.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-distributions.properties
new file mode 100644
index 0000000..143746f
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-distributions.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.distributions.DistributionsPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-extension.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-extension.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-extension.properties
new file mode 100644
index 0000000..449ac1a
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-extension.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.extensions.ExtensionPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-internal.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-internal.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-internal.properties
new file mode 100644
index 0000000..2749ce9
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-internal.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.internals.InternalPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-library.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-library.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-library.properties
new file mode 100644
index 0000000..da861fc
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-library.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.libraries.LibraryPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-manual.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-manual.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-manual.properties
new file mode 100644
index 0000000..7e53bce
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-manual.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.manual.ManualPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-release.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-release.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-release.properties
new file mode 100644
index 0000000..a3db27b
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-release.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.release.ReleasePlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-reports.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-reports.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-reports.properties
new file mode 100644
index 0000000..a6371c9
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-reports.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.reports.ReportsPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-root.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-root.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-root.properties
new file mode 100644
index 0000000..a4fd101
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-root.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.RootPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-sample.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-sample.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-sample.properties
new file mode 100644
index 0000000..ab50e44
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-sample.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.samples.SamplePlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-settings.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-settings.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-settings.properties
new file mode 100644
index 0000000..d1714ba
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-settings.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.SettingsPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-test.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-test.properties
new file mode 100644
index 0000000..eb5bada
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-test.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.tests.TestPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-tool.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-tool.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-tool.properties
new file mode 100644
index 0000000..1457955
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-tool.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.tools.ToolPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-tutorial.properties
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-tutorial.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-tutorial.properties
new file mode 100644
index 0000000..00780ce
--- /dev/null
+++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/polygene-tutorial.properties
@@ -0,0 +1,18 @@
+#
+#  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.
+#
+implementation-class=org.apache.polygene.gradle.structure.tutorials.TutorialPlugin

http://git-wip-us.apache.org/repos/asf/zest-java/blob/de73010f/buildSrc/src/test/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpecTest.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/test/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpecTest.groovy b/buildSrc/src/test/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpecTest.groovy
index 6ca353d..203d79b 100644
--- a/buildSrc/src/test/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpecTest.groovy
+++ b/buildSrc/src/test/groovy/org/apache/polygene/gradle/release/ModuleReleaseSpecTest.groovy
@@ -17,6 +17,7 @@
  */
 package org.apache.polygene.gradle.release
 
+import org.apache.polygene.gradle.structure.release.ModuleReleaseSpec
 import spock.lang.Specification
 import spock.lang.Unroll
 


[07/19] zest-java git commit: core/spi: fix all javadoc warnings

Posted by pa...@apache.org.
core/spi: fix all javadoc warnings


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

Branch: refs/heads/develop
Commit: cba29f6f6f18f4772ac4908d1d4104f473b778e9
Parents: 3565bcb
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Dec 18 00:39:31 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Dec 18 00:39:31 2016 +0100

----------------------------------------------------------------------
 .../apache/polygene/spi/entitystore/BackupRestore.java    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/cba29f6f/core/spi/src/main/java/org/apache/polygene/spi/entitystore/BackupRestore.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/BackupRestore.java b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/BackupRestore.java
index 2e0d55d..9676c3e 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/BackupRestore.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/BackupRestore.java
@@ -29,17 +29,21 @@ import java.util.stream.Stream;
 public interface BackupRestore
 {
     /**
-     * Backup as a stream of serialized entity states, must be closed.
+     * Backup entity states.
+     *
+     * @return Stream of serialized entity states, must be closed
      */
     Stream<String> backup();
 
     /**
-     * Restore from a stream of serialized entity states.
+     * Restore entity states.
+     *
+     * @param states Stream of serialized entity states
      */
     void restore( Stream<String> states );
 
     /**
-     * Restore from streams of serialized entity states.
+     * Restore entity states.
      *
      * @return A consumer of streams of serialized entity states
      */


[10/19] zest-java git commit: build: fix dependencies report

Posted by pa...@apache.org.
build: fix dependencies report


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

Branch: refs/heads/develop
Commit: a504947be544992102b007b7e8cbf2f707b78de1
Parents: d53d02b
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Dec 18 01:42:27 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Dec 18 01:42:27 2016 +0100

----------------------------------------------------------------------
 .../groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/a504947b/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
index 0edf1e2..07e3582 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
@@ -25,6 +25,7 @@ import org.gradle.api.Plugin
 import org.gradle.api.Project
 import org.gradle.api.plugins.JavaPluginConvention
 import org.gradle.api.tasks.compile.JavaCompile
+import org.gradle.api.tasks.diagnostics.DependencyReportTask
 import org.gradle.api.tasks.javadoc.Javadoc
 import org.gradle.api.tasks.testing.Test
 import org.gradle.api.tasks.testing.logging.TestExceptionFormat
@@ -157,9 +158,8 @@ class AllProjectsPlugin implements Plugin<Project>
   private static void configureDependencyReport( Project project )
   {
     project.plugins.apply 'project-report'
-    // TODO Fails with no task found
-    // def dependencyReport = project.tasks.getByName( 'dependencyReport' ) as DependencyReportTask
-    // dependencyReport.configurations = [ project.configurations.getByName( 'runtime' ) ] as Set
+    def dependencyReport = project.tasks.getByName( 'dependencyReport' ) as DependencyReportTask
+    dependencyReport.configurations = [ project.configurations.getByName( 'runtime' ) ] as Set
   }
 
   private static void configureHonker( Project project )


[08/19] zest-java git commit: build: decouple project names from built artifact names

Posted by pa...@apache.org.
build: decouple project names from built artifact names

we can now do:

  ./gradlew core:runtime:test

instead of:

  ./gradlew org.apache.polygene.core:org.apache.polygene.core.runtime:test

so much less typing

produced artifacts are the same as before


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

Branch: refs/heads/develop
Commit: 05c8141f11277feb87eb0a1a35fe5300ce75d106
Parents: cba29f6
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Dec 18 01:36:08 2016 +0100
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Dec 18 01:36:08 2016 +0100

----------------------------------------------------------------------
 .../polygene/gradle/AllProjectsPlugin.groovy    |  4 +--
 .../polygene/gradle/CodeProjectsPlugin.groovy   | 26 ++++++++++++++++
 .../polygene/gradle/PolygeneExtension.groovy    |  8 ++---
 .../polygene/gradle/RootProjectPlugin.groovy    |  2 +-
 settings.gradle                                 | 32 ++------------------
 .../introduction/thirtyminutes/build.gradle     |  2 +-
 6 files changed, 36 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/05c8141f/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
index 6c9a2c0..0edf1e2 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/AllProjectsPlugin.groovy
@@ -42,9 +42,9 @@ class AllProjectsPlugin implements Plugin<Project>
   void apply( final Project project )
   {
     project.defaultTasks = [ 'classes', 'test' ]
-    project.group = project.name == 'org.apache.polygene' ?
+    project.group = project.rootProject == project ?
                     'org.apache.polygene' :
-                    project.name.substring( 0, project.name.lastIndexOf( '.' ) )
+                    "org.apache.polygene.${ project.path.split( ':' ).drop( 1 ).dropRight( 1 ).join( '.' ) }"
 
     applyDefaultVersion( project )
     applyPolygeneExtension( project )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/05c8141f/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy
index 6aa345b..5eeaca0 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/CodeProjectsPlugin.groovy
@@ -25,6 +25,7 @@ import org.gradle.api.Plugin
 import org.gradle.api.Project
 import org.gradle.api.plugins.JavaPluginConvention
 import org.gradle.api.plugins.osgi.OsgiManifest
+import org.gradle.api.tasks.bundling.AbstractArchiveTask
 import org.gradle.api.tasks.javadoc.Javadoc
 import org.gradle.jvm.tasks.Jar
 import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
@@ -49,6 +50,7 @@ class CodeProjectsPlugin implements Plugin<Project>
 
     configureJar( project )
     configureSupplementaryArchives( project )
+    configureArchivesBaseName( project )
 
     configureJacoco( project )
     configureCheckstyle( project )
@@ -94,6 +96,30 @@ class CodeProjectsPlugin implements Plugin<Project>
     project.artifacts.add( 'archives', javadocJar )
   }
 
+  private static void configureArchivesBaseName( Project project )
+  {
+    project.tasks.withType( AbstractArchiveTask ) { AbstractArchiveTask task ->
+      def toName = { List<String> path -> path.drop( 1 ).join( '.' ) }
+      def path = project.path.split( ':' ).drop( 1 ) as List<String>
+      if( path[ 0 ] == 'libraries' )
+      {
+        task.baseName = "org.apache.polygene.library.${ toName( path ) }"
+      }
+      else if( path[ 0 ].endsWith( 's' ) )
+      {
+        task.baseName = "org.apache.polygene.${ path[ 0 ].substring( 0, path[ 0 ].length() - 1 ) }.${ toName( path ) }"
+      }
+      else if( path.size() > 1 )
+      {
+        task.baseName = "org.apache.polygene.${ path[ 0 ] }.${ toName( path ) }"
+      }
+      else
+      {
+        task.baseName = "org.apache.polygene.${ path[ 0 ] }"
+      }
+    }
+  }
+
   private static void configureJacoco( Project project )
   {
     def dependencies = project.rootProject.extensions.getByType( DependenciesDeclarationExtension )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/05c8141f/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy
index 41e472a..f20a610 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/PolygeneExtension.groovy
@@ -54,22 +54,22 @@ class PolygeneExtension
 
   private Dependency core( String name )
   {
-    return dependency( 'org.apache.polygene.core', "org.apache.polygene.core.$name" )
+    return dependency( 'core', name )
   }
 
   Dependency library( String name )
   {
-    return dependency( 'org.apache.polygene.libraries', "org.apache.polygene.library.$name" )
+    return dependency( 'libraries', name )
   }
 
   Dependency extension( String name )
   {
-    return dependency( 'org.apache.polygene.extensions', "org.apache.polygene.extension.$name" )
+    return dependency( 'extensions', name )
   }
 
   Dependency tool( String name )
   {
-    return dependency( 'org.apache.polygene.tools', "org.apache.polygene.tool.$name" )
+    return dependency( 'tools', name )
   }
 
   private Dependency dependency( String group, String name )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/05c8141f/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
index 78857ea..12f2601 100644
--- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/RootProjectPlugin.groovy
@@ -95,7 +95,7 @@ class RootProjectPlugin implements Plugin<Project>
     buildAll.dependsOn 'javadocs', 'check', 'jar',
                        project.subprojects.collect { p -> p.tasks.getByName( 'dependencyReport' ) },
                        project.subprojects.collect { p -> p.tasks.getByName( 'assemble' ) },
-                       ':org.apache.polygene.manual:website'
+                       ':manual:website'
   }
 
   private static void applyPlugins( Project project )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/05c8141f/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index a78cd93..d789e08 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -14,10 +14,10 @@
  *  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.
- *
- *
  */
 
+rootProject.name = 'polygene-java'
+
 include 'core:api',
         'core:spi',
         'core:testsupport',
@@ -98,31 +98,3 @@ include 'core:api',
         'tutorials:services',
         'tests:regression',
         'tests:performance'
-
-rootProject.name = "org.apache.polygene"
-
-validateProject(rootProject, "")
-
-def validateProject(project, parentName)
-{
-    assert project.projectDir.isDirectory()
-    if( new File("$project.projectDir/src/main/java").exists() )
-    {
-        assert project.buildFile.isFile()
-    }
-    if( parentName == 'org.apache.polygene.libraries' )
-    {
-        parentName = 'org.apache.polygene.library'
-    }
-    if( parentName.endsWith('s') )
-    {
-        parentName = parentName.substring(0, parentName.length() - 1)
-    }
-    if( parentName.length() > 0 )
-    {
-        project.name = parentName + "." + project.name
-    }
-    project.children.each { child ->
-        validateProject(child, project.name)
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/05c8141f/tutorials/introduction/thirtyminutes/build.gradle
----------------------------------------------------------------------
diff --git a/tutorials/introduction/thirtyminutes/build.gradle b/tutorials/introduction/thirtyminutes/build.gradle
index d313fb6..dc0eeba 100644
--- a/tutorials/introduction/thirtyminutes/build.gradle
+++ b/tutorials/introduction/thirtyminutes/build.gradle
@@ -24,7 +24,7 @@ jar { manifest { name = "Apache Polygene\u2122 Tutorial - 30 minute Introduction" }
 
 dependencies {
   compile polygene.core.bootstrap
-  compile project( ':org.apache.polygene.tutorials:org.apache.polygene.tutorial.introduction:org.apache.polygene.tutorial.introduction.tenminutes' )
+  compile project( ':tutorials:introduction:tenminutes' )
 
   runtime polygene.core.runtime