mirror of https://github.com/apache/ant-ivy
Merge 45e5f8b8d1 into 6546134471
This commit is contained in:
commit
f71816a14f
|
|
@ -20,21 +20,17 @@ package org.apache.ivy.asciidoc;
|
|||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.asciidoctor.ast.AbstractBlock;
|
||||
import org.asciidoctor.ast.ContentNode;
|
||||
import org.asciidoctor.extension.InlineMacroProcessor;
|
||||
|
||||
public class JiraMacro extends InlineMacroProcessor {
|
||||
|
||||
public JiraMacro(String macroName, Map<String, Object> config) {
|
||||
super(macroName, config);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String process(AbstractBlock parent, String target, Map<String, Object> attributes) {
|
||||
public String process(ContentNode 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();
|
||||
return createPhraseNode(parent, "anchor", target, attributes, options).convert();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@
|
|||
</target>
|
||||
|
||||
<target name="init-asciidoctor-extensions" depends="init-ivy" unless="skip.doc">
|
||||
<ivy:cachepath pathid="asciidoctorj.path" organisation="org.asciidoctor" module="asciidoctorj" revision="1.5.7" conf="default" inline="true"/>
|
||||
<ivy:cachepath pathid="asciidoctorj.path" organisation="org.asciidoctor" module="asciidoctorj" revision="1.6.2" conf="default" inline="true"/>
|
||||
<mkdir dir="${build.dir}/asciidoc-extensions/classes"/>
|
||||
<javac srcdir="${doc.src.dir}/templates/extensions/src" destdir="${build.dir}/asciidoc-extensions/classes"
|
||||
debug="true" includeantruntime="no" classpathref="asciidoctorj.path"/>
|
||||
|
|
@ -182,7 +182,7 @@
|
|||
<target name="init-asciidoctor" depends="init-asciidoctor-extensions" unless="skip.doc">
|
||||
<mkdir dir="${build.dir}/asciidoc-lib/jars"/>
|
||||
<mkdir dir="${build.dir}/asciidoc-lib/classes"/>
|
||||
<ivy:retrieve organisation="org.asciidoctor" module="asciidoctor-ant" revision="1.5.5" conf="default" inline="true" pattern="${build.dir}/asciidoc-lib/jars/[artifact].[ext]"/>
|
||||
<ivy:retrieve organisation="org.asciidoctor" module="asciidoctor-ant" revision="1.6.2" conf="default" inline="true" pattern="${build.dir}/asciidoc-lib/jars/[artifact].[ext]"/>
|
||||
<unzip src="${build.dir}/asciidoc-lib/jars/asciidoctor-ant.jar" dest="${build.dir}/asciidoc-lib/classes"/>
|
||||
<taskdef uri="antlib:org.asciidoctor.ant" resource="org/asciidoctor/ant/antlib.xml">
|
||||
<classpath>
|
||||
|
|
|
|||
52
build.xml
52
build.xml
|
|
@ -526,7 +526,7 @@
|
|||
</target>
|
||||
|
||||
<target name="init-japicmp" depends="jar" unless="skip.test">
|
||||
<ivy:cachepath organisation="com.github.siom79.japicmp" module="japicmp-ant-task" revision="0.13.0"
|
||||
<ivy:cachepath organisation="com.github.siom79.japicmp" module="japicmp-ant-task" revision="0.14.1"
|
||||
inline="true" conf="default" pathid="japicmp.classpath" log="download-only"/>
|
||||
<taskdef uri="antlib:japicmp.ant" resource="japicmp/ant/antlib.xml"
|
||||
classpathref="japicmp.classpath"/>
|
||||
|
|
@ -643,26 +643,9 @@
|
|||
</target>
|
||||
|
||||
<target name="init-findbugs" unless="findbugs.home">
|
||||
<!-- Findbugs: Getting Findbugs requires unlimited strength crypto policy -->
|
||||
<property name="findbugs.version"
|
||||
value="3.0.1"
|
||||
<property name="spotbugs.version"
|
||||
value="3.1.12"
|
||||
description="Version of Findbugs to use"/>
|
||||
<property name="findbugs.download.name"
|
||||
value="findbugs-${findbugs.version}"
|
||||
description="Name of the download file without suffix. Also the internal root directory of the ZIP."/>
|
||||
<property name="findbugs.download.file"
|
||||
value="${findbugs.download.name}.zip"
|
||||
description="The filename of the ZIP."/>
|
||||
<property name="findbugs.download.url"
|
||||
value="https://downloads.sourceforge.net/project/findbugs/findbugs/${findbugs.version}/findbugs-${findbugs.version}.zip"
|
||||
description="The download adress at a mirror of Sourceforge."/>
|
||||
<property name="findbugs.download.to"
|
||||
value="${build.dir}/.downloads"
|
||||
description="Where to store the download and 'install' Findbugs."/>
|
||||
<available property="findbugs.home"
|
||||
value="${findbugs.download.to}/${findbugs.download.name}"
|
||||
file="${findbugs.download.to}/${findbugs.download.name}/lib/findbugs.jar"
|
||||
description="Check if Findbugs is already installed."/>
|
||||
|
||||
<!-- Findbugs: Running Findbugs -->
|
||||
<property name="findbugs.reportdir"
|
||||
|
|
@ -677,37 +660,32 @@
|
|||
<property name="findbugs.jvmargs"
|
||||
value="-Xms128m -Xmx512m"
|
||||
description="JVMArgs for invoking Findbugs"/>
|
||||
|
||||
<mkdir dir="${findbugs.download.to}"/>
|
||||
<get src="${findbugs.download.url}" dest="${findbugs.download.to}/${findbugs.download.file}"
|
||||
usetimestamp="true" skipexisting="true"/>
|
||||
<unzip src="${findbugs.download.to}/${findbugs.download.file}" dest="${findbugs.download.to}"/>
|
||||
<property name="findbugs.home" location="${findbugs.download.to}/${findbugs.download.name}"/>
|
||||
</target>
|
||||
|
||||
<target name="findbugs" description="checks Ivy codebase with Findbugs" depends="init-findbugs,compile-core" xmlns:fb="http://findbugs.sourceforge.net/">
|
||||
<!-- Load the Findbugs AntTasks -->
|
||||
<path id="findbugs.real.classpath">
|
||||
<fileset dir="${findbugs.home}/lib" includes="*.jar"/>
|
||||
</path>
|
||||
<taskdef uri="http://findbugs.sourceforge.net/" resource="edu/umd/cs/findbugs/anttask/tasks.properties" classpathref="findbugs.real.classpath"/>
|
||||
<target name="findbugs" description="checks Ivy codebase with Spotbugs" depends="init-findbugs,compile-core"
|
||||
xmlns:fb="http://findbugs.sourceforge.net/">
|
||||
<ivy:cachepath organisation="com.github.spotbugs" module="spotbugs-ant" revision="${spotbugs.version}"
|
||||
inline="true" conf="default" pathid="spotbugs.classpath"/>
|
||||
<!-- Load the SpotBugs AntTasks -->
|
||||
<taskdef uri="http://findbugs.sourceforge.net/" resource="edu/umd/cs/findbugs/anttask/tasks.properties"
|
||||
classpathref="spotbugs.classpath"/>
|
||||
|
||||
<!-- Start Findbugs -->
|
||||
<!-- Start SpotBugs -->
|
||||
<mkdir dir="${findbugs.reportdir}"/>
|
||||
<fb:findbugs home="${findbugs.home}"
|
||||
classpathref="findbugs.real.classpath"
|
||||
<fb:spotbugs classpathref="spotbugs.classpath"
|
||||
output="xml:withMessages"
|
||||
outputFile="${findbugs.reportdir}/${findbugs.raw}"
|
||||
jvmargs="${findbugs.jvmargs}"
|
||||
projectName="${ant.project.name} ${target.ivy.version}">
|
||||
<class location="${core.classes.build.dir}"/>
|
||||
<sourcePath path="${src.dir}"/>
|
||||
</fb:findbugs>
|
||||
<auxClasspath refid="lib.classpath"/>
|
||||
</fb:spotbugs>
|
||||
|
||||
<!-- Generate (human) readable output -->
|
||||
<xslt basedir="${findbugs.reportdir}" includes="${findbugs.raw}" destdir="${findbugs.reportdir}">
|
||||
<style>
|
||||
<javaresource name="${findbugs.xsl}" classpathref="findbugs.real.classpath"/>
|
||||
<javaresource name="${findbugs.xsl}" classpathref="spotbugs.classpath"/>
|
||||
</style>
|
||||
</xslt>
|
||||
</target>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,16 @@
|
|||
<!-- Items moved out of TreeWalker for new versions of Checkstyle -->
|
||||
<module name="FileLength"/>
|
||||
<module name="FileTabCharacter"/>
|
||||
<module name="LineLength">
|
||||
<property name="max" value="100"/>
|
||||
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
|
||||
<property name="tabWidth" value="4"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<!-- \s matches whitespace character, $ matches end of line. -->
|
||||
<property name="format" value="\s+$"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<!-- Javadoc requirements -->
|
||||
|
|
@ -37,7 +47,7 @@
|
|||
<!--
|
||||
<module name="JavadocMethod">
|
||||
<property name="scope" value="protected"/>
|
||||
<property name="allowUndeclaredRTE" value="true"/>
|
||||
<!-- <property name="allowUndeclaredRTE" value="true"/> -->
|
||||
</module>
|
||||
<module name="JavadocVariable">
|
||||
<property name="scope" value="public"/>
|
||||
|
|
@ -62,13 +72,6 @@
|
|||
<module name="UnusedImports"/>
|
||||
|
||||
<!-- size limits -->
|
||||
<!--
|
||||
<module name="LineLength">
|
||||
<property name="max" value="100"/>
|
||||
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
|
||||
<property name="tabWidth" value="4"/>
|
||||
</module>
|
||||
-->
|
||||
<module name="MethodLength"/>
|
||||
<module name="ParameterNumber"/>
|
||||
|
||||
|
|
@ -134,11 +137,11 @@
|
|||
<property name="message" value="Line has trailing spaces."/>
|
||||
</module>
|
||||
-->
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<!-- \s matches whitespace character, $ matches end of line. -->
|
||||
<property name="format" value="\s+$"/>
|
||||
<module name="SuppressionCommentFilter">
|
||||
<property name="offCommentFormat" value="CheckStyle\:([\w\|]+) *OFF"/>
|
||||
<property name="onCommentFormat" value="CheckStyle\:([\w\|]+) *ON"/>
|
||||
<property name="checkFormat" value="$1"/>
|
||||
</module>
|
||||
</module>
|
||||
|
||||
<!--
|
||||
|
|
@ -152,5 +155,4 @@
|
|||
<module name="SuppressionFilter">
|
||||
<property name="file" value="${checkstyle.src.dir}/checkstyle-suppress.xml"/>
|
||||
</module>
|
||||
|
||||
</module>
|
||||
|
|
|
|||
Loading…
Reference in New Issue