Hi,
In jenkins,
I imported my POM.xml. Tried to build the project. Then it leads to error message. Please firn below error details for ref.
Note: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?. For this error i changed JDK from JRE environment on eclipse editor. Still am facing same issue.
Started by user jaijagadeesha Running as SYSTEM Building in workspace C:\Program Files (x86)\Jenkins\workspace\CRMTESTAgain Parsing POMs Established TCP socket on 50764 [FreeCRMDemoFramework] $ java -cp "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-agent-1.13.jar;C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\TestMaven\boot\plexus-classworlds-2.6.0.jar;C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\TestMaven/conf/logging" jenkins.maven3.agent.Maven35Main "C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\TestMaven" "C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-3.36.1.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-interceptor-1.13.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.13.jar" 50764 <===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f E:\LatestInstallation\FreeCRMDemoFramework\pom.xml clean install
[INFO] Scanning for projects...
[INFO] [INFO] --------------------< webdrivertest:webdrivertest >--------------------- [INFO] Building webdrivertest 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]---------------------------------
[INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ webdrivertest --- [INFO] Deleting E:\LatestInstallation\FreeCRMDemoFramework\target
[INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ webdrivertest ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ webdrivertest ---
[INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Compiling 10 source files to E:\LatestInstallation\FreeCRMDemoFramework\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 42.782 s [INFO] Finished at: 2020-03-02T21:33:39+05:30 [INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project webdrivertest: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [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] [JENKINS] Archiving E:\LatestInstallation\FreeCRMDemoFramework\pom.xml to webdrivertest/webdrivertest/0.0.1-SNAPSHOT/webdrivertest-0.0.1-SNAPSHOT.pom [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException channel stopped
TestNG Reports Processing: START Looking for TestNG results report in workspace using pattern: **/testng-results.xml Did not find any matching files.
Finished: FAILURE
Thanks
Jai
Instructor
Ashish Thakur Replied on 03/03/2020
What command are you using to run this test outside eclipse?
NO i tried to execute with Jenkins.Apart from this , in maven i executed script as test suite run.
Apart from this two i didnt tried other options
Thanks
Instructor
Ashish Thakur Replied on 04/03/2020
try running the test with mvn test command