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

[1/3] zest-qi4j git commit: Documentation, minor: better markup for Conversion deprecation warning

Repository: zest-qi4j
Updated Branches:
  refs/heads/develop b0f74761f -> 21b004e7c


Documentation, minor: better markup for Conversion deprecation warning


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

Branch: refs/heads/develop
Commit: 8c580cdb31cf15539f13ce45790a3c510aa04407
Parents: b0f7476
Author: Paul Merlin <pa...@apache.org>
Authored: Thu Jul 16 22:09:15 2015 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Thu Jul 16 22:09:15 2015 +0200

----------------------------------------------------------------------
 libraries/conversion/src/docs/conversion.txt | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/8c580cdb/libraries/conversion/src/docs/conversion.txt
----------------------------------------------------------------------
diff --git a/libraries/conversion/src/docs/conversion.txt b/libraries/conversion/src/docs/conversion.txt
index 90f26f9..015f3e6 100644
--- a/libraries/conversion/src/docs/conversion.txt
+++ b/libraries/conversion/src/docs/conversion.txt
@@ -25,15 +25,20 @@
 source=libraries/conversion/dev-status.xml
 --------------
 
-DEPRECATED: This functionality is now present in <<def-unitofwork>> as
-the two methods toEntity() and toValue(). Since this library was written
-assocations of all kinds are now fully supported in Values.
-
-
 The Conversion Library provides support for converting composite types.
 
 include::../../build/docs/buildinfo/artifact.txt[]
 
+
+[WARNING]
+.DEPRECATED
+====
+This functionality is now present in <<def-unitofwork>> as
+the two methods toEntity() and toValue(). Since this library was written
+assocations of all kinds are now fully supported in Values.
+====
+
+
 == Entities to Values ==
 
 To convert Entities to Values, use the EntityToValueService. It is easily assembled:


[2/3] zest-qi4j git commit: Build and documentation minor edits

Posted by pa...@apache.org.
Build and documentation minor edits


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

Branch: refs/heads/develop
Commit: 5a1a63bbe49fc34f796d4bfed3de64a63ecdaae2
Parents: 8c580cd
Author: Paul Merlin <pa...@apache.org>
Authored: Thu Jul 16 22:11:44 2015 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Thu Jul 16 23:49:26 2015 +0200

----------------------------------------------------------------------
 build.gradle                                    |  4 +-
 buildSrc/src/javadoc/overview.html              | 23 ----------
 .../org/qi4j/gradle/plugin/Documentation.groovy | 45 ++++++++++----------
 libraries/metrics/src/docs/metrics.txt          |  2 +-
 src/javadoc/overview.html                       | 23 ++++++++++
 5 files changed, 48 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/5a1a63bb/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index f1e1431..b164793 100644
