Thank u so much Raghav your explanation is neat and it is simple. Now my problem is resolved after watching the video of how to run maven through command window after changing the directory . Once again thank u
Off late, I have been watching your videos on TestNG and Maven . I must say i have learned a lot through these videos. Thank You. Raghav, I have a question on maven. I followed your video on how to create and run maven project thru eclipse. I followed your video step by step. When I run it , it says Build Success but fails to show output ,which is nothing but a print statement on to my console. Wondering why ? Any help is appreciated.
Hi Raghav, i can not see the tests executed in selenium not command line, when i hit mvn test it says build success but the tests are not executed. wondering if you know what might be the issue. thanks
Tip to open command prompt from windows explorer directly: After going to maven project location, type cmd in the top explorer address bar it will open cmd with that location and you need not switch directories
hi raghav , m vidya , i am new to maven , i have done theoretical part but i could not understand much about it so i decided do hands on learn. i was following your video. everything is fine but there are many other dependencies are downloaded which i dont know and my pom.xml file is very large including many tags where as yours is short and sweet for this simple project. archetype is same which u used 0.0.1-snaphsot. and but later i thought let us not bother but when i tried putting @Test annotation it did not import which is showing me error. please help me
Hi Vidya, usually when you get any maven lib, in case it is dependent on others, it will automatically add them in your project, No need to worry on that, Just check if you have got the right dependencies from the right source, ver etc. On the @Test annotation, this is present in several testing lib like JUnit, TestNG, see what is added in your project and can compare with mine
That's very good explanation Raghav. Thank you. I am the beginner and during practice I am facing issue while running the tests. I am able to run tests of the project only through the usage of under mvn-surefire-plugin in pom.xml, ie the same piece of code when i run without specifying the configuration in pom.xml, the tests are not getting executed. I used with and without testng, but nothing is working out. Can you please help me regarding this.
Sir, I have 20 tests in 3 classes which I want to run with 2 different logins. 2 diff login creds are in 2 diff properties. I am planning to use maven profiles . How to load corresponding property file based on profile which we give in the execution command
Hi Saranya Here are the steps on how to load corresponding property file based on profile which we give in the execution command: 1. Create two property files, one for each login. The property files should contain the following information: * Username * Password 2. In your Maven pom.xml file, add the following profiles: * `dev`: This profile will use the `dev.properties` file. * `prod`: This profile will use the `prod.properties` file. 3. In your test class, use the following code to load the property file for the current profile: Properties properties = new Properties(); InputStream inputStream = null; if (System.getProperty("profile") == "dev") { inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("dev.properties"); } else if (System.getProperty("profile") == "prod") { inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("prod.properties"); } try { properties.load(inputStream); } catch (IOException e) { e.printStackTrace(); } 4. In your test methods, use the `properties` object to access the login credentials. ``` String username = properties.getProperty("username"); String password = properties.getProperty("password"); // Use username and password to login to the application ```
hello when i tried running the code i am getting this exception. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project FirstMaven: 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. [ERROR] -> [Help 1] please direct me how to solve it
Hi Upasana, 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, while trying to create a new maven project,i am getting the following error: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved:Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
hi Need Help when i run my testng.xml file all work fine but when i rum my pom.xml file it will run all test but Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project ExrentReport: There are test failures.
I am getting the below error in command prompt while trying 'mvn test': whereas it is working fine when I directly run from Eclipse. Could you please help Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (repo.maven.apache.org/maven2): Failed to transfer file: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]
Hi Sir, I got an error on eclipse -BUILD failure -Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project , using same POM.xml but on confluence ,its written as to define few more and all dependencies in pom
Hi Shikha, 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 This can help - stackoverflow.com/questions/31221182/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-18-1tes
Hi Raghv, I spent hours on one error. whenever I'm creating new Maven project im getting a red cross symbol on the project name itself, also "JRE system library" file is not generating when we create new maven project. please help me to resolve this issue. Also POM file has the same red cross symbol as like the symbol on project name probably its an error symbol. but im not able to figure out why im getting this error although i have followed the same steps as you shown in your video. plz help
Hi Amol, do you see any message when you hover over or click on the cross mark. Can try cleaning project and restarting Eclipse. In case its JRE issue, try to use a diff JRE or JDK stackoverflow.com/questions/4638108/how-do-i-configure-eclipse-to-make-use-of-different-version-of-jdk
while I'm running the project using "maven test" I'm getting this error : Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1] Please help me bro
Hi Raghav when I run test I got same error "BUILD FAILURE" then I followed step choosed add libraries and directory... then jdk path but can't click finish button because it says The JRE name is already in use
Thank you these simple step. But I am getting below error while running the test. At the end I can see build success but no output is printed SLF4J: Class path contains multiple SLF4J bindings.
Why we are installing and setting up Maven when its already inbuilt in eclipse. this part is confusing to me? or do we need to install and setup Maven is necessary step?
Hi Supriya, you will not need to install Maven as long as you are running from within Eclipse, but if you like to run from outside (cmd), will need it on the system
Hi Ala, you can do that, will have to check some UI framework, On the other hand, why not setup your commands in a jenkins job. You will get a UI + a lot of other options. Can check Jenkins tutorial here - automationstepbystep.com/
Hello Sir, I have a query, it would be highly appreciated if u can answer it. I have installed Maven using Eclipse Marketplace. I can run maven in Eclipse. However, my system cannot find maven using mvn -version. So is it because I have not installed maven in system? Please help. Thanks & Regards, Pankaj Singh
Yes, exactly Pankaj, Eclipse has in-built maven and you can run from Eclipse, but if you want to run from command line then should install Maven on your system. Check this ruclips.net/p/PLhW3qG5bs-L8XkBrI-G5aTUo6QwEEoVcj
hello sir, thanks for the video, but i didnt get the hello world print on console, just the build success message, im using testNG 7.3.0, but if i run the code individually, it is showing,
Hi Vishwas, if you have followed all the steps, it should print. Pls check the console again. Also add some new line character before and after hello world like "
Hello World /n/n" So that it is clearly visible on the command line
So I do not understand, and you did not explain, how maven can build (compile) the program without any build related XML in POM.XML. Ant uses the element to specify how to compile the code. This includes where the source directories are, where the compiled class files go, compiler flags, etc. None of this is in the POM.XML file, yet somehow you were able to compile the code. ???
after adding dependencies in pox.xml file and saving the file I did not find any maven dependencies folder in package explorer explorer.Can someone please help me to get maven dependencies added.
Hi Vamsi, Right click on project -> Maven -> Update Project OR if you do not find the option go from the menu project -> Maven -> Update Projects and select your project Next option to try is Window->Preferences: Maven->Installations: Global settings -> open file and hardcoded localRepository Project->Clean right click on project: Maven->Update dependencies right click on project: Maven->Update project configuration This can help stackoverflow.com/questions/29237490/maven-dependencies-missing-in-eclipse-project/29241681 stackoverflow.com/questions/4262186/missing-maven-dependencies-in-eclipse-project
It's giving me 3.1 compiler(default) error, when I changed the properties of compiler source and target to 1.8 it's working fine... Why does this happen?? Please reply sir...
maven project running successfully but not getting the output to what i am printing in System.out.println("Helloworld"). Below console info:- [INFO] Scanning for projects... [INFO] [INFO] ------------------< hellowworld_nil:hellowworld_nil >------------------- [INFO] Building hellowworld_nil 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hellowworld_nil --- [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) @ hellowworld_nil --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ hellowworld_nil --- [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) @ hellowworld_nil --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ hellowworld_nil --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.434 s [INFO] Finished at: 2020-04-06T23:17:51+05:30 [INFO] ------------------------------------------------------------------------
Check this howtodoinjava.com/maven/local-remote-central-repositories/#:~:text=These%20maven%20remote%20repository%20work,file%20in%20remote%20repository%20itself.
I am getting error while adding maven project "Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6" can you help...
Hi Raghav, While creating a maven project .. I am getting "Building" has encountered the problem . Could you please suggest me how to fix this issue Thanks in advance.
Hi Sumanth, 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
When i created new project it is showing errors : could not calculate buildplan ; plugin execution not covered by life cycle configuration.. can u plz suggest me in latest eclipse version
Hi Waqas, pls check if this helps you - stackoverflow.com/questions/39926064/coreexception-could-not-get-the-value-for-parameter-compilerid-for-plugin-execu/41416449 github.com/alexo/wro4j/issues/218
hi raghav Thanks for the video, i'm facing this issue, but i could not find the solution to resolve. D:\Users\KManidee\Files -programs\src\test\java>mvn clean [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.342 s [INFO] Finished at: 2020-06-15T12:57:17+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\Users\KManidee\Files -programs\src\test\java). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException It would be appreciated if you provide the solution ,When i run on the eclipse none of the error got displayed, when i run on CMD it is displaying the error as shown in the above. Thanks.
Hi, first you have to change directory CD to the location of your project (or the location of pom.xml ) on command line Then run the mvn command. Let me know if you face any issues
What to do if we get below error message Though I have given dependency version above 7 Can you please help me [INFO] Compiling 1 source file to C:\Users avak\Documents\Sailaja_Testing\helloworld_Sailu\target\test-classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Source option 5 is no longer supported. Use 7 or later. [ERROR] Target option 5 is no longer supported. Use 7 or later.
Hi Geetha, If you are using simple maven java application then you can add these lines in you pom.xml properties tag . 1.8 1.8 facingissuesonit.com/2021/05/08/maven-error-source-option-5-is-no-longer-supported-use-6-or-later/
System.out.print("I hope getting more videos from your end, Please add documents of course wise in your website. It's very helpful to us. Thank you very much Raghav pal🤗😍!");
Hi Raghav, I am getting an error while running selenium test from maven Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project PageObject: 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.
Hi Daler, 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
What a chill voice and vibe, i love your tutorial by far and you helped me a lot!
Thanks you buddy!
So happy to know it helped
@@RaghavPal I can hear this comment bro
Thanks a lot. Gave me a very good idea of maven in a few minutes which I have been searching for hours
Glad I could help Mohnish
Thanks brother ..may Almighty Allah help you everywhere
Many many thanks Nur Mohammod Khan
Great information Raghav sir...Always I like your videos
Thanks a lot Ramesh
Thanks Raghav, very clear to understand.
You're most welcome Vasu
Rajhav you're the best! Thank you so much.
Happy and humbled to see this Elmo
Thank you so dear.....step by step explanation of topic is excellent thank you so much once again 🙏
Really thankyou soo much, learning very nicely from your videos and website.
You're most welcome
Thank u so much Raghav your explanation is neat and it is simple. Now my problem is resolved after watching the video of how to run maven through command window after changing the directory . Once again thank u
So happy to know this Sai
simply great, Thanks for sharing all these videos , its helping us a lot
So nice of you Shilpa
Ur videos are so much helpful Raghav thanks alot.
Glad to hear that Shwetha
I'm too late to reach u ..it's really helped me a lot... thank you
Most welcome Sarath
Helpful video..... Thank u so much
Most welcome 😊 Apurva
what a simple explanation about mvn basics thanks a lot
Most welcome Milind
thanks brother, appreciate for taking the time to make and share this
My pleasure!
Fantastic video and explanation!
Thanks
Thank you so much sir
Most welcome Pidaparthi
Thanku for expaling things from strach
Most welcome Mudita
Great video 👍! Thank you for your help!!! It was very useful! 😊
Glad it was helpful Aelodie
Off late, I have been watching your videos on TestNG and Maven . I must say i have learned a lot through these videos. Thank You. Raghav, I have a question on maven. I followed your video on how to create and run maven project thru eclipse. I followed your video step by step. When I run it , it says Build Success but fails to show output ,which is nothing but a print statement on to my console. Wondering why ? Any help is appreciated.
Hi Archana, thanks for your message. Pls check the logs, It will have the information or errors
@@RaghavPal Hi Raghav, where we need to check the log? I am also facing the same issue.
Thanks in advance.
Surefire plugins is required
Simply awesome explanation.
Thanks a Lot
Most welcome Sasidhar
your video is excellent. Your video is very much useful to me, Many thanks for that. My warm regards to you.
Thanks for watching
Great video!
Thanks
Thank you for the help. was stuck at jdk / jre lib
Glad this helped Mridul
Hi Raghav, i can not see the tests executed in selenium not command line, when i hit mvn test it says build success but the tests are not executed. wondering if you know what might be the issue. thanks
Hi Nestor, just check the names of test classes. If you are using junit or testng, the naming convention matters like Test* *Test ...
Hi Raghav can you please tell the maven structure like why we have created class inside src/test and src/main
Hi Dibakar, okay, I was thinking of doing a video on this, will plan
@@RaghavPal Thank you so much , please let me know once the video is uploaded although I have subscribed to your channel 👍
Tip to open command prompt from windows explorer directly:
After going to maven project location, type cmd in the top explorer address bar it will open cmd with that location and you need not switch directories
Thanks for adding Lakshmi
OMG BROTHER YOU ARE A LEGEND
hi raghav , m vidya , i am new to maven , i have done theoretical part but i could not understand much about it so i decided do hands on learn. i was following your video. everything is fine but there are many other dependencies are downloaded which i dont know and my pom.xml file is very large including many tags where as yours is short and sweet for this simple project. archetype is same which u used 0.0.1-snaphsot. and but later i thought let us not bother but when i tried putting @Test annotation it did not import which is showing me error. please help me
Hi Vidya, usually when you get any maven lib, in case it is dependent on others, it will automatically add them in your project, No need to worry on that, Just check if you have got the right dependencies from the right source, ver etc. On the @Test annotation, this is present in several testing lib like JUnit, TestNG, see what is added in your project and can compare with mine
That's very good explanation Raghav. Thank you. I am the beginner and during practice I am facing issue while running the tests. I am able to run tests of the project only through the usage of under mvn-surefire-plugin in pom.xml, ie the same piece of code when i run without specifying the configuration in pom.xml, the tests are not getting executed. I used with and without testng, but nothing is working out. Can you please help me regarding this.
Hi Sravanthi, I will need to check the setup, You can try some online help
@@RaghavPal Ok.. Thank you Raghav 🙂
Sir, I have 20 tests in 3 classes which I want to run with 2 different logins. 2 diff login creds are in 2 diff properties. I am planning to use maven profiles . How to load corresponding property file based on profile which we give in the execution command
Hi Saranya
Here are the steps on how to load corresponding property file based on profile which we give in the execution command:
1. Create two property files, one for each login. The property files should contain the following information:
* Username
* Password
2. In your Maven pom.xml file, add the following profiles:
* `dev`: This profile will use the `dev.properties` file.
* `prod`: This profile will use the `prod.properties` file.
3. In your test class, use the following code to load the property file for the current profile:
Properties properties = new Properties();
InputStream inputStream = null;
if (System.getProperty("profile") == "dev") {
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("dev.properties");
} else if (System.getProperty("profile") == "prod") {
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("prod.properties");
}
try {
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
4. In your test methods, use the `properties` object to access the login credentials.
```
String username = properties.getProperty("username");
String password = properties.getProperty("password");
// Use username and password to login to the application
```
@@RaghavPal sure. I will try this.
Fantastic... How to convert a normal java bean project with no build tool to be a maven project using vscode?
I will check on this, can try some online examples
@@RaghavPal thanks... Looking forward to your reply...
hello when i tried running the code i am getting this exception.
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project FirstMaven: 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.
[ERROR] -> [Help 1]
please direct me how to solve it
Hi Upasana, 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 have watched most of ur videos...I have one question...When we build maven (run pom.xml) then automatically all test cases (suite) runs?
Hi Ankita, tests run when we run mvn test command. You can get more details here tutorials.jenkov.com/maven/maven-commands.html#executing-build-phases
Hi Raghav, while trying to create a new maven project,i am getting the following error:
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved:Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Hi Jeyasudha, this can help stackoverflow.com/questions/12533885/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources
hi Need Help
when i run my testng.xml file all work fine but when i rum my pom.xml file it will run all test but Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project ExrentReport: There are test failures.
Hi Pravin, This can help - stackoverflow.com/questions/31221182/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-18-1tes
I am getting the below error in command prompt while trying 'mvn test': whereas it is working fine when I directly run from Eclipse. Could you please help
Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (repo.maven.apache.org/maven2): Failed to transfer file: repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]
Hi Sibina, you will get help here - stackoverflow.com/questions/59763531/maven-dependencies-are-failing-with-a-501-error
Thank you
Most welcome Reaz
Hola amigo como estas? Yo puedo crear esto con el test de web services de assured rest?
Saludos desde Colombia!!!
Sí, consulte los tutoriales aquí automationstepbystep.com/
Hi Sir, I got an error on eclipse -BUILD failure -Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project , using same POM.xml but on confluence ,its written as to define few more and all dependencies in pom
Hi Shikha, 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
This can help - stackoverflow.com/questions/31221182/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-18-1tes
Hi Raghv, I spent hours on one error. whenever I'm creating new Maven project im getting a red cross symbol on the project name itself, also "JRE system library" file is not generating when we create new maven project. please help me to resolve this issue.
Also POM file has the same red cross symbol as like the symbol on project name probably its an error symbol. but im not able to figure out why im getting this error although i have followed the same steps as you shown in your video. plz help
Hi Amol, do you see any message when you hover over or click on the cross mark. Can try cleaning project and restarting Eclipse. In case its JRE issue, try to use a diff JRE or JDK
stackoverflow.com/questions/4638108/how-do-i-configure-eclipse-to-make-use-of-different-version-of-jdk
while I'm running the project using "maven test" I'm getting this error :
Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]
Please help me bro
Hi Venkata, check if this helps stackoverflow.com/questions/13170860/failed-to-execute-goal-org-apache-maven-pluginsmaven-surefire-plugin2-10test
Hi Raghav when I run test I got same error "BUILD FAILURE" then I followed step choosed add libraries and directory... then jdk path but can't click finish button because it says The JRE name is already in use
Hi Zahid, pls check here answers.sap.com/questions/11083819/setting-up-sap-jvm-in-eclipse-ide-jre-name-is-alre.html
Thank you these simple step. But I am getting below error while running the test.
At the end I can see build success but no output is printed
SLF4J: Class path contains multiple SLF4J bindings.
Hi Prashant, check if this helps stackoverflow.com/questions/14024756/slf4j-class-path-contains-multiple-slf4j-bindings
Why we are installing and setting up Maven when its already inbuilt in eclipse. this part is confusing to me?
or do we need to install and setup Maven is necessary step?
Hi Supriya, you will not need to install Maven as long as you are running from within Eclipse, but if you like to run from outside (cmd), will need it on the system
Thank you so much...
You're most welcome Bishnuyasha
hi, Can we create a single web page containing button that will run our test script written in JAVA using testng and is maven project. Please suggest?
Hi Ala, you can do that, will have to check some UI framework, On the other hand, why not setup your commands in a jenkins job. You will get a UI + a lot of other options. Can check Jenkins tutorial here - automationstepbystep.com/
Automation Step by Step - Raghav Pal thanks alot... i will try jenkins
Hello Sir,
I have a query, it would be highly appreciated if u can answer it.
I have installed Maven using Eclipse Marketplace. I can run maven in Eclipse.
However, my system cannot find maven using mvn -version.
So is it because I have not installed maven in system?
Please help.
Thanks & Regards,
Pankaj Singh
Yes, exactly Pankaj, Eclipse has in-built maven and you can run from Eclipse, but if you want to run from command line then should install Maven on your system. Check this ruclips.net/p/PLhW3qG5bs-L8XkBrI-G5aTUo6QwEEoVcj
@@RaghavPal Thanks Sir
hello sir, thanks for the video, but i didnt get the hello world print on console, just the build success message, im using testNG 7.3.0, but if i run the code individually, it is showing,
Hi Vishwas, if you have followed all the steps, it should print. Pls check the console again. Also add some new line character
before and after hello world like "
Hello World /n/n"
So that it is clearly visible on the command line
Good Evening Raghav sir,
Can you please explain how to build Maven parent child projects?
I will plan a session Asif
So I do not understand, and you did not explain, how maven can build (compile) the program without any build related XML in POM.XML. Ant uses the element to specify how to compile the code. This includes where the source directories are, where the compiled class files go, compiler flags, etc. None of this is in the POM.XML file, yet somehow you were able to compile the code. ???
Hi Michael, there is difference on how Maven and Ant works, I will plan to have a session
after adding dependencies in pox.xml file and saving the file I did not find any maven dependencies folder in package explorer explorer.Can someone please help me to get maven dependencies added.
Hi Vamsi, Right click on project -> Maven -> Update Project OR if you do not find the option go from the menu project -> Maven -> Update Projects and select your project
Next option to try is
Window->Preferences: Maven->Installations: Global settings -> open file and hardcoded localRepository
Project->Clean
right click on project: Maven->Update dependencies
right click on project: Maven->Update project configuration
This can help stackoverflow.com/questions/29237490/maven-dependencies-missing-in-eclipse-project/29241681
stackoverflow.com/questions/4262186/missing-maven-dependencies-in-eclipse-project
It's giving me 3.1 compiler(default) error, when I changed the properties of compiler source and target to 1.8 it's working fine...
Why does this happen?? Please reply sir...
Hi Pidaparthi, it may be due to compatibility
@@RaghavPal Thank you sir
you are a champion how can I reach you privately ?
Hi Kobi, you can email me
maven project running successfully but not getting the output to what i am printing in System.out.println("Helloworld").
Below console info:-
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< hellowworld_nil:hellowworld_nil >-------------------
[INFO] Building hellowworld_nil 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hellowworld_nil ---
[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) @ hellowworld_nil ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ hellowworld_nil ---
[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) @ hellowworld_nil ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ hellowworld_nil ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.434 s
[INFO] Finished at: 2020-04-06T23:17:51+05:30
[INFO] ------------------------------------------------------------------------
Hi Sunny, what is the command you are running. If you have added your code in the src/java/test folder, when you run mvn test it will run.
Sir,
Difference between central repository vs remote repository?
Check this howtodoinjava.com/maven/local-remote-central-repositories/#:~:text=These%20maven%20remote%20repository%20work,file%20in%20remote%20repository%20itself.
I am getting error while adding maven project
"Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6"
can you help...
Hi Rakesh, this will help
stackoverflow.com/questions/31316339/how-to-solve-maven-2-6-resource-plugin-dependency
Hi Raghav,
While creating a maven project .. I am getting "Building" has encountered the problem . Could you please suggest me how to fix this issue
Thanks in advance.
Hi Ajeet, will need more logs. Also check other comments
great ! simple explanation! but how to generate the report for mvn test
I will try to cover that Rabia
hi sir, im getting error saying Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: please help
Hi Sumanth, 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
Hey i followed the video but in the explorer there is no Maven Dependencies Lib why is that?
Hi, which part is this referred to
Hii , i didn't get after run as comment from java application what I do ?
Please help me
Hi Deepika, pls check are you in java perspective
When i created new project it is showing errors : could not calculate buildplan ; plugin execution not covered by life cycle configuration.. can u plz suggest me in latest eclipse version
Hi Shiva, you can try with latest eclipse from here - www.eclipse.org/downloads/
while running maven in command prompt it is giving build failure, but in eclipse working fine?
You may not have maven on your system. Pls check ruclips.net/p/PLhW3qG5bs-L8XkBrI-G5aTUo6QwEEoVcj
@@RaghavPal Maven is installed and also running, but it is giving build failure.
Okay, I may have to see the detailed setup. You can try some online help
@@RaghavPal just went through this problem. had to reset my computer because path variable was deleted.
i have created maven project in cmd but it is not working in netbeans and eclipse and inteliJ error is same of plugin
What is the error Waqas, will have to check logs to trouleshoot
i am getting error while creating maven project in eclipse mars "couldnot get the value of parameter plugin execution defalt"
Hi Waqas, pls check if this helps you - stackoverflow.com/questions/39926064/coreexception-could-not-get-the-value-for-parameter-compilerid-for-plugin-execu/41416449
github.com/alexo/wro4j/issues/218
@@RaghavPal its very complicated
Hi Waqas, for now you will have to check diff solutions and troubleshoot.
@@RaghavPal it worked it was network issue
hi raghav
Thanks for the video, i'm facing this issue, but i could not find the solution to resolve.
D:\Users\KManidee\Files -programs\src\test\java>mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.342 s
[INFO] Finished at: 2020-06-15T12:57:17+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\Users\KManidee\Files -programs\src\test\java). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
It would be appreciated if you provide the solution ,When i run on the eclipse none of the error got displayed, when i run on CMD it is displaying the error as shown in the above.
Thanks.
Hi, first you have to change directory CD to the location of your project (or the location of pom.xml ) on command line
Then run the mvn command.
Let me know if you face any issues
hi i am pointing to the jdk only but its still showing the same error in cmd
Something is missed or not setup properly, Pls try the setup again
Am take to maven project but not shown in file some errors is coming
what is the error Adam
Sis I didn't find src java folders in project explorer
Hi Varshi, it may be visible when you switch to package explorer. Even if you see it as a diff structure, you can continue with that
This vedio not visible to create maven project settings
Hi Lakshmi, which part exactly did you face issues
@@RaghavPal how to create maven project and add plugins are not visible on vedio sir
While executing these steps, it's showing nothing to compile. no test cases to run
Hi Shreya, make your the naming of your test class should be
Test*.java
*Test.java
TestCase.java
u didnt' show how to build the run as configuration maven build etc...
I will check and if needed will add new sessions
What to do if we get below error message
Though I have given dependency version above 7
Can you please help me
[INFO] Compiling 1 source file to C:\Users
avak\Documents\Sailaja_Testing\helloworld_Sailu\target\test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
Hi Geetha,
If you are using simple maven java application then you can add these lines in you pom.xml properties tag .
1.8
1.8
facingissuesonit.com/2021/05/08/maven-error-source-option-5-is-no-longer-supported-use-6-or-later/
System.out.print("Thanks Raghav Pal!");
most welcome Sanjeev
System.out.print("I hope getting more videos from your end, Please add documents of course wise in your website. It's very helpful to us. Thank you very much Raghav pal🤗😍!");
Hi Raghav, could you please make videos on jenkins by using WebLogic and payara tool.
I will plan Sanjeev
@@RaghavPal ASAP you can do it, Thank you Raghav...🙏🙏
it didnt work?
can check the logs and setup
voice is very low
I will improve the audio in coming videos Arun
Thank you Sir🙏
Most welcome Kedar
Amazing video!
Happy to know Niyati
Hi Raghav, I am getting an error while running selenium test from maven
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project PageObject: 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.
Hi Daler, 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