With Maven Unable to genearate xslt reports | Selenium Forum
M
Posted on 11/02/2016
I am using reporting with maven to generate xslt reports but getting following error while executing

mvn test site







I am using reporting with maven to generate xslt reports but getting following error while executing




[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:si

te (default-site) on project learntestngmaven: failed to get report for org.repo

rtyng:reporty-ng: Plugin org.reportyng:reporty-ng:1.2 or one of its dependencies

could not be resolved: Failed to read artifact descriptor for org.reportyng:rep

orty-ng:jar:1.2: Could not transfer artifact org.reportyng:reporty-ng:pom:1.2 fr

om/to Rep3 (https://xxxxxxxxxxx): sun.se

curity.validator.ValidatorException: PKIX path building failed: sun.security.pro

vider.certpath.SunCertPathBuilderException: unable to find valid certification p

ath to requested target

in my pom.xml I have.

<?xml version="1.0"?>

-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">

<modelVersion>4.0.0</modelVersion>

<groupId>com.testngproject</groupId>

project

<version>1</version>

<packaging>jar</packaging>

<name>learntestng</name>

<url>http://maven.apache.org</url>


-<properties>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

</properties>


-<dependencies>


-<dependency>

<groupId>org.testng</groupId>

<artifactId>testng</artifactId>

<version>6.9.10</version>

<scope>test</scope>

</dependency>

</dependencies>


-<build>


-<plugins>


-<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-report-plugin</artifactId>


-<configuration>


-<suiteXmlFiles>

<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>

</suiteXmlFiles>

<!-- Skip the normal tests, we'll run them in the integration-test phase -->


<skip>true</skip>

</configuration>

</plugin>

</plugins>

</build>


-<reporting>


-<plugins>

<!-- TestNG-xslt related configuration. -->



-<plugin>

<groupId>org.reportyng</groupId>

<artifactId>reporty-ng</artifactId>

<version>1.2</version>


-<configuration>

<!-- Output directory for the testng xslt report -->


<outputdir>/target/testng-xslt-report</outputdir>

<sorttestcaselinks>true</sorttestcaselinks>

<testdetailsfilter>FAIL,SKIP,PASS,CONF,BY_CLASS</testdetailsfilter>

<showruntimetotals>true</showruntimetotals>

</configuration>

</plugin>

</plugins>

</reporting>


-<pluginRepositories>


-<pluginRepository>

<id>reporty-ng</id>

<url>https://github.com/cosminaru/reporty-ng/raw/master/dist/maven</url>

</pluginRepository>

</pluginRepositories>

</project>


































-<pluginRepositories>


-<pluginRepository>

<id>reporty-ng</id>

<url>https://github.com/cosminaru/reporty-ng/raw/master/dist/maven</url>

</pluginRepository>

</pluginRepositories>

</project>

Note: It seems this repository is closed https://github.com/cosminaru/reporty-ng/raw/master/dist/maven
Please let me know, how can I resolve this issues.


Thanks.

M
Replied on 11/02/2016

reporty ng has been deprecated you cannot make xslt reports from maven you have to use ANT.

if you are not using ANT and want to make good looking reports with maven use this

1. go to this link <http://relevantcodes.com/testng-listener-using-extentreports/>
2. create class "ExtentReporterNG". This is Listener class and put second block code in it from upper link and save it.
3. put ExtentReporterNG this listener in your testneg.xml. change package name with your package name.
<listeners>
<listener class-name="package.ExtentReporterNG" />
</listeners>
4. Add dependency in you POM.xml
<!-- Extent Reports -->
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.04</version>
</dependency>

5. now open cmd prompt and go to your project location and run command "mvn compile" and after it run "mvn package"
6. go in eclipse and refresh your project and run your testng.xml
7. after running refresh your project and check report in test output folder.
8. a folder generate with your class name. check extent.html in it and open this in web browser.