ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject ant-ivyde git commit: doc: add a macro to make simpler links to Jira
Date Sun, 16 Jul 2017 11:21:01 GMT
Repository: ant-ivyde
Updated Branches:
  refs/heads/master dbf44a069 -> e7bb8c2d9


doc: add a macro to make simpler links to Jira


Project: http://git-wip-us.apache.org/repos/asf/ant-ivyde/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivyde/commit/e7bb8c2d
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivyde/tree/e7bb8c2d
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivyde/diff/e7bb8c2d

Branch: refs/heads/master
Commit: e7bb8c2d98f1f47adc63ba446fa307b574b74826
Parents: dbf44a0
Author: Nicolas Lalevée <nicolas.lalevee@hibnet.org>
Authored: Sun Jul 16 13:05:09 2017 +0200
Committer: Nicolas Lalevée <nicolas.lalevee@hibnet.org>
Committed: Sun Jul 16 13:05:09 2017 +0200

----------------------------------------------------------------------
 build.xml                                       | 24 +++++++++++-
 .../src/org/apache/ivy/asciidoc/JiraMacro.java  | 40 ++++++++++++++++++++
 doc/src/release-notes.adoc                      | 16 ++++----
 3 files changed, 70 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/e7bb8c2d/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index bbf8363..214e053 100644
--- a/build.xml
+++ b/build.xml
@@ -65,9 +65,26 @@
         <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
classpathref="ivy.lib.path"/>
     </target>
 
-    <target name="init-asciidoctor" depends="init-ivy">
+    <target name="init-asciidoctor-extensions" depends="init-ivy" unless="skip.doc">
+        <ivy:cachepath pathid="asciidoctorj.path" organisation="org.asciidoctor" module="asciidoctorj"
revision="1.5.5" inline="true"/>
+        <mkdir dir="${work.dir}/asciidoc-extensions/classes"/>
+        <javac srcdir="${doc.dir}/extensions/src" destdir="${work.dir}/asciidoc-extensions/classes"
+               debug="true" includeantruntime="no" classpathref="asciidoctorj.path"/>
+        <copy todir="${work.dir}/asciidoc-extensions/classes">
+            <fileset dir="${doc.dir}/extensions/src">
+                <exclude name="**/*.java"/>
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="init-asciidoctor" depends="init-asciidoctor-extensions">
         <ivy:cachepath pathid="asciidoctor.path" organisation="org.asciidoctor" module="asciidoctor-ant"
revision="1.5.4" inline="true"/>
-        <taskdef uri="antlib:org.asciidoctor.ant" resource="org/asciidoctor/ant/antlib.xml"
classpathref="asciidoctor.path"/>
+        <taskdef uri="antlib:org.asciidoctor.ant" resource="org/asciidoctor/ant/antlib.xml"
classpathref="asciidoctor.path">
+            <classpath>
+                <pathelement location="${work.dir}/asciidoc-extensions/classes" />
+                <path refid="asciidoctor.path" />
+            </classpath>
+        </taskdef>
     </target>
 
     <target name="/release" description="Make the build artifacts tagged with the release
version">
@@ -243,6 +260,7 @@
                              templateDir="${doc.dir}/templates/book" sourceHighlighter="highlightjs"
doctype="book">
             <attribute key="imagesdir" value=""/>
             <attribute key="version" value="${build.version}" />
+            <inlineMacroProcessor blockName="jira" className="org.apache.ivy.asciidoc.JiraMacro"
/>
         </asciidoctor:convert>
     </target>
 
@@ -252,6 +270,7 @@
             <attribute key="basedir" value="${src.doc.dir}"/>
             <attribute key="imagesdir" value=""/>
             <attribute key="version" value="${build.version}" />
+            <inlineMacroProcessor blockName="jira" className="org.apache.ivy.asciidoc.JiraMacro"
/>
         </asciidoctor:convert>
     </target>
 
@@ -671,6 +690,7 @@ forceContextQualifier=${jenkins.version.qualifier}
             <attribute key="basedir" value="${src.doc.dir}"/>
             <attribute key="imagesdir" value=""/>
             <attribute key="version" value="${build.version}" />
