That was exactly what I needed on my task. I had to set up two separate Jenkins jobs to run different tests from the same project repository. Thank you so much.
Looks really nice your tutorial. One thing: You can also use Ubuntu for win 10 - is sort of an Os inside a OS and is really helpful . Is working perfectly. Cuz my Local laptop has some issues with git account sync , one day i thought - why not trying Ubuntu Win10. Tnx again for uploading this video and Keep going!!!!
Thank you Raghav, you are very nice and share the thing you learn free for everyone, and reply most every comment...amazing...I just wondering if you can share the way how you learn new things? since there are so much to learn and it seems impossible to remember all the things at one time, but you really did a very good job and you learned so many tools and explained so clear.
Hi Raghav - Can you please put a video to show how to bundle this project as a jar and with executable capability so that I can take this bundle and run it on other VMs. Not just only the local machine where the project is created. For same the TestNG selenium one built from Maven.
Hi Prasad, you can check this video - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QB19Wqimkq4.html, however running through jar may not be the most efficient way, you can create a maven project, add it to a cloud repo like GitHub and have commands to clone and run the project from anywhere
How do I add OpenCV in an executable jar with maven? Would you please make a tutorial on this or any suggestion could help. BTW you are doing great brother.
Thanks Raghav for your effort and contribution to the community. I have a situation at work making my tests to fail on Jenkins; something that was not happening until recently. How can I disable/close/skip browser alerts in command line for a Selenium test? Command line does not support it.
@@RaghavPal sorry for the late response. It looks like it's not a CLI issue but I'm yet to find a fix for the issue. Jenkins build for my Maven POM tests still fails due to timeout after 10minutes even though everything runs fine locally. Error on Jenkins is "Build Aborted. Not looking for any TestNG results"
I have a complation error where it says No compiler is provided in this environment. Perhaps you are running on a JRE rather a JDK? The problem is I have a JDK installed. I tried solutions from stackexchnage but they didn't work
Hi Raghav, can I run selenium by command line but without TestNG. example, I just write very basic class with open google page, no TestNG framework inside.
Thank you Raghav ..!! This was really helpful. After executing from command line I am running a test manually which basically email me emailable-report created in surefire folder. But the problem is it is mailing the earlier executed report and not the latest one. So I am first executing all test from Maven and then run that email-sending test from testng command. This solves the problem. However could you please guide me if there could be better way to achieve this ?
Hi Raghav, Can you please help me to get a help/tutorial video to run testng.xml from command line. I gone through many links and have only idea that it is something like java -cp ---- - - bin;---- lib;- - - - org.testng.TestNG testng.xml and I tried many ways to use this but test cases not ran.
Hello Raghav, how do you run a TestNg Selenium project using the methods you listed here. I want at least to see that a Selenium project with ChromeDriver is executing..please advise. Thank you.
Manish In general, when you add a TestNG file (e.g., `testng.xml`) to a Selenium Java project, you don't necessarily need to update a `properties` tag with the same information. The `testng.xml` file is used to configure TestNG tests, including specifying test classes, methods, and suites. The file is typically used to define the test execution sequence, and TestNG will automatically pick up the tests defined in this file. On the other hand, a `properties` tag is usually used to configure project-specific properties, such as environment variables, database connections, or other settings that are not directly related to TestNG. Unless you have a specific requirement to configure a property related to the TestNG file, it's not necessary to update a `properties` tag when adding a TestNG file to your project. -
Hi Raghav, Thank you so much for the videos you create. I have a quick question, How do you stop the execution triggered through mvn test? I tried Ctrl+C to stop, I see the maven gets stopped in command prompt but the execution still continues in the browser? How can I kill the whole execution?
Thank you so much for clearly explanation. But i was BUILD ERROR after run mvn clean test due to 2 errors: Source option 5 is no longer supported. Use 7 or later / Target option 5 is no longer supported. Use 7 or later. Please help me
pls check if this helps you Right Click on Project. Click on Build path. Click on Configure Build path. It opens a Java Build path window. Click on Java Compiler in the Left side. It navigates to Java Compiler window in that to set the Compiler compliance level is set as according to your jre version(ex if java version is 1.8 then choose 1.8) as select. Click on [Apply] button. Click on [OK] button. Right click on Project > Maven > Update the project. Right click on Project > Run As > Maven install -- The pom.xml file is running and java jars are download and installed to project. Right click on Project > Run As > Maven Test -- The pom.xml file is running and java jars are download and installed to project. stackoverflow.com/questions/53034953/error-source-option-5-is-no-longer-supported-use-6-or-later-on-maven-compile
Hi Pooja, Although I will not suggest running through JAR but still if you need to can watch this - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QB19Wqimkq4.html
Hi Himanshu, I can check if you provide the exact time, but in general if you are using any tool or platform with support for xml , you can do autocomplete using TAB
@@RaghavPal Hi sir thanks for the reply , the time for the vidoe is "ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-lQCyVy-g1e8.html" . I have tried using TAB for autocomplete the XML but it did not work for me in the Eclipse, Is there any plugin that i need to donwload for it ?Also can you please suggest any plugin in eclipse via which i can read the JAR files ( to check its methods/classes)??
Great tutorial as always. However I have 2 questions: 1. Is it possible to have a framework where in your selenium test framework (TestNg + Maven) and run in a docker container and then have the nodes spinup in another docker container. I think this can be achieved using docker compose. But I am not able to figure the exact solution for this. 2. How to run testNG xmls files or the jars from terminal using the java -cp command. I always get the below error for both: ``` java testng.xml java Demo-test.jar ``` Error: Could not find or load main class target.Demo-test.jar Caused by: java.lang.ClassNotFoundException: target.Demo-test.jar
Hi Shivam, 1. Yes you can run using Docker containers. I have not yet created videos on this and for now you can take some online help 2. If you are using testng, then your classes may not be having main method. In that case you can run testng.xml files from command line. You will find tutorials on that later in this series
Thank you so much , i have one question pls , when i execute the command : mvn clean test from my project location nothing happend the curser return back to the command line without showing any error or result , note that before executing the command , i copied the mvn from C:\Program Files\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin to my project loation, please i am waiting your reply .special thanks.
@@RaghavPal dear sir , now its working fine after i provide the full path of mvn location in the environment variable : C:\Program Files\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin , but after executing the command it shows me thats the BUILD FAILURE : ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:14 min [INFO] Finished at: 2022-07-07T01:57:45+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project seleniumjavaframework: Compilation failure: Compilation failure: [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [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: [ERROR] [Help 1] cwiki.apache.org/confluence/display/MAVEN/MojoFailureException are there any solution ? note : when executing the command : mvn clean , it shows me BUILD success. thanks in advance
pls check if this helps you Right Click on Project. Click on Build path. Click on Configure Build path. It opens a Java Build path window. Click on Java Compiler in the Left side. It navigates to Java Compiler window in that to set the Compiler compliance level is set as according to your jre version(ex if java version is 1.8 then choose 1.8) as select. Click on [Apply] button. Click on [OK] button. Right click on Project > Maven > Update the project. Right click on Project > Run As > Maven install -- The pom.xml file is running and java jars are download and installed to project. Right click on Project > Run As > Maven Test -- The pom.xml file is running and java jars are download and installed to project. stackoverflow.com/questions/53034953/error-source-option-5-is-no-longer-supported-use-6-or-later-on-maven-compile
Hello Again, Is There Any Better Alternative Than Downgrading Java JDK To (JDK1.8) From (JDK 12.0.1) To Compile Maven Tests From Command Line?? Command : mvn clean Works Just Fine, But For Running Tests It Throws [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. Any Comments Are Appreciated...
Hi Asif, I will have to check on this. Meanwhile see if this helps you - stackoverflow.com/questions/52232681/compile-and-execute-a-jdk-preview-feature-with-maven
I have various test cases and used to run smoothly using tesng.xml But after implementing this as shown in the video the cmd shows complier error And also my smooth running testng.xml is showing error as “Cannot find class in classpath : testfilename “ Please help me out here
hi Raghav i was using maven sure-fire with system properties so i used ${url} in pom while running from CMD how i will provide the url like for suite file we give -Dsuite=suitefileName.xml
Hi Raghav, I am Harmeet..I want to ask you , can we add more than one testng.xml files under the tag suitexmlfile..then all my testng.xml file can run one after another. Thanks
Hello Sir, How do I Set Global Parameters using Maven commands and Update tests at run time? Do you have any video regarding this, I am getting errors repeatedly. D:\Eclipse Workspace_Selenium_Udemy\SeleniumFramework>mvn test -PPurchase -Dbrowser=edge #Raghavpal
Gayatri Setting global parameters and updating tests at runtime in Selenium Java using Maven can be done by configuring your `pom.xml` file and using Maven profiles and properties. Here's a step-by-step guide to help you: 1. Define Maven Profiles: - In your `pom.xml`, define profiles for different test configurations. Each profile can specify different properties. ```xml Purchase edge ``` 2. Use Properties in Tests: - In your Java test code, you can access these properties using System.getProperty(). ```java String browser = System.getProperty("browser"); // Use the 'browser' variable to set up your WebDriver accordingly ``` 3. Run Tests with Maven Command: - Use the Maven command to run tests with the specified profile and properties. ```shell mvn test -PProfileName -Dproperty=value ``` - For example, to run tests with the "Purchase" profile and set the browser to Edge, you would use: ```shell mvn test -PPurchase -Dbrowser=edge ``` 4. Update Tests at Runtime: - To update tests at runtime, you can pass additional parameters via the command line or modify the properties in the profile before running the tests. 5. Troubleshooting Errors: - If you're getting errors, make sure that the profile and property names used in the Maven command match those defined in your `pom.xml`. - Ensure that your test code correctly handles the properties passed from Maven. - Check the Maven output for error messages that can provide clues about the issue. for tutorials, you can search for tutorials on platforms like RU-vid using keywords like "Selenium Java Maven tutorial" to find comprehensive guides and walkthroughs. Remember to always keep your `pom.xml` and test code synchronized with the parameters you intend to use. This will help you avoid errors and ensure that your tests run as expected with the desired configurations ..
Hi Barry, just check your pom.xml. Does it have dependency for junit? If not add and if already present check the junit junit 4.12 test If the scope is test, it will work for classes/scripts present only in test folder i.e. src/test/java. May be your file/class you are running is in src/main/java. Pls check. You can remove scope node.
Hi Gaurav, excellent one. thanks a lot. I am getting "The POM for org.apache.maven.plugins:maven-surefire-plugin:jar:3.0.0-M4 is missing, no dependency information available" error all time. I tried changing the version also. But the same error with the mentioned version number. Kindly do me the needful.
Hi Shalini, you will have to have your project there and then you can use the same commands. You will need headless browsers. I will plan for a session, Meanwhile pls take online help
Hi Raghav, How do i send the build number as parameter while running tests from command line?Also i want to use the build number entered in command line as a reference for my test cases. Like if i create a account in google it should have the build number in the account name so that anyone can understand the record was created by automation for a particular build. Is it possible?
Hi Raghav,When i am try to run Selenium TestNg test with Maven command line i am getting this errror: [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ learnmaven --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Neha\Selenium\SeleniumJavaProject\learnmaven\src\main esources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ learnmaven --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 3 source files to C:\Project\Selenium\SeleniumJavaProject\learnmaven\target\classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.803 s [INFO] Finished at: 2020-04-03T16:19:52-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project learnmaven: Compilation failure -> [Help 1]
Hi Neha, you can try to add the following in the properties section of pom.xml 1.8 1.8 Version can be updated as per your java ver stackoverflow.com/questions/42525139/maven-build-compilation-error-failed-to-execute-goal-org-apache-maven-plugins
Hi Raghav I am running the sikuli code for file upload to a site but I get the error maven surefire plugin failed to 2.19.1 : fork VM terminated without saying goodbye. Command was cmd /X /C sort of error I tried using surfirr plugin 2.19.1 ,2.22.0 and 2.18.1 but same error ..Can u help
Hi Neha, although you have not given the complete details and cause, pls check This can help - stackoverflow.com/questions/31221182/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-18-1tes
Hi Ankit, I will need more details and logs to check the root cause, Here are some possible reasons: Incorrect dependencies: Make sure you have included all the required dependencies for Selenium and WebDriver in your project's pom.xml file. Incorrect script location: Make sure your Selenium script is located in the correct directory in your project and is being picked up by Maven during the build. Incorrect test configuration: If you are using TestNG or JUnit, make sure that your test configuration is correct and your test class is being executed by Maven during the build. WebDriver initialization issues: Make sure that the WebDriver is being initialized correctly in your script and that it is able to connect to the correct browser. Browser compatibility issues: Make sure that the browser version you are using is compatible with the version of WebDriver you have installed. Incorrect element locators: Make sure that the locators you are using in your script are correct and that they can locate the elements in the page.
Thank you Raghav. It helped. I want to run my test on different machine without installing Eclipse. How can i copy these test dlls and run test. I am a .net guy not Java. Can you help. I just need to run the tests using command line and i dont want to expose my test code.
@@RaghavPal thanks . Because I got a confusion, if cucumber is there the test will be driven based on the feature file, and results also generate based on that, so my confusion is ,what the significance of adding TestNg also, if you can clarify that it will be great
When I run a testng.xml with 4 classes in it..the methods in those classes are not running..only login/ logout is happening.when run 1 class through XML file the test in those are running.what would be the error
I have a requirement where I want to run my tests using only .exe or a batch file without having the source code as client needs to run it .Is it possible to do ?
Hi Prakrati, you can compress it in a jar, but not sure if that will be efficient, We always have the option of storing the project on cloud repo like github and on any system get it from there and run.
Thank you very much for the tutorial Raghav! I went through this and ran into an odd error and i'm not sure eactly is wrong. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project SeleniumFramework: Compilation failure: Compilation failure: [ERROR] Source option 5 is no longer supported. Use 7 or later. [ERROR] Target option 5 is no longer supported. Use 7 or later. Can you or anyone help me figure this one out?
Hi Michael, what is your java version. You can goto cmd and run command java -version You may be using JDK9 or later Your project uses maven-compiler-plugin with an old version which defaults to Java 5. You can also try to add following in pom.xml in the project tag 1.7 1.7 References github.com/jflex-de/jflex/issues/400 stackoverflow.com/questions/49028810/error-source-option-1-5-is-no-longer-supported-use-1-6-or-later
Hi Raghav, I want to pass the as value Parameters from properties file using command line, like username and password, could you please give me the some solution for this
Sir how to create batch file for xml..I have created..but when I run this file execution start in cmd but exit after completing run..how to pause to cmd
Hi Raghav, I have tried to run from command line but it is giving build failure error every time- :\Users\sudee\git\Seleniumjavaframework11\Seleniumjavaframework>mvn clean test [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for Seleniumjavaframework:Seleniumjavaframework:jar:0.0.1-SNAPSHOT [WARNING] 'dependencies.dependency.version' for com.applitools:eyes-selenium-java3:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 46, column 14 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------< Seleniumjavaframework:Seleniumjavaframework >------------- [INFO] Building Seleniumjavaframework 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ Seleniumjavaframework --- [INFO] Deleting C:\Users\sudee\git\Seleniumjavaframework11\Seleniumjavaframework\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Seleniumjavaframework --- [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) @ Seleniumjavaframework --- [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 2 source files to C:\Users\sudee\git\Seleniumjavaframework11\Seleniumjavaframework\target\classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Seleniumjavaframework --- [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:testCompile (default-testCompile) @ Seleniumjavaframework --- [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 25 source files to C:\Users\sudee\git\Seleniumjavaframework11\Seleniumjavaframework\target\test-classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Test/Extendsreportbasicdemo.java:[37,15] ';' expected [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[8,23] expected [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[8,22] not a statement [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[11,2] reached end of file while parsing [INFO] 4 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.448 s [INFO] Finished at: 2021-01-10T22:28:11-05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project Seleniumjavaframework: Compilation failure: Compilation failure: [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Test/Extendsreportbasicdemo.java:[37,15] ';' expected [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[8,23] expected [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[8,22] not a statement [ERROR] /C:/Users/sudee/git/Seleniumjavaframework11/Seleniumjavaframework/src/test/java/Utils/Excelutilitiesdemo.java:[11,2] reached end of file while parsing [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: [ERROR] [Help 1] cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Can u please help me what is the issue here, so that i can fix that?
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project cu-auto-test: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: testSuiteXmlFiles0 has null value -> [Help 1] i am getting this error, can anyone help me ?
Hi Raghav please check the below errors. I have tried to fix it but was unable to resolve it. Please reply to me asap[ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.788 s [INFO] Finished at: 2021-11-26T14:15:22+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project FinalDemo: Compilation failure: Compilation failure: [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [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: [ERROR] [Help 1] cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
@@RaghavPal Thanks again for your prompt response Raghab (I hope I spelled it right! :)) matter of the fact is when I check mvn -version it shows my JAVA RUNTIME ENVIRONMENT C:\Program Files\Java\jre1.8.0_201 not the JDK / JRE. I think that's what the problem is, what if I change the runtime environment from JAVA control panel directly? would that be alright? What do I do to bring this change!!
Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? that message is shown from running running the command mvn clean test which tells you that I need that change of bringing in JDK / JRE to the environment. How do I do that??
@@A.B.00007 what dependency did you add? I have a similar issue. when i run from testng.xml, it worked fine.but after running from cmd, i had compilation eroors
Hi Allen, The error message suggests that the testng.xml file specified in the given file path is not a valid file. This could be due to various reasons such as incorrect file name, file path, or file format. To resolve the issue, you can try the following: Verify that the file path is correct and the file exists at the specified location. Ensure that the file name is spelled correctly and has the correct file extension (.xml). Check the file format to ensure it follows the TestNG XML format. Try running the TestNG tests with a different testng.xml file or create a new one from scratch. Make sure you have necessary read/write permissions to the file.
Hi sir, when i execute "mvn clean test", im getting some error, im not able to find the solution, can u please help me. this is the error.. [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.415 s [INFO] Finished at: 2022-11-30T11:59:00+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project QAfox_framework: Compilation failure: Compilation failure: [ERROR] Source option 5 is no longer supported. Use 6 or later. [ERROR] Target option 1.5 is no longer supported. Use 1.6 or later. [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: [ERROR] [Help 1] cwiki.apache.org/confluence/display/MAVEN/MojoFailureException D:\Work\Git\Eclipse_Workspace\Automation_framework>
pls check if this helps you Right Click on Project. Click on Build path. Click on Configure Build path. It opens a Java Build path window. Click on Java Compiler in the Left side. It navigates to Java Compiler window in that to set the Compiler compliance level is set as according to your jre version(ex if java version is 1.8 then choose 1.8) as select. Click on [Apply] button. Click on [OK] button. Right click on Project > Maven > Update the project. Right click on Project > Run As > Maven install -- The pom.xml file is running and java jars are download and installed to project. Right click on Project > Run As > Maven Test -- The pom.xml file is running and java jars are download and installed to project. stackoverflow.com/questions/53034953/error-source-option-5-is-no-longer-supported-use-6-or-later-on-maven-compile