Generate the book.html, and fix the title levels
Project: http://git-wip-us.apache.org/repos/asf/ant-ivyde/repo Commit: http://git-wip-us.apache.org/repos/asf/ant-ivyde/commit/421bcf7b Tree: http://git-wip-us.apache.org/repos/asf/ant-ivyde/tree/421bcf7b Diff: http://git-wip-us.apache.org/repos/asf/ant-ivyde/diff/421bcf7b Branch: refs/heads/master Commit: 421bcf7bc5eae2d2b1302b7f0d520fa3e0eec8de Parents: cd584f4 Author: Nicolas LaleveÌe <[email protected]> Authored: Sat Jul 1 12:39:01 2017 +0200 Committer: Nicolas LaleveÌe <[email protected]> Committed: Sat Jul 1 12:39:01 2017 +0200 ---------------------------------------------------------------------- asciidoc/compatibility.adoc | 8 +-- asciidoc/console.adoc | 4 ++ asciidoc/cpc/cleancache.adoc | 2 + asciidoc/cpc/edit.adoc | 4 ++ asciidoc/cpc/resolve.adoc | 8 ++- asciidoc/cpc/retrieve.adoc | 2 + asciidoc/eclipsevar.adoc | 4 +- asciidoc/index.adoc | 2 + asciidoc/settingseditor.adoc | 14 +++-- asciidoc/templates/book/document.html.slim | 53 ++++++++++++++++ asciidoc/templates/document-eclipse.html.slim | 45 -------------- asciidoc/templates/eclipse/document.html.slim | 45 ++++++++++++++ asciidoc/templates/eclipse/helpers.rb | 20 ++++++ build.xml | 71 +++++++++++++++++++--- 14 files changed, 219 insertions(+), 63 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/compatibility.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/compatibility.adoc b/asciidoc/compatibility.adoc index b3b15c5..ed50580 100644 --- a/asciidoc/compatibility.adoc +++ b/asciidoc/compatibility.adoc @@ -17,20 +17,20 @@ under the License. //// -=== Upgrading/Downgrading +== Upgrading/Downgrading This version is compatible with every earlier Apache release (since 2.0.0.alpha1). Any upgrade of Apache IvyDE should work without any worries. The reverse is not true, downgrading is not supported and may break your configuration. -=== Dependency on Apache Ivy +== Dependency on Apache Ivy Apache IvyDE expects to be used with a version 2.1 or superior of Apache Ivy. In order to use some OSGi features, an Ivy 2.3 or superior is needed. -=== Eclipse™ integration +== Eclipse™ integration Apache IvyDE has been maintained to be compatible with Eclipse 3.4 to 3.7, and 4.2. -=== JVM compability +== JVM compability Apache IvyDE is requiring a minimum of a JRE 6. http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/console.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/console.adoc b/asciidoc/console.adoc index 8dbb388..2feb577 100644 --- a/asciidoc/console.adoc +++ b/asciidoc/console.adoc @@ -19,6 +19,8 @@ The Ivy console provides the Ivy working traces that are visible in the command console. This view can be useful for understanding what Apache Ivy and Apache IvyDE are doing under the covers. +== View Logs + The Ivy Console can be accessed within your Eclipse Console view, by selecting the "Ivy Console" item. image::images/ivy_console.jpg[] @@ -35,6 +37,8 @@ There are two kinds of logs. The ones from Ivy itself and the ones from IvyDE. T The IvyDE logs are here to help you understand what IvyDE actually do when launching a resolve or refreshing a project. They can be espacially usefull in debug mode when reporting a bug to the developpers of IvyDE. +== Configuration + To change the level of logging in the console, use the button in the view: image::images/ivy_console_debug.jpg[] http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/cpc/cleancache.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/cpc/cleancache.adoc b/asciidoc/cpc/cleancache.adoc index a13b26f..0dd9ffd 100644 --- a/asciidoc/cpc/cleancache.adoc +++ b/asciidoc/cpc/cleancache.adoc @@ -26,4 +26,6 @@ On a configured IvyDE classpath container, open the context menu: a list a diffe * Clean every repository cache: will clean every cache dedicated to the artifacts * Clean the cache 'xxxxxx': will clean only the cache with the specified name +== Context Menu + image::../images/cleancache.jpg[] http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/cpc/edit.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/cpc/edit.adoc b/asciidoc/cpc/edit.adoc index 4b083e9..dd109ac 100644 --- a/asciidoc/cpc/edit.adoc +++ b/asciidoc/cpc/edit.adoc @@ -19,10 +19,14 @@ During the life of your project, you can change the ivy.xml file or link:maven.html[maven pom.xml] and change its configuration. +== Context Menu + These properties can be accessed by the context menu of the IvyDE classpath container: image::../images/cp_configuration.jpg[] +== Build Path + You can also edit it via the *build path* configuration: . open the build path configuration dialog, select the "Libraries" panel and select the IvyDE classpath container. http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/cpc/resolve.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/cpc/resolve.adoc b/asciidoc/cpc/resolve.adoc index 0d7dbfe..31fd7b4 100644 --- a/asciidoc/cpc/resolve.adoc +++ b/asciidoc/cpc/resolve.adoc @@ -25,13 +25,19 @@ There is also a "refresh" action: this action is similar to the resolve one, but And there is a "reload settings" action: by default IvyDE does reload ivy settings files each time a resolve it required. But in case the ivy settings file is remote, this take make the user experience quite slow. To work around that, you can check in the link:../preferences.html[preference page] the option to only load on demand, and use the "reload settings" action in the context menu. +== Context Menu + image::../images/cp_resolve.jpg[] +== Full Refresh + You can also trigger a resolve (not a refresh!) of every IvyDE classpath container in the workspace via the button in the tool bar of Eclipse. image::../images/resolveall.jpg[] -And to launch a resolve on a specified selection of projects: +== Project Refresh + +To launch a resolve on a specified selection of projects: * Select the projects you want to resolve in the package view, * Open the context menu with a right click http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/cpc/retrieve.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/cpc/retrieve.adoc b/asciidoc/cpc/retrieve.adoc index a6e2aee..dd9f700 100644 --- a/asciidoc/cpc/retrieve.adoc +++ b/asciidoc/cpc/retrieve.adoc @@ -19,6 +19,8 @@ It is possible to make the classpath container be composed of a retrieved dependencies. Instead of having the container point to the jars in Ivy's cache, jars can be retrieved in the project with a specified pattern and have the container be composed of them. +== Configuration + To enable this behavior, enter the classpath container configuration panel, select the third tab "Classpath" and select "retrieved artifacts". image::../images/retrieve.jpg[] http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/eclipsevar.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/eclipsevar.adoc b/asciidoc/eclipsevar.adoc index bf68b79..bbaf27b 100644 --- a/asciidoc/eclipsevar.adoc +++ b/asciidoc/eclipsevar.adoc @@ -21,6 +21,8 @@ Eclipse contains a link:http://help.eclipse.org/galileo/index.jsp?topic=/org.ecl Apache IvyDE uses it to find the ivysettings.xml and properties files in both the link:preferences.html#settings[global preference page] and the link:cpc/create.html#localconf[project specific preference page]. +== Options + Using the "Workspace..." button will open a window to choose a file in the workspace. Apache IvyDE will automatically fill the field with the proper variable. image::images/eclipsevar_workspace.jpg[] @@ -31,6 +33,6 @@ Finally, you can choose to depend on the Eclipse variable system by clicking on image::images/eclipsevar_variables.jpg[] -*Backwards compatibility* +== Backwards compatibility Previously, Apache IvyDE supported the `project://projectName/path/to/file.ext` protocol. It sill does, but references of this style will be automatically converted in the saved settings to the Eclipse variable way of defining this path: `${workspace_loc:projectName/path/to/file.ext}.` http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/index.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/index.adoc b/asciidoc/index.adoc index f67b38b..566315b 100644 --- a/asciidoc/index.adoc +++ b/asciidoc/index.adoc @@ -35,3 +35,5 @@ A summary of the features it provides follows: * link:non-java.html[Resolve and retrieve for non Java project]: automation of the retrival of your dependencies in your non Java project Apache IvyDE can be also used with other plugins like link:cpc/wtp.html[WTP] and link:ant.html[Apache Ant]. + +A single page version documentation can be found link:book.html[here]. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/settingseditor.adoc ---------------------------------------------------------------------- diff --git a/asciidoc/settingseditor.adoc b/asciidoc/settingseditor.adoc index 034f0ff..02cbebb 100644 --- a/asciidoc/settingseditor.adoc +++ b/asciidoc/settingseditor.adoc @@ -23,14 +23,20 @@ image::images/settings.jpg[] Completion comes with contextual help. The completion popup is displayed through the CTRL + SPACE shortcut. -*Available completions:* +== Available completions: -* *XML structure*: Allows you to quickly to insert valid tags in the right place. If the tag can have nested childrenm, both notations, simple tag and open tag, are proposed. +=== XML structure + +Allows you to quickly to insert valid tags in the right place. If the tag can have nested childrenm, both notations, simple tag and open tag, are proposed. image::images/settings_completion_struct.jpg[] -* *Tag attributes*: When your cursor is placed inside a tag bracket, the completion shows available attributes for the enclosing tag. +=== Tag attributes + +When your cursor is placed inside a tag bracket, the completion shows available attributes for the enclosing tag. image::images/settings_completion_att.jpg[] -* *Change colors:* you can change the color used by the editor in the link:preferences.html#xmleditor[global preferences page]. +=== Change colors + +You can change the color used by the editor in the link:preferences.html#xmleditor[global preferences page]. http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/templates/book/document.html.slim ---------------------------------------------------------------------- diff --git a/asciidoc/templates/book/document.html.slim b/asciidoc/templates/book/document.html.slim new file mode 100644 index 0000000..126676e --- /dev/null +++ b/asciidoc/templates/book/document.html.slim @@ -0,0 +1,53 @@ +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. +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="Apache Ivy™ Documentation #{attr 'version'}" + link rel="stylesheet" type="text/css" href="./style/style.css" + link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" + script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" type="text/javascript" + javascript: + hljs.initHighlightingOnLoad(); + body id="book" + 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="./images/ant-project-logo.svg" alt="Apache Ant" border="0" height="80px"/ + td class="product" width="70%" align="right" valign="middle" + img src="./images/logo.png" alt="ivy" border="0"/ + div id="title" + | Documentation (#{attr 'version'}) + div id="main" + #content=content + div id="footer-message" class="footer" + hr/ + i + | Copyright © 2017 The Apache Software Foundation, Licensed under the + a href="http://www.apache.org/licenses/" 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-ivyde/blob/421bcf7b/asciidoc/templates/document-eclipse.html.slim ---------------------------------------------------------------------- diff --git a/asciidoc/templates/document-eclipse.html.slim b/asciidoc/templates/document-eclipse.html.slim deleted file mode 100644 index f64412f..0000000 --- a/asciidoc/templates/document-eclipse.html.slim +++ /dev/null @@ -1,45 +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"), attr("version")) -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=page.title + " | Apache IvyDE™ Documentation" - link rel="stylesheet" type="text/css" href="#{page.relativeRoot}style/style.css" - style type="text/css" - | body { background-color: #ffffff; } - body - div id="main" - h1 = page.title - #content=content - div id="footer-message" class="footer" - hr/ - i - | Copyright © 2017 The Apache Software Foundation, Licensed under the - a href="http://www.apache.org/licenses/" Apache License, Version 2.0 - | . - br/ - i - | Apache IvyDE, Apache Ivy, Apache Ant, IvyDE, 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 - | Eclipse and the Eclipse logo are trademarks of Eclipse Foundation, Inc. - i - | All other marks mentioned may be trademarks or registered trademarks of their respective owners. http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/templates/eclipse/document.html.slim ---------------------------------------------------------------------- diff --git a/asciidoc/templates/eclipse/document.html.slim b/asciidoc/templates/eclipse/document.html.slim new file mode 100644 index 0000000..f64412f --- /dev/null +++ b/asciidoc/templates/eclipse/document.html.slim @@ -0,0 +1,45 @@ +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"), attr("version")) +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=page.title + " | Apache IvyDE™ Documentation" + link rel="stylesheet" type="text/css" href="#{page.relativeRoot}style/style.css" + style type="text/css" + | body { background-color: #ffffff; } + body + div id="main" + h1 = page.title + #content=content + div id="footer-message" class="footer" + hr/ + i + | Copyright © 2017 The Apache Software Foundation, Licensed under the + a href="http://www.apache.org/licenses/" Apache License, Version 2.0 + | . + br/ + i + | Apache IvyDE, Apache Ivy, Apache Ant, IvyDE, 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 + | Eclipse and the Eclipse logo are trademarks of Eclipse Foundation, Inc. + i + | All other marks mentioned may be trademarks or registered trademarks of their respective owners. http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/asciidoc/templates/eclipse/helpers.rb ---------------------------------------------------------------------- diff --git a/asciidoc/templates/eclipse/helpers.rb b/asciidoc/templates/eclipse/helpers.rb new file mode 100644 index 0000000..a139c37 --- /dev/null +++ b/asciidoc/templates/eclipse/helpers.rb @@ -0,0 +1,20 @@ +# *************************************************************** +# * 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. +# *************************************************************** + +require_relative '../helpers.rb' http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/421bcf7b/build.xml ---------------------------------------------------------------------- diff --git a/build.xml b/build.xml index 06d2e38..a42df26 100644 --- a/build.xml +++ b/build.xml @@ -189,14 +189,73 @@ </copy> </target> - <target name="generate-dist-doc-html" depends="compute-version,init-asciidoctor" unless="skip.doc"> - <asciidoctor:convert sourceDirectory="${src.doc.dir}" outputDirectory="${dist.work.dir}/apache-ivyde-${build.version}/doc" backend="xhtml5" templateDir="${src.doc.dir}/templates" preserveDirectories="true"> + <target name="generate-dist-doc-book-adoc" depends="generate-dist-doc-files"> + <scriptdef name="generate-book-adoc" language="javascript"> + <attribute name="jsontocfile" /> + <attribute name="destFile" /> + <![CDATA[ + var tocfile = self.getProject().resolveFile(attributes.get("jsontocfile")) + r = new java.io.BufferedReader(new java.io.FileReader(tocfile)); + var val = ""; + while((s = r.readLine()) != null) { + val += s; + } + r.close(); + var toc = eval("("+val+")") + + var writeToc = function(o, children, level) { + for(var c in children) { + if (children[c].id) { + o.write(level + ' link:#' + children[c].id.replace(/\//g, '_') + '[' + children[c].title + ']\n'); + if (children[c].children && children[c].children.length && children[c].children.length != 0) { + writeToc(o, children[c].children, level+'*'); + } + } + } + }; + + var writeInclude = function(o, children) { + for(var c in children) { + if (children[c].id) { + o.write('= [[' + children[c].id.replace(/\//g, '_') + ']]' + children[c].title + '\n\n'); + o.write('include::../asciidoc/' + children[c].id + '.adoc[]\n\n'); + if (children[c].children && children[c].children.length && children[c].children.length != 0) { + writeInclude(o, children[c].children); + } + } + } + }; + + out = new java.io.FileWriter(self.getProject().resolveFile(attributes.get("destfile"))); + out.write('= Table of Contents\n\n'); + writeToc(out, toc.children[0].children, '*'); + out.write('\n\n'); + writeInclude(out, toc.children[0].children, '*'); + out.close(); + ]]> + </scriptdef> + <mkdir dir="${work.dir}/book" /> + <generate-book-adoc jsontocfile="${src.doc.dir}/toc.json" destFile="${work.dir}/book/book.adoc" /> + </target> + + <target name="generate-dist-doc-book" depends="compute-version,init-asciidoctor,generate-dist-doc-book-adoc"> + <asciidoctor:convert sourceDirectory="${work.dir}/book" outputDirectory="${dist.work.dir}/apache-ivyde-${build.version}/doc" backend="xhtml5" + templateDir="${src.doc.dir}/templates/book" sourceHighlighter="highlightjs" doctype="book"> + <attribute key="version" value="${build.version}" /> + </asciidoctor:convert> + </target> + + <target name="generate-dist-doc-articles" depends="compute-version,init-asciidoctor"> + <asciidoctor:convert sourceDirectory="${src.doc.dir}" outputDirectory="${dist.work.dir}/apache-ivyde-${build.version}/doc" backend="xhtml5" + templateDir="${src.doc.dir}/templates" sourceHighlighter="highlightjs" preserveDirectories="true"> <attribute key="basedir" value="${src.doc.dir}"/> <attribute key="imagesdir" value=""/> <attribute key="version" value="${build.version}" /> </asciidoctor:convert> </target> + <target name="generate-dist-doc-html" depends="generate-dist-doc-articles,generate-dist-doc-book" /> + <target name="package-binaries" depends="build,generate-p2-category,generate-dist-doc-files,generate-dist-doc-html"> <mkdir dir="${dist.work.dir}/apache-ivyde-${build.version}" /> <unzip src="${eclipse.work.dir}/${build.version}/org.apache.ivyde.feature-${build.version}.zip" dest="${dist.work.dir}/apache-ivyde-${build.version}" /> @@ -597,12 +656,8 @@ forceContextQualifier=${jenkins.version.qualifier} </target> <target name="generate-eclipse-doc-html" depends="init-asciidoctor,compute-version" unless="skip.doc"> - <mkdir dir="${doc-eclipse.work.dir}/templates" /> - <copy todir="${doc-eclipse.work.dir}/templates"> - <fileset dir="${src.doc.dir}/templates" /> - </copy> - <copy file="${doc-eclipse.work.dir}/templates/document-eclipse.html.slim" tofile="${doc-eclipse.work.dir}/templates/document.html.slim" overwrite="true" /> - <asciidoctor:convert sourceDirectory="${src.doc.dir}" outputDirectory="${eclipse-doc.dir}" backend="xhtml5" templateDir="${doc-eclipse.work.dir}/templates" preserveDirectories="true"> + <asciidoctor:convert sourceDirectory="${src.doc.dir}" outputDirectory="${eclipse-doc.dir}" backend="xhtml5" + templateDir="${src.doc.dir}/templates/eclipse" preserveDirectories="true"> <attribute key="basedir" value="${src.doc.dir}"/> <attribute key="imagesdir" value=""/> <attribute key="version" value="${build.version}" />
