Friday, July 18, 2014

Solving Eclipse and Maven problems:

"Failed to read artifact descriptor for"


I've spent most of today trying to add a dependency for the Cassandra Java driver to a maven pom in eclipse with little luck at all.  Worst when I tried it on another machine it worked fine so it was something wrong with my mac laptop.  Nothign I did would work, I kept on getting a error " Failed to read artifact descriptor for com.datastax.cassandra" etc. Looking at:

Stackoverflow: Maven: Failed to read artifact descriptor 

It suggested Maven -> Update Project and click on the force option.  No joy there !  It was only when I tried a manual mvn -U clean install command that I got the full error:
 "Failed to execute goal on project testmaven: Could not resolve dependencies for project uk.ac.dundee.computing.aec:testmaven:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.datastax.cassandra:cassandra-driver-core:jar:2.0.3: Failed to read artifact descriptor for com.datastax.cassandra:cassandra-driver-core:jar:2.0.3: Could not transfer artifact com.datastax.cassandra:cassandra-driver-core:pom:2.0.3 from/to central (http://repo.maven.apache.org/maven2): Specified destination directory cannot be created: /Users/Administrator/.m2/repository/com/datastax/cassandra/cassandra-driver-core/2.0.3"
Looking at the permissions on /Users/Administrator/.m2/repository/com/datastax/cassandra/ did I see that the sub directories where owned by root. I must have used sudo at some point to manually build the cassandra java driver from a git repo (in fact I knew I did).

The answer then was to delete  /Administrator/.m2/repository/com/datastax and then run the force maven project update in eclipse.

All now works well !

Update to Java 1.8

I also ran into a problem changing the java version of a project from 1.5 to 1.7 or 1.8.  Yes you can change the project facet, but you'll find that a maven update will change it back to 1.5.  This stakoverflow has the correct answer:

Java. Warning - Build path specifies execution environment J2SE-1.4

Open the pom.xml file and add the following to the section
      <pluginManagement>  
           <plugins>  
                <plugin>  
                     <groupId>org.apache.maven.plugins</groupId>  
                     <artifactId>maven-compiler-plugin</artifactId>  
                     <configuration>  
                          <source>1.8</source>  
                          <target>1.8</target>  
                     </configuration>  
                </plugin>  
           </plugins>  
      </pluginManagement>  


You will need to do a maven update from eclipse after that.

Change Web app facet to 3.0

If you create a dynamic webapp from the file->new->maven project and select maven-archetype-webapp you may find that it is "stuck" at version 2.3.  If you try and change it to 2.4 or higher (3.1 for instance) you'll be prevented. Deep inside this thread is on stackoverflow is the correct answer (for me):

Cannot change version of project facet Dynamic Web Module to 3.0?


In eclipse, go to window->show vie -> navigator.  Now in the navigator window you should see the .settings folder.  Open the folder and open the file org.eclipse.wst.common.project.facet.core.xml  Inside that file you should see jst.web and you can change the webapp facet version there.  Again do a maven update from eclipse after that.

