• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Maven troubleshooting tips and FAQs

Maven troubleshooting tips and FAQs



Beginner hints and tips for getting started with Maven and resolving simple problems with maven setup.

Beginner hints and tips for getting started with Maven and resolving simple problems with maven setup.



Total Views
Views on SlideShare
Embed Views



43 Embeds 11,836

http://seleniumsimplified.com 9386
http://javafortesters.blogspot.com 890
http://javafortesters.blogspot.in 521
http://javafortesters.blogspot.co.uk 473
http://javafortesters.blogspot.ru 67
http://javafortesters.blogspot.se 63
http://javafortesters.blogspot.ie 55
http://javafortesters.blogspot.ca 43
http://javafortesters.blogspot.com.au 39
http://javafortesters.blogspot.de 37
http://javafortesters.blogspot.co.nz 35
http://javafortesters.blogspot.ro 32
http://javafortesters.blogspot.com.br 22
http://javafortesters.blogspot.nl 21
http://cloud.feedly.com 21
http://javafortesters.blogspot.com.es 20
http://javafortesters.blogspot.co.il 16
http://javafortesters.blogspot.fr 13
http://feedreader.com 12
http://javafortesters.blogspot.com.ar 7
http://javafortesters.blogspot.cz 7
http://javafortesters.blogspot.no 6
http://javafortesters.blogspot.it 5
http://javafortesters.blogspot.sg 5
http://javafortesters.blogspot.fi 5
http://javafortesters.blogspot.pt 5
http://javafortesters.blogspot.mx 4
http://www.scoop.it 4
http://javafortesters.blogspot.com.tr 3
http://translate.googleusercontent.com 2
http://javafortesters.blogspot.dk 2
http://javafortesters.blogspot.be 2
http://javafortesters.blogspot.kr 2
http://javafortesters.blogspot.gr 2
http://feedly.com 1
http://javafortesters.blogspot.hu 1
http://www.365dailyjournal.com 1
http://newsblur.com 1
http://javafortesters.blogspot.hk 1
http://javafortesters.blogspot.sk 1
http://www.newsblur.com 1
http://www.blogger.com 1
http://javafortesters.blogspot.ch 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Maven troubleshooting tips and FAQs Maven troubleshooting tips and FAQs Presentation Transcript

    • Maven Troubleshooting Tips and FAQs Alan Richardson www.compendiumdev.co.uk www.eviltester.com www.seleniumsimplified.com www.javafortesters.com @eviltester
    • Maven is Great … when you get it working … most problems occur trying to get it working … at the point that you know least These Tips and FAQs can help you when you get stuck.
    • TIP: Debug maven issues from the command line, not from the IDE Use the command line to debug maven problems, that way it is just Maven and Java that you are working with. This way you can see the error messages generated.
    • TIP: Read the error messages If maven is complaining about corrupt jars then chances are something went wrong when it was downloading the dependencies, delete them and try again. If your compile is complaining that it can't find classes from libraries in your class path then maven didn't download the dependencies, delete them and try again. You might be able to run with the "-q" option to zoom in on errors, warnings and messages output by the plugins.
    • TIP: Read and work through "Maven in 5 minutes" Before doing anything. Read and work through "Maven in 5 minutes" http://maven.apache.org/guides/getting- started/maven-in-five-minutes.html This is a good check if you have installed maven correctly and if maven can connect to the internet. Since it is all done from the command line, any problems you encounter will be related to maven.
    • TIP: Compile without running tests mvn clean compile -DskipTests=true This helps you focus on the maven dependency problems, and you won’t be distracted by any other error messages.
    • Tip: Download issues Maven shows you the urls it tries to download, try them manually by entering the URL in your browser. Check your proxy settings, in case Maven is blocked by your firewall. If a url fails, and you aren't blocked try and force a download again with mvn clean -DskipTests=true
    • TIP: Set proxy settings for maven ● find the file in %M2_HOME%conf ● edit the settings.xml file Helpful Links: ● http://seleniumsimplified.com/2013/08/16/maven-proxies-troubleshooting- 404-errors/ ● http://www.mkyong.com/maven/how-to-enable-proxy-setting-in-maven/ ● http://stackoverflow.com/questions/4828567/maven-proxy-settings ● http://stackoverflow.com/questions/2354001/make-maven-proxy-server- settings-configurable-based-on-location?rq=1
    • TIP: Read the maven FAQs http://maven.apache.org/users/getting-help. html Read the maven "how to I get help" section http://maven.apache.org/users/getting-help. html
    • TIP: Read some other hints and tips see - Algorithm for troubleshooting “Maven doesn't work for me” problems http://stackoverflow. com/questions/2690343/algorithm-for- troubleshooting-maven-doesnt-work-for-me- problems
    • TIP: Force update of dependencies mvn clean compile -U -DskipTests=true
    • TIP: Delete your local repository cache from %UserProfile%.m2repository delete whichever folders you want from the cache to force a download, then do a ... mvn clean compile -DskipTests=true
    • TIP: Force a purge of local repository mvn dependency:purge-local-repository http://maven.apache.org/plugins/maven- dependency-plugin/purge-local-repository- mojo.html
    • TIP: Look at the effective pom and settings mvn help:effective-pom Shows you the full pom, with the fields, defaults, inheritence and paths. mvn help:effective-settings Shows the settings with full output
    • TIP: Use the dependency tree A bit more advanced but... mvn dependency:tree Can show you all dependencies and versions, if you have ordering clashes then this might reveal them.
    • Final Notes 1. Run Maven from the command line 2. Read the error messages 3. Google for the error messages. ○ Other people will have faced the same problem. 4. Experiment with these tips Do all of this, Before you ask for help. That way you will learn more about how maven works, and won’t be so dependent on other people.
    • Alan Richardson uk.linkedin.com/in/eviltester Independent Test Consultant based in the UK. He offers training and consultancy in Selenium WebDriver, Exploratory and Technical web testing. Contact Alan for training and consultancy tailored to your needs: http://compendiumdev.co.uk/contact Blogs and Websites ● CompendiumDev.co.uk ● SeleniumSimplified.com ● EvilTester.com ● JavaForTesters.com ● Twitter: @eviltester Online Training Courses ● Technical Web Testing 101 ○ Unow.be/at/udemy101 ● Intro to Selenium ○ Unow.be/at/udemystart ● Selenium 2 WebDriver API ○ Unow.be/at/udemyapi Videos youtube.com/user/EviltesterVideos Books Selenium Simplified Unow.be/rc/selsimp Java For Testers leanpub.com/javaForTesters