ExtentReports cannot be resolved to a type | Selenium Forum
S
Shashank Joshi Posted on 26/12/2018
Hi,

ExtentReports is not being recognized by Eclipse though I have added the required dependencies in pom.xml.
I had tried several times and was getting error of ExtentReports not being recognized. Then I removed ExtentManager file and then performed following steps to get build success message.
- MVN clean and install on Eclipse by clicking on POM.xml ---> Run as --> MAVEN clean and install.
- MVN cleand and compile on commmand line.

I went to .m2 repository as well to find out whether extentreport jars are getting downloaded or not. But I was not able to locate the folder.

Refer to attached screenshots

A
Ashish Thakur Replied on 03/01/2019

What dependency have you added
Zip and send your project


S
Shashank Joshi Replied on 03/01/2019

Hello,

I have added dependency for 3.1.2 version.

Since dependency was not working so I have added it manually in the Java build path so that I can proceed.

Also can you check though I am flushing the report but then too report is not getting created.

Regards
Shashank


A
Abhishek Replied on 04/01/2019

Shashank,

I imported your project and noticed that you have hardcoded many file paths and directory paths.

Make sure, you are not hard coding anything as that may cause issues during execution.


A
Ashish Thakur Replied on 06/01/2019

Let me know if Abhishek's suggetion has helped you on this


S
Shashank Joshi Replied on 06/01/2019

OK, I will use relevant paths in the utils file.

But the issue of Extent reports not getting downloaded through Maven dependency is still not answered.


A
Abhishek Replied on 07/01/2019

Shashank, remove the .m2 directory completely and run the following commands

maven compile
maven eclipse:eclipse

sometimes the files get downloaded but they become unusable.

Additionally, remove all the dependencies that you've added manually.


A
Ashish Thakur Replied on 09/01/2019

Delete all the folders/jars from. m2 folder

Make sure your net is good 

and try to download again