Browse Source

build: Activate JaCoCo explicitly for Ant build

When building with Ant, instead of Moxie, JaCoCo is not included in the
classpath. So explicitly initialise the full `jacocoant.jar` from the
`.moxie` repository.

For this we had to switch the dependency to use the `nodeps` jar which
includes all dependencies.
tags/v1.9.2
Florian Zschocke 3 years ago
parent
commit
6d694fd39b
2 changed files with 10 additions and 3 deletions
  1. 1
    1
      build.moxie
  2. 9
    2
      build.xml

+ 1
- 1
build.moxie View File

@@ -192,5 +192,5 @@ dependencies:
- test 'org.mockito:mockito-core:1.10.19'
# Dependencies with the "build" scope are retrieved
# and injected into the Ant runtime classpath
- build 'org.jacoco:org.jacoco.ant:0.8.4'
- build 'org.jacoco:org.jacoco.ant:0.8.4:nodeps'
- build 'org.parboiled:parboiled-java:1.3.1'

+ 9
- 2
build.xml View File

@@ -12,7 +12,9 @@
<property name="moxie.url" value="http://gitblit.github.io/moxie/maven" />
<property name="moxie.jar" value="moxie-toolkit-${moxie.version}.jar" />
<property name="moxie.dir" value="${user.home}/.moxie" />
<property name="jacoco.version" value="0.8.4" />
<!-- Download Moxie from it's Maven repository to user.home -->
<mkdir dir="${moxie.dir}" />
<get src="${moxie.url}/com/gitblit/moxie/moxie-toolkit/${moxie.version}/${moxie.jar}"
@@ -46,7 +48,12 @@
If it exists, build.properties is automatically loaded.
Explicitly set mxroot allowing CI servers to override the default. -->
<mx:init verbose="no" mxroot="${moxie.dir}" />
<!-- Register JaCoCo tasks -->
<taskdef uri="antlib:org.jacoco.ant">
<classpath location="${moxie.dir}/remote/repo1.maven.org_maven2/org/jacoco/org.jacoco.ant/${jacoco.version}/org.jacoco.ant-${jacoco.version}-nodeps.jar" />
</taskdef>
<!-- Set Ant project properties -->
<property name="release.tag" value="v${project.version}" />
<property name="currentRelease.tag" value="v${project.releaseVersion}" />

Loading…
Cancel
Save