Open ekincanufuktepe opened 3 years ago
Just to add additional information after a couple of more attempts to fix the issue. I think the issue in #33 seems to be a similar problem that I am currently experiencing. So, I tried the solution for issue #33. Now I have reports generated, but my coverage matrix report is empty, along with the other generated files. I am using the command below:
mvn test -Pgzoltarp -Djacoco.skip=true -Drat.skip=true -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
My updated pom.xml
file is also given below:
<?xml version="1.0" encoding="UTF-8"?>
<!-- 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. -->
<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">
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>52</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.5-SNAPSHOT</version>
<name>Apache Commons CLI</name>
<inceptionYear>2002</inceptionYear>
<description>
Apache Commons CLI provides a simple API for presenting, processing and validating a command line interface.
</description>
<url>https://commons.apache.org/proper/commons-cli/</url>
<issueManagement>
<system>jira</system>
<url>https://issues.apache.org/jira/browse/CLI</url>
</issueManagement>
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/commons-cli.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/commons-cli.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=commons-cli.git</url>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<name>James Strachan</name>
<id>jstrachan</id>
<email>jstrachan@apache.org</email>
<organization>SpiritSoft, Inc.</organization>
</developer>
<developer>
<name>Bob McWhirter</name>
<id>bob</id>
<email>bob@werken.com</email>
<organization>Werken</organization>
<roles>
<role>contributed ideas and code from werken.opt</role>
</roles>
</developer>
<developer>
<name>John Keyes</name>
<id>jkeyes</id>
<email>jbjk@mac.com</email>
<organization>integral Source</organization>
<roles>
<role>contributed ideas and code from Optz</role>
</roles>
</developer>
<developer>
<name>Rob Oxspring</name>
<id>roxspring</id>
<email>roxspring@imapmail.org</email>
<organization>Indigo Stone</organization>
<roles>
<role>designed CLI2</role>
</roles>
</developer>
<developer>
<name>Emmanuel Bourg</name>
<id>ebourg</id>
<email>ebourg@apache.org</email>
<organization>Ariane Software</organization>
</developer>
<developer>
<name>Thomas Neidhart</name>
<id>tn</id>
<email>tn@apache.org</email>
</developer>
<developer>
<name>Rob Tompkins</name>
<id>chtompki</id>
<email>chtompki@apache.org</email>
</developer>
</developers>
<contributors>
<contributor>
<name>Beluga Behr</name>
</contributor>
<contributor>
<name>Peter Donald</name>
<roles>
<role>contributed ideas and code from Avalon Excalibur's cli package</role>
</roles>
</contributor>
<contributor>
<name>Brian Egge</name>
<roles>
<role>made the 1.1 release happen</role>
</roles>
</contributor>
<contributor>
<name>Duncan Jones</name>
<roles>
<role>supplied patches</role>
</roles>
</contributor>
<contributor>
<name>Berin Loritsch</name>
<email>bloritsch@apache.org</email>
<roles>
<role>helped in the Avalon CLI merge</role>
</roles>
</contributor>
<contributor>
<name>Peter Maddocks</name>
<email>peter_maddocks@hp.com</email>
<organization>Hewlett-Packard</organization>
<roles>
<role>supplied patch</role>
</roles>
</contributor>
<contributor>
<name>Alexandru Mocanu</name>
<roles>
<role>supplied patch</role>
</roles>
</contributor>
<contributor>
<name>Andrew Shirley</name>
<roles>
<role>lots of fixes for 1.1</role>
</roles>
</contributor>
<contributor>
<name>Greg Thomas</name>
</contributor>
<contributor>
<name>Slawek Zachcial</name>
<roles>
<role>unit tests</role>
</roles>
</contributor>
<contributor>
<name>Rubin Simons</name>
<email>rubin@raaftech.com</email>
<roles>
<role>supplied patch</role>
</roles>
</contributor>
</contributors>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<commons.componentid>cli</commons.componentid>
<commons.module.name>org.apache.commons.cli</commons.module.name>
<commons.release.version>1.4</commons.release.version>
<commons.release.name>commons-cli-${commons.release.version}</commons.release.name>
<commons.osgi.symbolicName>org.apache.commons.cli</commons.osgi.symbolicName>
<commons.jira.id>CLI</commons.jira.id>
<commons.jira.pid>12310463</commons.jira.pid>
<!-- The RC version used in the staging repository URL. -->
<commons.rc.version>RC1</commons.rc.version>
<commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-cli</commons.scmPubUrl>
<commons.scmPubCheckoutDirectory>site-content</commons.scmPubCheckoutDirectory>
<commons.encoding>utf-8</commons.encoding>
</properties>
<build>
<defaultGoal>clean package apache-rat:check clirr:check checkstyle:check findbugs:check javadoc:javadoc</defaultGoal>
<plugins>
<plugin>
<groupId>com.gzoltar</groupId>
<artifactId>com.gzoltar.maven</artifactId>
<version>1.7.3-SNAPSHOT</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>fl-report</goal>
</goals>
<configuration>
<granularity>line</granularity>
<flFamilies>
<flFamily>
<name>sfL</name>
<formulas>
<formula>barinel</formula>
</formulas>
<formatters>
<format implementation="com.gzoltar.report.fl.config.ConfigTxtReportFormatter"/></formatters>
<metrics>
<metric>rho</metric>
<metric>ambiguity</metric>
<metric>entropy</metric>
<!--<metric>...</metric>-->
</metrics>
</flFamily>
</flFamilies>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<properties>
<property>
<name>listener</name>
<value>com.gzoltar.internal.core.listeners.JUnitListener</value>
</property>
</properties>
<argLine>@{argLine} -Xmx6G</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
<descriptor>src/assembly/src.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
</plugin>
<!-- Fix for https://bugs.openjdk.java.net/browse/JDK-8212233 which is
addressed in maven-javadoc-plugin:3.1.0, see https://issues.apache.org/jira/browse/MJAVADOC-562 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${commons.javadoc.version}</version>
<configuration>
<source>7</source>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<configuration>
<ignorePathsToDelete>
<ignorePathToDelete>javadocs**</ignorePathToDelete>
</ignorePathsToDelete>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${commons.checkstyle-plugin.version}</version>
<configuration>
<configLocation>${basedir}/src/conf/checkstyle.xml</configLocation>
<enableRulesSummary>false</enableRulesSummary>
<suppressionsLocation>${basedir}/src/conf/checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${commons.rat.version}</version>
<!-- Should agree with config in build section -->
<configuration>
<excludes>
<exclude>.asf.yaml</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${commons.findbugs.version}</version>
<configuration>
<threshold>Normal</threshold>
<effort>Default</effort>
<excludeFilterFile>${basedir}/src/conf/findbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<linksource>true</linksource>
<links>
<link>http://download.oracle.com/javase/6/docs/api</link>
</links>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${commons.checkstyle-plugin.version}</version>
<configuration>
<configLocation>${basedir}/src/conf/checkstyle.xml</configLocation>
<enableRulesSummary>false</enableRulesSummary>
<suppressionsLocation>${basedir}/src/conf/checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${commons.rat.version}</version>
<!-- Should agree with config in build section -->
<configuration>
<excludes>
<exclude>.asf.yaml</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${commons.findbugs.version}</version>
<configuration>
<threshold>Normal</threshold>
<effort>Default</effort>
<excludeFilterFile>${basedir}/src/conf/findbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.14.0</version>
<configuration>
<targetJdk>${maven.compiler.target}</targetJdk>
</configuration>
</plugin>
</plugins>
</reporting>
<distributionManagement>
<site>
<id>apache.website</id>
<name>Apache Commons Site</name>
<url>scm:svn:${commons.scmPubUrl}</url>
</site>
</distributionManagement>
<profiles>
<profile>
<id>rc</id>
<distributionManagement>
<!-- Cannot define in parent ATM, see COMMONSSITE-26 -->
<site>
<id>apache.website</id>
<name>Apache Commons Release Candidate Staging Site</name>
<url>${commons.deployment.protocol}://people.apache.org/www/people.apache.org/builds/commons/${commons.componentid}/${commons.release.version}/${commons.rc.version}/site</url>
</site>
</distributionManagement>
</profile>
<profile>
<id>setup-checkout</id>
<activation>
<file>
<missing>site-content</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>prepare-checkout</id>
<phase>pre-site</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<exec executable="svn">
<arg
line="checkout --depth immediates ${commons.scmPubUrl} ${commons.scmPubCheckoutDirectory}" />
</exec>
<exec executable="svn">
<arg
line="update --set-depth exclude ${commons.scmPubCheckoutDirectory}/javadocs" />
</exec>
<pathconvert pathsep=" " property="dirs">
<dirset dir="${commons.scmPubCheckoutDirectory}"
includes="*" />
</pathconvert>
<exec executable="svn">
<arg line="update --set-depth infinity ${dirs}" />
</exec>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
I also noticed a small warning at the bottom of my terminal, I don't know if it could be related to that warning or not.
[WARNING] Tests run: 409, Failures: 0, Errors: 0, Skipped: 54
[INFO]
[INFO]
[INFO] --- com.gzoltar.maven:1.7.3-SNAPSHOT:fl-report (post-unit-test) @ commons-cli ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.690 s
[INFO] Finished at: 2021-06-24T12:09:46-05:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "gzoltarp" could not be activated because it does not exist.
Hi @ekincanufuktepe,
I also noticed a small warning at the bottom of my terminal, I don't know if it could be related to that warning or not.
It does seem relevant yes. gzoltarp
is the name of the profile defined in #33 which does not exist in your pom.xml
file.
In any case, any chance you could share with me the project's repository you're trying to run GZoltar on?
-- Best, Jose
Hi @jose
Sure, I tested GZoltar on apache's commons-cli project. The commit hash that I tested is 3d90d5d8cb2f6f0e028000de5a11d66dd3890c75.
Thanks for the help!
Ekin
Context
I have been trying to use Gzoltar to generate a coverage matrix, and I have been using commons-cli to generate the coverage matrix. It seems that the
mvn test-compile
works fine, but when I run themvn test
command I get the error and warning message given belowI checked the surefire-reports, then I find the report given below. This is when I used with the
com.gzoltar.internal.core.listeners.TestNGListener
I believe, I followed the instructions given in
So, I tried it with the other listener
com.gzoltar.internal.core.listeners.JUnitListener
, but I got a similar report in the surefire-reports, as given belowI believe I followed the instructions from Maven plug-in Instructions, but maybe I misinterpreted an instruction or missed a step. I also shared the
pom.xml
file I used for Gzoltar below.At the bottom of my terminal output, I also received the message
My environment setup is
I also shared/attached a screenshot of the error message I have been getting. If any additional information is required, please let me know!
Thanks in advance!