--- a/build.gradle
+++ b/build.gradle
@@ -516,7 +516,7 @@ task javadocs( type: Javadoc ) {
 
   options.docFilesSubDirs = true
   options.encoding = "UTF-8"
-  options.overview = "${rootProject.projectDir}/buildSrc/src/javadoc/overview.html"
+  options.overview = "${rootProject.projectDir}/src/javadoc/overview.html"
   title = "${rootProject.title} ${version}"
   def apiSources = releaseApprovedProjects.findAll( { project ->
     ( project.name.startsWith( 'org.qi4j.core' ) && !project.name.startsWith( 'org.qi4j.core.runtime' ) ) ||
@@ -780,7 +780,7 @@ task unpackSrcDist( type: Copy ) {
 }
 task checkSrcDist( type: GradleBuild, dependsOn: unpackSrcDist ) {
   buildFile = "$unpackedSrcDistDir/build.gradle"
-  tasks = [ 'check' ] // TODO check
+  tasks = [ 'check' ]
 }
 task unpackBinDist( type: Copy, dependsOn: buildAll ) {
   with binDistImage

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/5a1a63bb/buildSrc/src/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/buildSrc/src/javadoc/overview.html b/buildSrc/src/javadoc/overview.html
deleted file mode 100644
index 38affee..0000000
--- a/buildSrc/src/javadoc/overview.html
+++ /dev/null
@@ -1,23 +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 Zest™ (Java Edition) SDK Javadoc.</h3>
-        <p>Apache Zest™ is a framework for domain centric application development, including evolved concepts from AOP, DI and DDD.</p>
-        <p><a href="https://zest.apache.org" target="_blank">zest.apache.org</a></p>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/5a1a63bb/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy b/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy
index bf2a416..a6e6bf5 100644
--- a/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy
+++ b/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy
@@ -61,14 +61,14 @@ class Documentation extends DefaultTask
     new File(project.buildDir, "docs/$docName".toString()).mkdirs()
     new File(project.buildDir, "tmp/docs/$docName".toString()).mkdirs()
 
-    copyResources()
+    copySubProjectsResources()
     generateXDoc()
     generateChunkedHtml()
-    generateSingleHtml()
-    generatePdf()
+    // generateSingleHtml()
+    // generatePdf()
   }
 
-  def void copyResources()
+  def void copySubProjectsResources()
   {
     project.parent.subprojects.each { p ->
       p.copy {
@@ -153,26 +153,25 @@ class Documentation extends DefaultTask
 
   def void generatePdf()
   {
-// $ xsltproc --nonet ../docbook-xsl/fo.xsl article.xml > article.fo
+    // $ xsltproc --nonet ../docbook-xsl/fo.xsl article.xml > article.fo
     // $ fop article.fo article.pdf
-
-    //    project.exec {
-    //      String xsltFile = 'src/xsl/fo.xsl'
-    //      executable = 'xsltproc'
-    //      args = [
-    //              '--nonet',
-    //              '--output', "build/tmp/docs/$docName/$docName"+".fo",
-    //              xsltFile,
-    //              "build/tmp/docs/$docName/xdoc-temp.xml"
-    //      ]
-    //    }
-    //    project.exec {
-    //      executable = 'fop'
-    //      args = [
-    //              "build/tmp/docs/$docName/$docName"+".fo",
-    //              "build/docs/$docName/$docName" + ".pdf"
-    //      ]
-    //    }
+    project.exec {
+      String xsltFile = 'src/xsl/fo.xsl'
+      executable = 'xsltproc'
+      args = [
+        '--nonet',
+        '--output', "build/tmp/docs/$docName/$docName"+".fo",
+        xsltFile,
+        "build/tmp/docs/$docName/xdoc-temp.xml"
+      ]
+    }
+    project.exec {
+      executable = 'fop'
+      args = [
+        "build/tmp/docs/$docName/$docName"+".fo",
+        "build/docs/$docName/$docName" + ".pdf"
+      ]
+    }
   }
 
   String getDocName( )

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/5a1a63bb/libraries/metrics/src/docs/metrics.txt
----------------------------------------------------------------------
diff --git a/libraries/metrics/src/docs/metrics.txt b/libraries/metrics/src/docs/metrics.txt
index 7ac1061..857c99a 100644
--- a/libraries/metrics/src/docs/metrics.txt
+++ b/libraries/metrics/src/docs/metrics.txt
@@ -14,7 +14,7 @@
 //////////////////////
 
 [[library-metrics,Metrics Library]]
-= Metrics Library=
+= Metrics Library =
 
 The Metrics library is available to application code to get production metrics from their applications. It allows
 applications to easily mark critical section for metrics gathering, without handling the details with the Metrics

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/5a1a63bb/src/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/src/javadoc/overview.html b/src/javadoc/overview.html
new file mode 100644
index 0000000..38affee
--- /dev/null
+++ b/src/javadoc/overview.html
@@ -0,0 +1,23 @@
+<!--
+  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 Zest™ (Java Edition) SDK Javadoc.</h3>
+        <p>Apache Zest™ is a framework for domain centric application development, including evolved concepts from AOP, DI and DDD.</p>
+        <p><a href="https://zest.apache.org" target="_blank">zest.apache.org</a></p>
+    </body>
+</html>


[3/3] zest-qi4j git commit: Documentation build plugin enhancements

Posted by pa...@apache.org.
Documentation build plugin enhancements

Declare task input/output, including content spread across the SDK.
The website build is now skipped if already up-to-date!


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

Branch: refs/heads/develop
Commit: 21b004e7ceabd750c2b5c4163f00905c8b62913e
Parents: 5a1a63b
Author: Paul Merlin <pa...@apache.org>
Authored: Thu Jul 16 23:49:53 2015 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Thu Jul 16 23:49:53 2015 +0200

----------------------------------------------------------------------
 .../org/qi4j/gradle/plugin/Documentation.groovy | 144 ++++++++++---------
 manual/build.gradle                             |   4 +-
 2 files changed, 78 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/21b004e7/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy b/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy
index a6e6bf5..fef25a2 100644
--- a/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy
+++ b/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/Documentation.groovy
@@ -17,63 +17,85 @@ package org.qi4j.gradle.plugin;
 
 import org.gradle.api.DefaultTask
 import org.gradle.api.tasks.TaskAction
+import org.gradle.api.tasks.Input
+import org.gradle.api.tasks.InputDirectory
+import org.gradle.api.tasks.InputFile
+import org.gradle.api.tasks.InputFiles
+import org.gradle.api.tasks.OutputDirectory
 
-// TODO: use proper project variables for 'src' and other locations
-// TODO: extract out every location into configurable property
 // 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.
 class Documentation extends DefaultTask
 {
-  private String docName
+  @Input def String docName
+  @Input def String docType
+  void setDocName( String docName ) { this.docName = docName }
+  void setDocType( String docType ) { this.docType = docType }
 
-  private 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') }
+
+  @InputFiles def getSubProjectsDocsDirs() { project.parent.subprojects.collect { p -> p.file( 'src/docs' ) } }
+  @InputFiles def getSubProjectsTestDirs() { project.parent.subprojects.collect { p -> p.file( 'src/test' ) } }
+
+  @OutputDirectory def File getOutputDir() { project.file( "${project.buildDir}/docs/${docName}/" ) }
+
+  def File getTempDir() { project.file( "${project.buildDir}/tmp/docs/${docName}") }
 
   @TaskAction
   def void generate()
   {
-    def userHome = new File(System.getProperty("user.home"))
-    def snippetDir = new File(userHome, ".asciidoc/filters/snippet").absoluteFile
+    installAsciidocFilters()
+
+    [ outputDir, tempDir ]*.deleteDir()
+    [ outputDir, tempDir ]*.mkdirs()
+
+    copySubProjectsDocsResources()
+    generateXDoc()
+    generateChunkedHtml()
+    // generateSingleHtml()
+    // generatePdf()
+  }
+
+  def void installAsciidocFilters()
+  {
+    def userHome = new File( System.getProperty( 'user.home' ) )
+    def snippetDir = new File( userHome, '.asciidoc/filters/snippet' ).absoluteFile
     if( !snippetDir.exists() )
     {
       println "Installing [snippet] into $snippetDir"
       snippetDir.mkdirs()
       project.copy {
-        from "$project.rootDir/buildSrc/src/bin"
+        from "${project.rootDir}/buildSrc/src/bin"
         into snippetDir
         include 'snippet.*'
       }
-      ant.chmod(dir: snippetDir, perm: "755", includes: "snippet.py")
+      ant.chmod( dir: snippetDir, perm: '755', includes: 'snippet.py' )
     }
 
-    def devstatusDir = new File(userHome, ".asciidoc/filters/devstatus").absoluteFile
+    def devstatusDir = new File( userHome, '.asciidoc/filters/devstatus' ).absoluteFile
     if( !devstatusDir.exists() )
     {
       println "Installing [devstatus] into $devstatusDir"
       snippetDir.mkdirs()
       project.copy {
-        from "$project.rootDir/buildSrc/src/bin"
+        from "${project.rootDir}/buildSrc/src/bin"
         into devstatusDir
         include 'devstatus.*'
       }
-      ant.chmod(dir: devstatusDir, perm: "755", includes: "devstatus.py")
+      ant.chmod( dir: devstatusDir, perm: '755', includes: 'devstatus.py' )
     }
-
-    new File(project.buildDir, "docs/$docName".toString()).mkdirs()
-    new File(project.buildDir, "tmp/docs/$docName".toString()).mkdirs()
-
-    copySubProjectsResources()
-    generateXDoc()
-    generateChunkedHtml()
-    // generateSingleHtml()
-    // generatePdf()
   }
 
-  def void copySubProjectsResources()
+  def void copySubProjectsDocsResources()
   {
     project.parent.subprojects.each { p ->
       p.copy {
-        from 'src/docs/resources'
-        into "build/docs/$docName/"
+        from p.file( 'src/docs/resources' )
+        into outputDir
         include '**'
       }
     }
@@ -83,28 +105,28 @@ class Documentation extends DefaultTask
   {
     project.exec {
       executable = 'asciidoc'
-      workingDir = ".."
-      def commonResourcesDir = 'manual/src/resources'
-      def asciidocConfigFile = 'manual/src/conf/asciidoc.conf'
-      def docbookConfigFile = 'manual/src/conf/docbook45.conf'
-      def linkimagesConfigFile = 'manual/src/conf/linkedimages.conf'
-      def xdocOutputFile = "manual/build/tmp/docs/$docName/xdoc-temp.xml".toString()
-      def asciiDocFile = "manual/src/docs/$docName/index.txt".toString()
+      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( docsDir, "$docName/index.txt" ) )
       args = [
               '--attribute', 'revnumber=' + project.version,
               '--attribute', 'level1=' + (docType.equals('article') ? 1 : 0),
               '--attribute', 'level2=' + (docType.equals('article') ? 2 : 1),
               '--attribute', 'level3=' + (docType.equals('article') ? 3 : 2),
               '--attribute', 'level4=' + (docType.equals('article') ? 4 : 3),
-              '--attribute', 'importdir=' + commonResourcesDir,
+              '--attribute', 'importdir=' + commonResourcesPath,
               '--backend', 'docbook',
               '--attribute', 'docinfo1',
               '--doctype', docType,
-              '--conf-file=' + asciidocConfigFile,
-              '--conf-file=' + docbookConfigFile,
-              '--conf-file=' + linkimagesConfigFile,
-              '--out-file', xdocOutputFile,
-              asciiDocFile
+              '--conf-file=' + asciidocConfigPath,
+              '--conf-file=' + docbookConfigPath,
+              '--conf-file=' + linkimagesConfigPath,
+              '--out-file', xdocOutputPath,
+              asciidocIndexPath
       ]
     }
   }
@@ -112,25 +134,26 @@ class Documentation extends DefaultTask
   def void generateChunkedHtml()
   {
     project.copy {
-      from 'src/resources'
-      into "build/docs/$docName/"
+      from commonResourcesDir
+      into outputDir
       include '**'
     }
     project.copy {
-      from "src/docs/$docName/resources"
-      into "build/docs/$docName/"
+      from "$docsDir/$docName/resources"
+      into outputDir
       include '**'
     }
 
     project.exec {
-      String xsltFile = "src/docs/$docName/xsl/chunked.xsl"
+      def xsltFile = "$docsDir/$docName/xsl/chunked.xsl"
+      def outputPath = relativePath( project.projectDir, outputDir ) + '/'
       executable = 'xsltproc'
       args = [
               '--nonet',
               '--noout',
-              '--output', "build/docs/$docName/",
+              '--output', outputPath,
               xsltFile,
-              "build/tmp/docs/$docName/xdoc-temp.xml"
+              "$tempDir/xdoc-temp.xml"
       ]
     }
   }
@@ -139,14 +162,14 @@ class Documentation extends DefaultTask
   {
     project.exec {
       // XML_CATALOG_FILES=
-      String xsltFile = 'src/xsl/xhtml.xsl'
+      String xsltFile = "$xslDir/xhtml.xsl"
       executable = 'xsltproc'
       args = [
               '--nonet',
               '--noout',
-              '--output', "build/docs/$docName/$docName" + ".html",
+              '--output', "$outputDir/${docName}.html",
               xsltFile,
-              "build/tmp/docs/$docName/xdoc-temp.xml"
+              "$tempDir/xdoc-temp.xml"
       ]
     }
   }
@@ -156,41 +179,26 @@ class Documentation extends DefaultTask
     // $ xsltproc --nonet ../docbook-xsl/fo.xsl article.xml > article.fo
     // $ fop article.fo article.pdf
     project.exec {
-      String xsltFile = 'src/xsl/fo.xsl'
+      String xsltFile = "$xslDir/fo.xsl"
       executable = 'xsltproc'
       args = [
         '--nonet',
-        '--output', "build/tmp/docs/$docName/$docName"+".fo",
+        '--output', "$tempDir/${docName}.fo",
         xsltFile,
-        "build/tmp/docs/$docName/xdoc-temp.xml"
+        "$tempDir/xdoc-temp.xml"
       ]
     }
     project.exec {
       executable = 'fop'
       args = [
-        "build/tmp/docs/$docName/$docName"+".fo",
-        "build/docs/$docName/$docName" + ".pdf"
+        "$tempDir/${docName}.fo",
+        "$outputDir/${docName}.pdf"
       ]
     }
   }
 
-  String getDocName( )
-  {
-    return docName
-  }
-
-  void setDocName( String docName )
-  {
-    this.docName = docName
-  }
-
-  String getDocType( )
-  {
-    return docType
-  }
-
-  void setDocType( String docType )
+  def String relativePath( File root, File target )
   {
-    this.docType = docType
+    new File( root.toURI().relativize( target.toURI() ).toString() ).path
   }
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/21b004e7/manual/build.gradle
----------------------------------------------------------------------
diff --git a/manual/build.gradle b/manual/build.gradle
index 3e3fc50..b81294e 100644
--- a/manual/build.gradle
+++ b/manual/build.gradle
@@ -46,8 +46,8 @@ dependencies {
 
 task website( type: org.qi4j.gradle.plugin.Documentation,
               dependsOn: rootProject.allprojects.tasks.flatten().findAll { it.name == AsciidocBuildInfo.TASK_NAME } ) {
-  docName = 'website'
-  docType = 'article'
+  docName 'website'
+  docType 'article'
 }
 
 task archiveWebsite( type: Copy ) {