+            <inlineMacroProcessor blockName="jira" className="org.apache.ivy.asciidoc.JiraMacro"
/>
         </asciidoctor:convert>
     </target>
 

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/e7bb8c2d/doc/extensions/src/org/apache/ivy/asciidoc/JiraMacro.java
----------------------------------------------------------------------
diff --git a/doc/extensions/src/org/apache/ivy/asciidoc/JiraMacro.java b/doc/extensions/src/org/apache/ivy/asciidoc/JiraMacro.java
new file mode 100644
index 0000000..113520a
--- /dev/null
+++ b/doc/extensions/src/org/apache/ivy/asciidoc/JiraMacro.java
@@ -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.ivy.asciidoc;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import org.asciidoctor.ast.AbstractBlock;
+import org.asciidoctor.extension.InlineMacroProcessor;
+
+public class JiraMacro extends InlineMacroProcessor {
+
+    public JiraMacro(String macroName, Map<String, Object> config) {
+        super(macroName, config);
+    }
+
+    @Override
+    protected String process(AbstractBlock parent, String target, Map<String, Object>
attributes) {
+        Map<String, Object> options = new HashMap<String, Object>();
+        options.put("type", ":link");
+        options.put("target", "https://issues.apache.org/jira/browse/" + target);
+        return createInline(parent, "anchor", target, attributes, options).convert();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/e7bb8c2d/doc/src/release-notes.adoc
----------------------------------------------------------------------
diff --git a/doc/src/release-notes.adoc b/doc/src/release-notes.adoc
index 54e5c08..5c31f58 100644
--- a/doc/src/release-notes.adoc
+++ b/doc/src/release-notes.adoc
@@ -116,11 +116,11 @@ Contributors:
 == [[changes]]List of Changes in this Release
 
 List of changes since link:/ivy/ivyde/history/2.2.0.final/release-notes.html[Apache IvyDE
2.2.0 final]:
-    
-* FIX: xml bomb in workspace causes hang in Ivy code during Search or Synchronize operations
(link:https://issues.apache.org/jira/browse/IVYDE-354[IVYDE-354]) (thanks to Matt Hillsdon)
-* FIX: Deadlock in classpath container (link:https://issues.apache.org/jira/browse/IVYDE-361[IVYDE-361])
(thanks to Carsten Pfeiffer)
-* FIX: Typo in IvyResolveJob (link:https://issues.apache.org/jira/browse/IVYDE-362[IVYDE-362])
(thanks to Nicolas Gavalda)
-* FIX: User-selected configurations not checked in the viewer (link:https://issues.apache.org/jira/browse/IVYDE-378[IVYDE-378])
(thanks to Carsten Pfeiffer)
+
+* FIX: xml bomb in workspace causes hang in Ivy code during Search or Synchronize operations
(jira:IVYDE-354[]) (thanks to Matt Hillsdon)
+* FIX: Deadlock in classpath container (jira:IVYDE-361[]) (thanks to Carsten Pfeiffer)
+* FIX: Typo in IvyResolveJob (jira:IVYDE-362[]) (thanks to Nicolas Gavalda)
+* FIX: User-selected configurations not checked in the viewer (jira:IVYDE-378[]) (thanks
to Carsten Pfeiffer)
     
 * NEW: add support for OSGi 'Bundle-Classpath' directive (Ivy 2.4.0-rc1 is required)
 * NEW: basic support for the workspace resolver to find OSGi bundles managed by Ivy in the
workspace (Ivy 2.4.0-rc2 is required)
@@ -128,9 +128,9 @@ List of changes since link:/ivy/ivyde/history/2.2.0.final/release-notes.html[Apa
     
 ////
  samples
-* NEW: new new new (IVYDE-XXX) (thanks to XXX)
-* IMPROVE: improve improve improve (IVYDE-XXX) (thanks to XXX)
-* FIX: fix fix fix (IVYDE-XXX) (thanks to XXX)
+* NEW: new new new (jira:IVYDE-XXX[]) (thanks to XXX)
+* IMPROVE: improve improve improve (jira:IVYDE-XXX[]) (thanks to XXX)
+* FIX: fix fix fix (jira:IVYDE-XXX[]) (thanks to XXX)
 ////
 
 Most of our changes are logged in our JIRA, where you can find comments and links to our
subversion:


Mime
View raw message