You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ja...@apache.org on 2017/06/19 01:58:48 UTC
[05/29] ant-ivy git commit: setup the build to use asciidoc files as
the source of truth
setup the build to use asciidoc files as the source of truth
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/3d72f1db
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/3d72f1db
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/3d72f1db
Branch: refs/heads/master
Commit: 3d72f1db6ab39787c6df7ab893828a95a9adef1e
Parents: 610c3be
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Mon Feb 16 12:16:20 2015 +0100
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Mon Feb 16 12:19:35 2015 +0100
----------------------------------------------------------------------
asciidoc-template/document.html.slim | 87 ---------------
asciidoc-template/helpers.rb | 173 -----------------------------
asciidoc/templates/document.html.slim | 87 +++++++++++++++
asciidoc/templates/helpers.rb | 173 +++++++++++++++++++++++++++++
build-doc.xml | 59 ----------
build-release.xml | 42 ++-----
build.properties | 2 +-
xooki2asciidoc.xml | 43 +++++++
8 files changed, 315 insertions(+), 351 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3d72f1db/asciidoc-template/document.html.slim
----------------------------------------------------------------------
diff --git a/asciidoc-template/document.html.slim b/asciidoc-template/document.html.slim
deleted file mode 100644
index 6cdb6bd..0000000
--- a/asciidoc-template/document.html.slim
+++ /dev/null
@@ -1,87 +0,0 @@
-doctype transitional
-/!
-/! 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.
-- page = IvyDocHelpers.page(attr("basedir"), attr("docfile"))
-html lang=(attr :lang, 'en' unless attr? :nolang)
- head
- meta http-equiv="Content-Type" content="text/html; charset=utf-8"
- meta name='generator' content="Asciidoctor #{attr 'asciidoctor-version'}"
- title=((doctitle :sanitize => true) || (attr 'untitled-label'))
- link rel="stylesheet" type="text/css" href="#{page.relativeRoot}style/style.css"
- script src="#{page.relativeRoot}js/jquery.pack.js" type="text/javascript"
- script src="#{page.relativeRoot}js/jquery.treeview.js" type="text/javascript"
- javascript:
- $(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
- body
- div id="body"
- table id="header" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%"
- tr
- td id="home" width="30%"
- a href="http://ant.apache.org/" title="Apache Ant"
- img src="#{page.relativeRoot}images/ant-group-logo.gif" alt="Apache Ant" border="0"/
- td class="product" width="70%" align="right" valign="middle"
- img src="#{page.relativeRoot}images/logo.png" alt="ivy" border="0"/
- table id="top-menu" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%"
- tr
- td
- div id="navcontainer"
- a<> href="http://www.apache.org/" Apache™
- | >
- a<> href="http://ant.apache.org/" Apache Ant™
- | >
- a<> href="http://ant.apache.org/ivy/" Apache Ivy™
- | >
- = page.breadCrumb
- table id="content" border="0" cellpadding="0" cellspacing="0" width="100%"
- tr
- td id="sidebar-left"
- div class="block block-book" id="block-book-0"
- div class="sidebar-title" Apache Ivy™
- div class="content"
- = page.menu()
- center
- iframe src="http://www.apache.org/ads/buttonbar.html" style="border-width:0;" frameborder="0" scrolling="no" width="135" height="265"
- td valign="top"
- div id="main"
- h1 = page.title
- #content=content
- table id="footer-menu" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%"
- tr
- td align="center" valign="middle"
- div class="primary-links"
- | ::
- a href="index.html" Home
- | ::
- a href="reference.html" Reference
- | ::
- a href="tutorial.html" Tutorials
- | ::
- a href="dev.html" Developer's doc
- | ::
- div id="footer-message" class="footer"
- hr/
- i
- | Copyright © 2014 The Apache Software Foundation, Licensed under the
- a href="http://www.apache.org/licenses/LICENSE-2.0.txt" Apache License, Version 2.0
- | .
- br/
- i
- | Apache Ivy, Apache Ant, Ivy, Ant, Apache, the Apache Ivy logo, the Apache Ant logo and the Apache feather logo are trademarks of The Apache Software Foundation.
- br/
- i
- | All other marks mentioned may be trademarks or registered trademarks of their respective owners.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3d72f1db/asciidoc-template/helpers.rb
----------------------------------------------------------------------
diff --git a/asciidoc-template/helpers.rb b/asciidoc-template/helpers.rb
deleted file mode 100644
index e62557d..0000000
--- a/asciidoc-template/helpers.rb
+++ /dev/null
@@ -1,173 +0,0 @@
-# Add custom functions to this module that you want to use in your Slim
-# templates. Within the template you must namespace the function
-# (unless someone can show me how to include them in the evaluation context).
-# You can change the namespace to whatever you want.
-
-require 'json'
-
-module IvyDocHelpers
-
- class Page
- attr_accessor :id, :title, :url, :allChildIds, :children, :parent
-
- def initialize()
- @id = ""
- @title = ""
- @url = ""
- @allChildIds = []
- @children = []
- @parent = nil
- end
-
- def link(printpage)
- l = ''
- if self.url
- if self.url.start_with?('http')
- url = self.url
- else
- url = printpage.relativeRoot + self.url
- end
- l += '<a href="' + url + '"'
- if self.id == printpage.id
- l += ' class="current"'
- end
- l += '>' + self.title + '</a>'
- else
- l += self.title
- end
- return l
- end
-
- def relativeRoot()
- p = ''
- (self.id.split("/").length-1).times do |e|
- p += '../'
- end
- return p
- end
-
- def breadCrumb()
- b = '<span class="breadCrumb">'
- b += breadCrumbStep(self)
- b += '</span>'
- return b
- end
-
- def breadCrumbStep(page)
- b = ' '
- if page.parent && page.parent.parent
- b += breadCrumbStep(page.parent)
- b += ' > '
- end
- b += page.link(page)
- return b
- end
-
- def rootpage()
- if self.parent
- return self.parent.rootpage()
- else
- return self
- end
- end
-
- def menu()
- return innermenu(rootpage())
- end
-
- def innermenu(page)
- m = '<ul id="treemenu" class="treeview">' + "\n"
- page.children.each do |p|
- m += '<li id="xooki-' + (p.id || "undefined") + '"'
- if p.children.length > 0
- m += ' class="submenu"'
- end
- m += '>'
- m += p.link(self)
- if p.children.length > 0
- m += '<ul class="'
- if p.allChildIds.include? self.id
- m += 'open'
- else
- m += 'closed'
- end
- m += '">'
- m += innermenu(p)
- m += '</ul>'
- end
- m += "</li>\n"
- end
- m += "</ul>\n"
- return m
- end
-
- end
-
- def self.page(basedir, docfile)
- rootpage = loadPages(basedir)
- pageId = docfile[basedir.length+1..docfile.rindex(/\./)-1]
- p = findPage(rootpage, pageId)
- if !p
- p = Page.new
- end
- return p
- end
-
- def self.loadPages(basedir)
- rootpage = Page.new
- toc = JSON.parse(IO.read(basedir + "/toc.json"))
- toc['children'].each do |child|
- rootpage.children << loadPage(basedir, rootpage, child, "")
- end
- return rootpage
- end
-
- def self.loadPage(basedir, parent, node, path)
- p = Page.new
- p.title = node['title']
- p.parent = parent
- if node.has_key?("importRoot")
- p.id = path + node['importRoot'] + '/' + node['importNode']
- p.url = p.id + ".html"
- toc = JSON.parse(IO.read(basedir + '/' + node['importRoot'] + "/toc.json"))
- toc['children'].each do |child|
- p.children << loadPage(basedir, node, child, path + node['importRoot'] + '/')
- end
- else
- p.id = node['id']
- if !(node.has_key?("isAbstract"))
- if node.has_key?("url")
- p.url = node['url']
- else
- p.url = path + node['id'] + ".html"
- end
- end
- if node.has_key?("children")
- node['children'].each do |child|
- p.children << loadPage(basedir, p, child, path)
- end
- end
- end
- p.children.each { |cp| p.allChildIds += cp.allChildIds }
- if p.id
- p.allChildIds << p.id
- end
- return p
- end
-
- def self.findPage(parent, pageId)
- parent.children.each do |p|
- if p.id == pageId
- return p
- end
- if p.children.length > 0
- found = findPage(p, pageId)
- if found
- return found
- end
- end
- end
- return nil
- end
-
-end
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3d72f1db/asciidoc/templates/document.html.slim
----------------------------------------------------------------------
diff --git a/asciidoc/templates/document.html.slim b/asciidoc/templates/document.html.slim
new file mode 100644
index 0000000..6cdb6bd
--- /dev/null
+++ b/asciidoc/templates/document.html.slim
@@ -0,0 +1,87 @@
+doctype transitional
+/!
+/! 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.
+- page = IvyDocHelpers.page(attr("basedir"), attr("docfile"))
+html lang=(attr :lang, 'en' unless attr? :nolang)
+ head
+ meta http-equiv="Content-Type" content="text/html; charset=utf-8"
+ meta name='generator' content="Asciidoctor #{attr 'asciidoctor-version'}"
+ title=((doctitle :sanitize => true) || (attr 'untitled-label'))
+ link rel="stylesheet" type="text/css" href="#{page.relativeRoot}style/style.css"
+ script src="#{page.relativeRoot}js/jquery.pack.js" type="text/javascript"
+ script src="#{page.relativeRoot}js/jquery.treeview.js" type="text/javascript"
+ javascript:
+ $(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
+ body
+ div id="body"
+ table id="header" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%"
+ tr
+ td id="home" width="30%"
+ a href="http://ant.apache.org/" title="Apache Ant"
+ img src="#{page.relativeRoot}images/ant-group-logo.gif" alt="Apache Ant" border="0"/
+ td class="product" width="70%" align="right" valign="middle"
+ img src="#{page.relativeRoot}images/logo.png" alt="ivy" border="0"/
+ table id="top-menu" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%"
+ tr
+ td
+ div id="navcontainer"
+ a<> href="http://www.apache.org/" Apache™
+ | >
+ a<> href="http://ant.apache.org/" Apache Ant™
+ | >
+ a<> href="http://ant.apache.org/ivy/" Apache Ivy™
+ | >
+ = page.breadCrumb
+ table id="content" border="0" cellpadding="0" cellspacing="0" width="100%"
+ tr
+ td id="sidebar-left"
+ div class="block block-book" id="block-book-0"
+ div class="sidebar-title" Apache Ivy™
+ div class="content"
+ = page.menu()
+ center
+ iframe src="http://www.apache.org/ads/buttonbar.html" style="border-width:0;" frameborder="0" scrolling="no" width="135" height="265"
+ td valign="top"
+ div id="main"
+ h1 = page.title
+ #content=content
+ table id="footer-menu" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%"
+ tr
+ td align="center" valign="middle"
+ div class="primary-links"
+ | ::
+ a href="index.html" Home
+ | ::
+ a href="reference.html" Reference
+ | ::
+ a href="tutorial.html" Tutorials
+ | ::
+ a href="dev.html" Developer's doc
+ | ::
+ div id="footer-message" class="footer"
+ hr/
+ i
+ | Copyright © 2014 The Apache Software Foundation, Licensed under the
+ a href="http://www.apache.org/licenses/LICENSE-2.0.txt" Apache License, Version 2.0
+ | .
+ br/
+ i
+ | Apache Ivy, Apache Ant, Ivy, Ant, Apache, the Apache Ivy logo, the Apache Ant logo and the Apache feather logo are trademarks of The Apache Software Foundation.
+ br/
+ i
+ | All other marks mentioned may be trademarks or registered trademarks of their respective owners.
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3d72f1db/asciidoc/templates/helpers.rb
----------------------------------------------------------------------
diff --git a/asciidoc/templates/helpers.rb b/asciidoc/templates/helpers.rb
new file mode 100644
index 0000000..e62557d
--- /dev/null
+++ b/asciidoc/templates/helpers.rb
@@ -0,0 +1,173 @@
+# Add custom functions to this module that you want to use in your Slim
+# templates. Within the template you must namespace the function
+# (unless someone can show me how to include them in the evaluation context).
+# You can change the namespace to whatever you want.
+
+require 'json'
+
+module IvyDocHelpers
+
+ class Page
+ attr_accessor :id, :title, :url, :allChildIds, :children, :parent
+
+ def initialize()
+ @id = ""
+ @title = ""
+ @url = ""
+ @allChildIds = []
+ @children = []
+ @parent = nil
+ end
+
+ def link(printpage)
+ l = ''
+ if self.url
+ if self.url.start_with?('http')
+ url = self.url
+ else
+ url = printpage.relativeRoot + self.url
+ end
+ l += '<a href="' + url + '"'
+ if self.id == printpage.id
+ l += ' class="current"'
+ end
+ l += '>' + self.title + '</a>'
+ else
+ l += self.title
+ end
+ return l
+ end
+
+ def relativeRoot()
+ p = ''
+ (self.id.split("/").length-1).times do |e|
+ p += '../'
+ end
+ return p
+ end
+
+ def breadCrumb()
+ b = '<span class="breadCrumb">'
+ b += breadCrumbStep(self)
+ b += '</span>'
+ return b
+ end
+
+ def breadCrumbStep(page)
+ b = ' '
+ if page.parent && page.parent.parent
+ b += breadCrumbStep(page.parent)
+ b += ' > '
+ end
+ b += page.link(page)
+ return b
+ end
+
+ def rootpage()
+ if self.parent
+ return self.parent.rootpage()
+ else
+ return self
+ end
+ end
+
+ def menu()
+ return innermenu(rootpage())
+ end
+
+ def innermenu(page)
+ m = '<ul id="treemenu" class="treeview">' + "\n"
+ page.children.each do |p|
+ m += '<li id="xooki-' + (p.id || "undefined") + '"'
+ if p.children.length > 0
+ m += ' class="submenu"'
+ end
+ m += '>'
+ m += p.link(self)
+ if p.children.length > 0
+ m += '<ul class="'
+ if p.allChildIds.include? self.id
+ m += 'open'
+ else
+ m += 'closed'
+ end
+ m += '">'
+ m += innermenu(p)
+ m += '</ul>'
+ end
+ m += "</li>\n"
+ end
+ m += "</ul>\n"
+ return m
+ end
+
+ end
+
+ def self.page(basedir, docfile)
+ rootpage = loadPages(basedir)
+ pageId = docfile[basedir.length+1..docfile.rindex(/\./)-1]
+ p = findPage(rootpage, pageId)
+ if !p
+ p = Page.new
+ end
+ return p
+ end
+
+ def self.loadPages(basedir)
+ rootpage = Page.new
+ toc = JSON.parse(IO.read(basedir + "/toc.json"))
+ toc['children'].each do |child|
+ rootpage.children << loadPage(basedir, rootpage, child, "")
+ end
+ return rootpage
+ end
+
+ def self.loadPage(basedir, parent, node, path)
+ p = Page.new
+ p.title = node['title']
+ p.parent = parent
+ if node.has_key?("importRoot")
+ p.id = path + node['importRoot'] + '/' + node['importNode']
+ p.url = p.id + ".html"
+ toc = JSON.parse(IO.read(basedir + '/' + node['importRoot'] + "/toc.json"))
+ toc['children'].each do |child|
+ p.children << loadPage(basedir, node, child, path + node['importRoot'] + '/')
+ end
+ else
+ p.id = node['id']
+ if !(node.has_key?("isAbstract"))
+ if node.has_key?("url")
+ p.url = node['url']
+ else
+ p.url = path + node['id'] + ".html"
+ end
+ end
+ if node.has_key?("children")
+ node['children'].each do |child|
+ p.children << loadPage(basedir, p, child, path)
+ end
+ end
+ end
+ p.children.each { |cp| p.allChildIds += cp.allChildIds }
+ if p.id
+ p.allChildIds << p.id
+ end
+ return p
+ end
+
+ def self.findPage(parent, pageId)
+ parent.children.each do |p|
+ if p.id == pageId
+ return p
+ end
+ if p.children.length > 0
+ found = findPage(p, pageId)
+ if found
+ return found
+ end
+ end
+ end
+ return nil
+ end
+
+end
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3d72f1db/build-doc.xml
----------------------------------------------------------------------
diff --git a/build-doc.xml b/build-doc.xml
deleted file mode 100644
index 671da0e..0000000
--- a/build-doc.xml
+++ /dev/null
@@ -1,59 +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.
--->
-<project name="doc" xmlns:ivy="antlib:org.apache.ivy.ant"
- xmlns:xooki="antlib:xooki"
- xmlns:asciidoctor="antlib:org.asciidoctor.ant">
- <import file="build-release.xml"/>
-
- <target name="generate-asciidoc" depends="generate-doc-init">
- <mkdir dir="${build.dir}/asciidoc" />
- <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
- <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki2asciidoc/antlib.xml" />
- <xooki:toAsciidoc destDir="${build.dir}/asciidoc" checkUpToDate="true" xookidir="${doc.src.dir}/xooki2asciidoc">
- <fileset dir="${doc.tmp.dir}">
- <include name="**/*.html"/>
- <exclude name="template*.html"/>
- <exclude name="*Template.html"/>
- <exclude name="conflict-solving-algo.html"/>
- <exclude name="use.html"/>
- <exclude name="samples/**"/>
- <exclude name="js/**"/>
- <exclude name="reports/**"/>
- <exclude name="xooki/**"/>
- </fileset>
- </xooki:toAsciidoc>
- <copy file="${doc.tmp.dir}/toc.json" todir="${build.dir}/asciidoc" />
- </target>
-
- <target name="generate-doc" depends="init-ivy,generate-doc-init">
- <ivy:cachepath pathid="asciidoctor.path">
- <dependency org="org.asciidoctor" name="asciidoctor-ant" rev="1.5.0" />
- </ivy:cachepath>
- <taskdef uri="antlib:org.asciidoctor.ant" resource="org/asciidoctor/ant/antlib.xml" classpathref="asciidoctor.path" />
- <asciidoctor:convert sourceDirectory="${build.dir}/asciidoc" outputDirectory="${doc.build.dir}" backend="xhtml5" templateDir="asciidoc-template" preserveDirectories="true">
- <attribute key="basedir" value="${build.dir}/asciidoc" />
- <attribute key="imagesdir" value="" />
- </asciidoctor:convert>
- <copy todir="${doc.build.dir}">
- <fileset dir="${doc.src.dir}" includes="images/**,style/**,samples/**,js/**,ivy.xsd" />
- <fileset dir="${doc.tmp.dir}" includes="tutorial/log/multi-project-general-publishall.txt" />
- </copy>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3d72f1db/build-release.xml
----------------------------------------------------------------------
diff --git a/build-release.xml b/build-release.xml
index 0fa812a..7e3fc23 100644
--- a/build-release.xml
+++ b/build-release.xml
@@ -19,7 +19,7 @@
<project name="IvyRelease" default="snapshot"
xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:ivy2="antlib:org.apache.ivy.ant_2"
- xmlns:xooki="antlib:xooki"
+ xmlns:asciidoctor="antlib:org.asciidoctor.ant"
xmlns:openpgp="antlib:org.apache.commons.openpgp.ant">
<import file="build.xml"/>
@@ -181,40 +181,20 @@
</copy>
</target>
- <target name="generate-doc" depends="generate-doc-init, generate-tutorial-output">
+ <target name="generate-doc" depends="init-ivy,generate-doc-init,generate-tutorial-output">
+ <ivy:cachepath pathid="asciidoctor.path">
+ <dependency org="org.asciidoctor" name="asciidoctor-ant" rev="1.5.0" />
+ </ivy:cachepath>
+ <taskdef uri="antlib:org.asciidoctor.ant" resource="org/asciidoctor/ant/antlib.xml" classpathref="asciidoctor.path" />
+ <asciidoctor:convert sourceDirectory="${doc.tmp.dir}" outputDirectory="${doc.build.dir}" backend="xhtml5" templateDir="${doc.src.dir}/templates" preserveDirectories="true">
+ <attribute key="basedir" value="${doc.tmp.dir}" />
+ <attribute key="imagesdir" value="" />
+ </asciidoctor:convert>
<copy todir="${doc.build.dir}">
<fileset dir="${doc.src.dir}" includes="images/**,style/**,samples/**,js/**,ivy.xsd" />
<fileset dir="${doc.tmp.dir}" includes="tutorial/log/multi-project-general-publishall.txt" />
</copy>
-
- <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
- <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
- <xooki:generate destDir="${doc.build.dir}" checkUpToDate="true" xookidir="${doc.src.dir}/xooki">
- <fileset dir="${doc.tmp.dir}">
- <include name="**/*.html"/>
- <exclude name="template.html"/>
- <exclude name="*Template.html"/>
- <exclude name="conflict-solving-algo.html"/>
- <exclude name="use.html"/>
- <exclude name="samples/**"/>
- <exclude name="js/**"/>
- <exclude name="reports/**"/>
- <exclude name="xooki/**"/>
- </fileset>
- </xooki:generate>
-
- <!-- generate print-friendly doc -->
- <!-- modify the basedir because othwise xooki.js will not be found! -->
- <ant antfile="../build-release.xml" target="generate-print-doc" dir="doc" />
- </target>
-
- <target name="generate-print-doc">
- <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
- <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
- <xooki:print src="${doc.tmp.dir}/index.html"
- dest="${doc.build.dir}/book.html"
- xookidir="${doc.src.dir}/xooki" />
- </target>
+ </target>
<target name="all-doc" depends="javadoc, generate-doc" />
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3d72f1db/build.properties
----------------------------------------------------------------------
diff --git a/build.properties b/build.properties
index cc08112..48333e0 100644
--- a/build.properties
+++ b/build.properties
@@ -37,7 +37,7 @@ test.report.dir=${reports.dir}/test
coverage.report.dir=${reports.dir}/coverage
javadoc.build.dir=${reports.dir}/api
ivy.report.dir=${reports.dir}/ivy
-doc.src.dir=${basedir}/doc
+doc.src.dir=${basedir}/asciidoc
checkstyle.report.dir=${reports.dir}/checkstyle
checkstyle.src.dir=${basedir}/src/etc/checkstyle
rat.report.dir=${reports.dir}/rat
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3d72f1db/xooki2asciidoc.xml
----------------------------------------------------------------------
diff --git a/xooki2asciidoc.xml b/xooki2asciidoc.xml
new file mode 100644
index 0000000..0bb98f0
--- /dev/null
+++ b/xooki2asciidoc.xml
@@ -0,0 +1,43 @@
+<!--
+ 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.
+-->
+<project default="generate-asciidoc" name="xooki2asciidoc" xmlns:xooki="antlib:xooki">
+ <import file="build-release.xml"/>
+
+ <target name="generate-asciidoc">
+ <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
+ <taskdef uri="antlib:xooki" file="${basedir}/doc/xooki2asciidoc/antlib.xml" />
+ <xooki:toAsciidoc destDir="${doc.src.dir}" checkUpToDate="true" xookidir="${basedir}/doc/xooki2asciidoc">
+ <fileset dir="${basedir}/doc">
+ <include name="**/*.html"/>
+ <exclude name="template*.html"/>
+ <exclude name="*Template.html"/>
+ <exclude name="conflict-solving-algo.html"/>
+ <exclude name="use.html"/>
+ <exclude name="samples/**"/>
+ <exclude name="js/**"/>
+ <exclude name="reports/**"/>
+ <exclude name="xooki/**"/>
+ </fileset>
+ </xooki:toAsciidoc>
+ <copy todir="${doc.src.dir}">
+ <fileset dir="${basedir}/doc" includes="toc.json,images/**,style/**,samples/**,js/**,ivy.xsd" />
+ </copy>
+ </target>
+
+</project>