Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Getting below compilation error


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project SampleProject: Compilation failure: Compilation failure:
[ERROR] /C:/Users/admin/eclipse-workspace/SampleProject/src/main/java/selenium/org/sample/SampleProject/TestBase/TestBase.java:[5,30] package org.testng.annotations does not exist
[ERROR] /C:/Users/admin/eclipse-workspace/SampleProject/src/main/java/selenium/org/sample/SampleProject/TestBase/TestBase.java:[6,30] package org.testng.annotations does not exist
[ERROR] /C:/Users/admin/eclipse-workspace/SampleProject/src/main/java/selenium/org/sample/SampleProject/TestBase/TestBase.java:[10,10] cannot find symbol
[ERROR] symbol:   class BeforeSuite
[ERROR] location: class selenium.org.sample.SampleProject.TestBase.TestBase
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:


What I have tried:

when building project via maven it successfully building only via jenkins facing this issue,
Posted
Comments
Kornfeld Eliyahu Peter 9-Jul-18 2:17am    
It seems to be a problem with build order...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900