68 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. The truth is i really appreciate your article ^^ thanks for this really helps a lot my web development company in the Philippines

    ReplyDelete
  3. Your post has everything that is obtained complete and really useful. It's a beautiful presentation. It's really help to choose a web design company. This post is very good. Thank you for presenting a very good post.

    Web Design London | London Web Design Company

    ReplyDelete
  4. Virginia Web Design is one of the most professional and experienced web designing companies in the world.

    ReplyDelete
  5. Any way I'll be subscribing to your feed and I hope you post again soon.
    Signature:
    juegos juegos | juegos de matar zombies | jogos

    ReplyDelete
  6. You topic is very great and useful for us…thank you
    Signature:
    i like play games friv than play games games2girls and play game kids games online ! have fun!

    ReplyDelete
  7. This kind of errors in the source code are quite usual and we neglect the version update problems generally which might be the only solution. Thanks for alerting with the example, we are a Colorado Web Development company providing web design and development services at affordable prices.

    ReplyDelete
  8. Very Informative! This blog is great source of information which is very useful for me. Thank you very much for

    sharing this!
    web development company in delhi

    ReplyDelete
  9. I had visited your website which was really good I continuously read your post now I am Waiting for Next one.. Web Development & Website Design Company USA

    ReplyDelete
  10. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me
    Signature:
    facebook entrar iniciar sesion gratis - Sitio Oficial iniciado sesión en Facebook lengua española. facebook entrar rápido, facebook iniciar sesion en tu cuenta de entrar facebook

    ReplyDelete
  11. Thanks for sharing the information. It is very useful for my future. keep sharing
    Signature:
    Versión en facebook en español descargar a los países hablan Español: facebook entrar direto agora , facebook en español para and facebook entrar direto

    ReplyDelete
  12. This is extremely helpful info!! Very good work. Everything is very interesting to learn and easy to understood. Thank you for giving information.
    Signature:
    The place to play all unblocked games online. Here you can find every blocked games such as: unblockedgames , unblocked games happy , unblocked games 77 , gmod

    ReplyDelete
  13. I would like to thank you for your nicely written post
    Signature:
    download baixar facebook movel, Facebook movel, baixar facebook movel. Facebook chat, baixar whatsapp gratis, fazer o download baixar whatsapp para Android, iPhone. Últimas Facebook

    ReplyDelete
  14. Thanks for sharing the information related to web development services. If you are a good web development service provider than your business will grow definitely and you can beat the competitors easily.

    ReplyDelete
  15. I was working and suddenly I visits your site frequently and recommended it to me to read also. The writing style is superior and the content is relevant. Thanks for the insight you provide the readers!
    kids games online , friv 2 , jogos do friv , juegosjuegos.com , juegos de matar zombbies
    , juegos de un show mas

    ReplyDelete
  16. Great information....i have a getting the lot of information on this post...thank you for sharing the useful information...Website Designing Company Bangalore | Website Development Companies Bangalore

    ReplyDelete
  17. I am impressed by the quality of information on this website. There are a lot of good resources here. I am sure I will visit this blog again soon.
    happy wheels
    super mario bros
    pacman
    agario

    ReplyDelete
  18. Thanks for sharing the information. It is very useful for my future. keep sharing
    Kizi 123|
    Friv 234|
    Friv

    ReplyDelete
  19. Great info!! thanks for the share.Website designing and development is important factors to develop online business and possible to create awareness about services and products as it is an online portal.
    Web Designers in Bangalore|Logo Design in Bangalore

    ReplyDelete
  20. Hi. Today, I read!!!
    Your post has everything that is obtained complete and really useful.
    Thanks u for sharing.
    Run 3
    Head Soccer
    Juegos De Terror
    Mahjong Free Games
    Cool math 4 kids

    ReplyDelete
  21. I like the flash and free games. Here is one of my favorite games today.
    Friv 10

    ReplyDelete
  22. Hello to every body, it's my first pay a quick visit of this weblog; this weblog carries amazing and really excellent data in favor of readers.
    Friv 4
    Kizi 3

    ReplyDelete
  23. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write.
    Friv 10

    ReplyDelete
  24. Browse more than 600 job categories including programming, eBay, Amazon, photoshop, web development, design, writing, data entry and more on Freelancer. Join to http://www.freelancer.com and change your life forever!

    ReplyDelete
  25. You need to kill time, you need entertainment. Refer to our website. hope you get the most comfort.
    Thanks you for sharing!
    Yepi
    Kizi
    Friv
    Friv Games

    ReplyDelete
  26. you'd have time to look these kids active. Please visit our website and let us play the game interesting.
    Thanks for sharing !
    Friv 10
    Kizi 10
    Yepi 2

    ReplyDelete
  27. You are stressed and tired, you need entertainment. Refer to our website. hope you get the most comfortable.
    Kizi 4

    ReplyDelete
  28. You are stressed and tired, you need entertainment. Refer to our website. hope you get the most comfortable.
    Kizi 4

    ReplyDelete
  29. You are stressed and tired, you need entertainment. Refer to our website. hope you get the most comfortable.
    Kizi 4

    ReplyDelete
  30. What a wonderfull post! thank you... read with pleasure!
    Friv 100

    ReplyDelete
  31. You need to kill time, you need entertainment. Refer to our website. hope you get the most comfort.
    Thanks for sharing !
    Friv 5
    Kizi 1
    Yepi 3

    ReplyDelete
  32. What a wonderfull post! thank you... read with pleasure!
    Friv 100

    ReplyDelete
  33. thank you for your interest in welcome visit
    Friv 4

    ReplyDelete
  34. thank you for your interest in welcome visit
    Friv 4

    ReplyDelete
  35. thank you for your interest in welcome visit
    Friv 4

    ReplyDelete
  36. Thanks for sharing this information keep share more information like that iam waiting for your next article...
    Bangalore web development companies | Web development company Bangalore

    ReplyDelete
  37. Superb i got some valuable tips from here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.

    Hadoop Training in Chennai

    ReplyDelete
  38. New attractive game . I will play it every day
    Friv|
    Friv 2

    ReplyDelete
  39. When you're tired, you want to relax after a stressful working hours, you need to have time to take care of the kids active.
    Please visit our website and play exciting flash games.
    Thanks you for sharing!
    Friv 4

    ReplyDelete
  40. This blog explains the details of most popular technological details. This helps to learn about what are all the different method is there. And the working methods all of that are explained here. Informative blog.
    Hadoop Training in Chennai

    ReplyDelete
  41. Play the Best Free Games! We've picked out the racing games, cooking games, candy crush, games shooting, fashion games, ...
    Thanks for sharing !
    Kizi 200
    Friv 1
    Y88
    Y9

    ReplyDelete
  42. Hey, nice site you have here! Keep up the excellent work!

    Cassandra Training in Chennai

    ReplyDelete
  43. You want to relax after a stressful working hours. Refer to our website. hope you get the most comfort.
    Thanks for sharing !
    Friv 100
    Friv 8
    Friv 2

    ReplyDelete
  44. You want to relax after a stressful working hours. Refer to our website. Hope you get the most comfort.
    Thanks for sharing !
    GirlsGoGames
    Kizi 100
    Frvi

    ReplyDelete
  45. Hi there, You have done an incredible job. I’ll definitely digg it and personally recommend to my friends. I’m sure they’ll be benefited from this site..Keep update more excellent posts..

    Linux Training in Chennai Mylapore

    ReplyDelete
  46. You want to relax after a stressful working hours. Refer to our website. Hope you get the most comfort.
    Thanks for sharing !
    GirlsGoGames
    Kizi 100
    Frvi

    ReplyDelete
  47. invites you to play games for a chance to win cars Corolla Altis car

    Friv Games
    Kizi 100
    Games2Win
    Kizi 5

    ReplyDelete

  48. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.

    Digital Marketing Company in Chennai

    Digital Marketing Services in Chennai

    ReplyDelete
  49. It's like you read my mind! You seem to know a lot about this, like you wrote the book in it or something. I think that you can do with some pics to drive the message home a little bit, but instead of that, this is fantastic blog. A great read. I will definitely be back.

    SMO Services Chennai


    ReplyDelete


  50. Awesome article. It is so detailed and well formatted that i enjoyed reading it as well as get some new information too.


    Selenium training in Chennai

    ReplyDelete
  51. You'd have time to look these kids active. Please visit our website and let us play the games interesting.
    Thanks you for sharing !
    Friv 100
    Friv 8
    Friv 2

    ReplyDelete
  52. You need to have time to take care of the kids active. Please visit our website and play exciting flash games.
    Thanks you for sharing!
    Games2Girls
    Kizi 1000
    Frin
    Friv 3

    ReplyDelete
  53. You need to kill time, you need entertainment. Refer to our website. hope you get the most comfort.
    http://smsmarketingdubai-me.com/

    ReplyDelete
  54. Great post!! This can be one particular of the most useful blogs We’ve ever arrive across on this subject. Basically Wonderful. I am also a specialist in this topic so I can understand your hard work.

    Web development company in Chennai

    ReplyDelete
  55. You need to have time to take care of the kids active. Please visit our website and play exciting flash games.
    Thanks you for sharing!
    Games2Girls
    Kizi 1000
    Frin
    Friv 3

    ReplyDelete
  56. Superb i really enjoyed very much with this article here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your updation.
    Software Testing Training

    ReplyDelete
  57. your post is really awesome and i got more information from your blog thus it is really nice and interesting , i like your blog very much.


    Android Training in Chennai

    ReplyDelete
  58. Thanks for sharing the information. It is very useful for my future. keep sharing. Can you play more games at: Friv | Kizi 4 | happy wheels

    ReplyDelete