Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 8 #90

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion asciidoc/release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Here is the list of people who have contributed source code and documentation up
* Gintautas Grigelionis
* Xavier Hanin
* Nicolas Lalevée
* Jan Matèrne
* Jan Matèrne
* Jaikiran Pai
* Jon Schneider
* Gilles Scokart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,17 @@
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();
}

}
6 changes: 3 additions & 3 deletions build-release.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand All @@ -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>
Expand Down Expand Up @@ -480,7 +480,7 @@

<target name="rat" depends="init-ivy">
<property name="rat.failOnError" value="true"/>
<ivy:cachepath organisation="org.apache.rat" module="apache-rat-tasks" revision="0.12"
<ivy:cachepath organisation="org.apache.rat" module="apache-rat-tasks" revision="0.13"
inline="true" conf="default" pathid="rat.classpath"
log="download-only"/>

Expand Down
54 changes: 16 additions & 38 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,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"/>
Expand Down Expand Up @@ -595,7 +595,7 @@
</target>

<target name="init-checkstyle" depends="jar">
<ivy:cachepath organisation="com.puppycrawl.tools" module="checkstyle" revision="6.19"
<ivy:cachepath organisation="com.puppycrawl.tools" module="checkstyle" revision="8.28"
inline="true" conf="default" pathid="checkstyle.classpath" log="download-only"/>
<taskdef uri="antlib:com.puppycrawl.tools.checkstyle.ant"
resource="com/puppycrawl/tools/checkstyle/ant/antlib.xml" classpathref="checkstyle.classpath"/>
Expand Down Expand Up @@ -637,26 +637,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"
Expand All @@ -671,37 +654,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>
Expand Down
36 changes: 17 additions & 19 deletions src/etc/checkstyle/checkstyle-config
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand All @@ -36,7 +46,7 @@
</module>
<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"/>
Expand All @@ -60,11 +70,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"/>

Expand Down Expand Up @@ -121,29 +126,22 @@
<!-- <module name="TodoComment"/> -->
<module name="UpperEll"/>
<!-- allow comment suppression of checks -->
<module name="FileContentsHolder"/>
<!-- <module name="FileContentsHolder"/> --><!-- removed in 8.2 -->
<!--
<module name="GenericIllegalRegexp">
<property name="format" value="\s+$"/>
<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>

<!-- <module name="au.com.redhillconsulting.simian.SimianCheck"/> -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle\:([\w\|]+) *OFF"/>
<property name="onCommentFormat" value="CheckStyle\:([\w\|]+) *ON"/>
<property name="checkFormat" value="$1"/>
</module>

<module name="SuppressionFilter">
<property name="file" value="${checkstyle.src.dir}/checkstyle-suppress.xml"/>
</module>

</module>
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ target.ivy.bundle.version.qualifier=alpha_
apache-ant.version=1.9.14
ant-contrib.version=1.0b3
bouncycastle.version=1.64
commons-vfs2.version=2.2
commons-vfs2.version=2.4.1
hamcrest.version=1.3
httpclient.version=4.5.10
jacoco.version=0.8.5
Expand Down