Michael Blow | fc64482 | 2016-03-16 10:21:24 -0400 | [diff] [blame] | 1 | <!-- |
| 2 | ! Licensed to the Apache Software Foundation (ASF) under one |
| 3 | ! or more contributor license agreements. See the NOTICE file |
| 4 | ! distributed with this work for additional information |
| 5 | ! regarding copyright ownership. The ASF licenses this file |
| 6 | ! to you under the Apache License, Version 2.0 (the |
| 7 | ! "License"); you may not use this file except in compliance |
| 8 | ! with the License. You may obtain a copy of the License at |
| 9 | ! |
| 10 | ! http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | ! |
| 12 | ! Unless required by applicable law or agreed to in writing, |
| 13 | ! software distributed under the License is distributed on an |
| 14 | ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | ! KIND, either express or implied. See the License for the |
| 16 | ! specific language governing permissions and limitations |
| 17 | ! under the License. |
| 18 | !--> |
| 19 | |
| 20 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| 21 | <modelVersion>4.0.0</modelVersion> |
| 22 | <artifactId>asterix-coverage</artifactId> |
| 23 | <packaging>pom</packaging> |
| 24 | <name>asterix-coverage</name> |
| 25 | |
| 26 | <parent> |
| 27 | <groupId>org.apache.asterix</groupId> |
Ian Maxon | 3da9d06 | 2016-03-16 17:05:31 -0700 | [diff] [blame] | 28 | <artifactId>apache-asterixdb</artifactId> |
AsterixDB Jenkins | 478eccb | 2018-08-31 14:57:31 -0700 | [diff] [blame^] | 29 | <version>0.9.5-SNAPSHOT</version> |
Michael Blow | fc64482 | 2016-03-16 10:21:24 -0400 | [diff] [blame] | 30 | </parent> |
| 31 | |
Michael Blow | 4cd925c | 2018-01-20 17:15:38 -0500 | [diff] [blame] | 32 | <properties> |
| 33 | <root.dir>${basedir}/..</root.dir> |
| 34 | </properties> |
| 35 | |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 36 | <profiles> |
| 37 | <profile> |
| 38 | <id>coverage</id> |
| 39 | <activation> |
| 40 | <property> |
| 41 | <name>coverage</name> |
| 42 | </property> |
| 43 | </activation> |
| 44 | <build> |
| 45 | <plugins> |
| 46 | <plugin> |
| 47 | <groupId>org.apache.maven.plugins</groupId> |
| 48 | <artifactId>maven-antrun-plugin</artifactId> |
| 49 | <version>1.8</version> |
| 50 | <executions> |
| 51 | <execution> |
| 52 | <phase>test</phase> |
| 53 | <goals> |
| 54 | <goal>run</goal> |
| 55 | </goals> |
| 56 | <configuration> |
| 57 | <target if="coverage" unless="skipTests"> |
| 58 | <echo message="Generating JaCoCo Reports" /> |
Michael Blow | 380b0a2 | 2016-08-02 13:05:52 -0400 | [diff] [blame] | 59 | <property name="asterix.dir" location="${basedir}/../.." /> |
Michael Blow | 7cd7c2d | 2016-05-27 21:01:50 -0400 | [diff] [blame] | 60 | |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 61 | <!-- gather all of the source dirs --> |
| 62 | <pathconvert property="source.dirs" pathsep=","> |
| 63 | <dirset dir="${asterix.dir}"> |
Michael Blow | 380b0a2 | 2016-08-02 13:05:52 -0400 | [diff] [blame] | 64 | <include name="**/src/main/java" /> |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 65 | </dirset> |
| 66 | </pathconvert> |
Michael Blow | 7cd7c2d | 2016-05-27 21:01:50 -0400 | [diff] [blame] | 67 | |
Michael Blow | 380b0a2 | 2016-08-02 13:05:52 -0400 | [diff] [blame] | 68 | <echo message="asterix dir: ${asterix.dir}/" /> |
| 69 | <echo message="asterix source dirs: ${source.dirs}/" /> |
Michael Blow | fc64482 | 2016-03-16 10:21:24 -0400 | [diff] [blame] | 70 | |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 71 | <taskdef name="report" classname="org.jacoco.ant.ReportTask"> |
| 72 | <classpath path="${basedir}/target/jacoco-jars/org.jacoco.ant.jar" /> |
| 73 | </taskdef> |
| 74 | <mkdir dir="${basedir}/target/coverage-report" /> |
| 75 | <report> |
| 76 | <executiondata> |
Michael Blow | fc64482 | 2016-03-16 10:21:24 -0400 | [diff] [blame] | 77 | <fileset dir="${asterix.dir}"> |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 78 | <include name="**/jacoco.exec" /> |
Michael Blow | fc64482 | 2016-03-16 10:21:24 -0400 | [diff] [blame] | 79 | </fileset> |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 80 | </executiondata> |
| 81 | <structure name="AsterixDB Coverage Project"> |
| 82 | <group name="AsterixDB"> |
| 83 | <classfiles> |
| 84 | <fileset dir="${asterix.dir}"> |
Michael Blow | 380b0a2 | 2016-08-02 13:05:52 -0400 | [diff] [blame] | 85 | <include name="**/target/classes/**/*.class" /> |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 86 | </fileset> |
| 87 | </classfiles> |
| 88 | <sourcefiles encoding="UTF-8"> |
| 89 | <multirootfileset basedirs="${source.dirs}" type="file"> |
Michael Blow | 380b0a2 | 2016-08-02 13:05:52 -0400 | [diff] [blame] | 90 | <include name="**/*.java" /> |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 91 | </multirootfileset> |
| 92 | </sourcefiles> |
| 93 | </group> |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 94 | </structure> |
| 95 | <html destdir="${basedir}/target/coverage-report/html" /> |
| 96 | <xml destfile="${basedir}/target/coverage-report/coverage-report.xml" /> |
| 97 | <csv destfile="${basedir}/target/coverage-report/coverage-report.csv" /> |
| 98 | </report> |
| 99 | </target> |
| 100 | </configuration> |
| 101 | </execution> |
| 102 | </executions> |
| 103 | <dependencies> |
| 104 | <dependency> |
| 105 | <groupId>org.jacoco</groupId> |
| 106 | <artifactId>org.jacoco.ant</artifactId> |
| 107 | <version>${jacoco.version}</version> |
| 108 | </dependency> |
| 109 | </dependencies> |
| 110 | </plugin> |
| 111 | <plugin> |
Michael Blow | fc64482 | 2016-03-16 10:21:24 -0400 | [diff] [blame] | 112 | <groupId>org.jacoco</groupId> |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 113 | <artifactId>jacoco-maven-plugin</artifactId> |
Michael Blow | fc64482 | 2016-03-16 10:21:24 -0400 | [diff] [blame] | 114 | <version>${jacoco.version}</version> |
Michael Blow | 7c15c13 | 2016-05-04 22:06:34 -0400 | [diff] [blame] | 115 | <executions> |
| 116 | <execution> |
| 117 | <goals> |
| 118 | <goal>merge</goal> |
| 119 | </goals> |
| 120 | <phase>test</phase> |
| 121 | <configuration> |
| 122 | <fileSets> |
| 123 | <fileSet> |
| 124 | <directory>${session.executionRootDirectory}</directory> |
| 125 | <includes> |
| 126 | <include>**/target/jacoco.exec</include> |
| 127 | <include>**/target/jacoco-it.exec</include> |
| 128 | </includes> |
| 129 | </fileSet> |
| 130 | </fileSets> |
| 131 | <destFile>${session.executionRootDirectory}/target/jacoco-merged.exec</destFile> |
| 132 | </configuration> |
| 133 | </execution> |
| 134 | </executions> |
| 135 | </plugin> |
| 136 | </plugins> |
| 137 | </build> |
| 138 | </profile> |
| 139 | </profiles> |
| 140 | |
Michael Blow | fc64482 | 2016-03-16 10:21:24 -0400 | [diff] [blame] | 141 | </project> |