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.

72 comments:

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

    ReplyDelete
    Replies
    1. IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents.

      IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation.

      corporate training in chennai corporate training in chennai

      corporate training companies in india corporate training companies in india

      corporate training companies in chennai corporate training companies in chennai

      I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai Project Centers in Chennai

      Delete
  2. I have picked cheery a lot of useful clothes outdated of this amazing blog. I’d love to return greater than and over again. Thanks! 
    python course in pune
    python course in chennai
    python course in Bangalore

    ReplyDelete
  3. Excellant post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    Best Devops Training in pune
    Devops interview questions and answers

    ReplyDelete
  4. Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.
    Best AWS Training in Chennai | Amazon Web Services Training in Chennai
    Best AWS Amazon Web Services Training Course in Bangalore | Amazon Web Services AWS Training in Bangalore
    AWS Online Training and Certification | Online AWS Certification Course - Gangboard

    ReplyDelete
  5. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    rpa training in bangalore
    best rpa training in bangalore
    RPA training in bangalore
    RPA courses in bangalore

    ReplyDelete
  6. In this post having more usefull information and improve our knowledge.Can you share more valuable information present Technology.
    I like your page.Businesses have become very sophisticated today. It is even much likely that most sellers and producers never get to see the actual clients who consume their goods, and vice versa.Thanks for great information you write it very clean. I am very lucky to get this tips from you.
    Logistics Software
    Fleet Management system
    ERP Software Companies
    Manufacturing ERP
    Human Resources Management Software
    CCTV Camera Dealers in Chennai

    ReplyDelete
  7. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
    rpa training in bangalore
    best rpa training in bangalore
    rpa training in pune

    ReplyDelete
  8. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.
    Most of ideas can be nice content.The people to give them a good shake to get your point and across the command.

    Java training in Chennai

    Java training in Bangalore

    Java online training

    Java training in Pune


    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    python Online training in chennai
    python training institute in marathahalli
    python training institute in btm
    Python training course in Chennai

    ReplyDelete
  11. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.
    AWS Training in Bangalore with Placements | AWS Training in Bangalore Cost
    AWS Training in Pune With Placement | AWS Devops Training in Pune
    AWS Online Training | AWS Online Training Cost
    AWS Training in Bangalore cost| Aws training in Bangalore Besant Technologies

    ReplyDelete
  12. It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
    Data Science training in Chennai
    Data science training in Bangalore
    Data science training in pune
    Data science online training
    Data Science Interview questions and answers
    Data Science Tutorial
    Data science training in bangalore

    ReplyDelete
  13. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 
    Best Devops online Training
    Online DevOps Certification Course - Gangboard

    ReplyDelete
  14. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.
    microsoft azure training in bangalore
    rpa training in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete




  15. Thanks For Sharing Your information Please keep updating us The Information Shared Is Very valuable Time Just Went On redaing The article Python Online Training Data Science Online Training Aws Online Training Hadoop Online Training

    ReplyDelete
  16. Thanks For Sharing The Information Please Keep Updating us Information Shared Is Very Valuable Time Just Went On Reading The Article Python Online Training AWS Online Training Data Science Online Training Data Science Online Training Hadoop Online Training

    ReplyDelete
  17. Great Post,really it was very helpful for us.
    Thanks a lot for sharing!
    I found this blog to be very useful!!
    Web Design and Development training in Bangalore

    ReplyDelete
  18. I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog. All the best.
    interior designers in chennai
    best interior designers in chennai

    ReplyDelete
  19. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    AWS Training in Electronic City

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. Nice Post
    For Data science training in bangalore, Visit:
    Data Science training in bangalore

    ReplyDelete
  22. Good Post
    "Sanjary Academy provides excellent training for Piping design course. Best Piping Design Training Institute in Hyderabad,
    Telangana. We have offer professional Engineering Course like Piping Design Course,QA / QC Course,document Controller
    course,pressure Vessel Design Course, Welding Inspector Course, Quality Management Course, #Safety officer course."
    Piping Design Course in India­
    Piping Design Course in Hyderabad
    Piping Design Course in Hyderabad
    QA / QC Course
    QA / QC Course in india
    QA / QC Course in Hyderabad
    Document Controller course
    Pressure Vessel Design Course
    Welding Inspector Course
    Quality Management Course
    Quality Management Course in india
    Safety officer course

    ReplyDelete
  23. Nice Post
    Yaaron Studios is one of the rapidly growing editing studios in Hyderabad. We are the best Video Editing services in Hyderabad. We provides best graphic works like logo reveals, corporate presentation Etc. And also we gives the best Outdoor/Indoor shoots and Ad Making services.
    video editors studio in hyderabad
    short film editors in hyderabad
    corporate video editing studio in hyderabad
    ad making company in hyderabad

    ReplyDelete
  24. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.
    Data science Course Training in Chennai |Best Data Science Training Institute in Chennai

    ReplyDelete
  25. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.
    Data science Course Training in Chennai |Best Data Science Training Institute in Chennai

    ReplyDelete
  26. Wow it is really wonderful and awesome thus it is veWow, it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot.

    python training in bangalore

    python courses in bangalore

    python classes in bangalore

    python training institute in bangalore

    python course syllabus

    best python training

    python training centers

    ReplyDelete
  27. This is the exact information I am been searching for, Thanks for sharing the required infos with the clear update and required points. To appreciate this I like to share some useful information.

    aws training in bangalore

    aws courses in bangalore

    aws classes in bangalore

    aws training institute in bangalore

    aws course syllabus

    best aws training

    aws training centers

    ReplyDelete
  28. This is my 1st visit to your web... But I'm so impressed with your content. Good Job!
    interior decorators in chennai
    Modular kitchen in chennai

    ReplyDelete
  29. Great content thanks for sharing this informative blog which provided me technical information keep posting.
    Best Interior Designers
    home interiors in chennai
    Commercial interior designers in chennai

    ReplyDelete
  30. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
    Pooja room interior desingers in chennai
    Hotel Interior desingers in chennai
    Hospital interior designers in chennai

    ReplyDelete
  31. Nice blog,I understood the topic very clearly,And want to study more like this.
    Data Scientist Course

    ReplyDelete
  32. It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.
    best digital marketing company
    digital marketing agency in chennai
    digital marketing services
    website design company

    ReplyDelete
  33. It was worth visiting your blog and I have bookmarked your blog. Hope to visit again
    interior designers in chennai

    ReplyDelete
  34. Really awesome blog!!! I finally found a great post here.I really enjoyed reading this article. Nice article on data science . Thanks for sharing your innovative ideas to our vision. Your writing style is simply awesome with useful information. Very informative, Excellent work! I will get back here.Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

    ReplyDelete
  35. Nice content very helpful, It has a very important point which should be noted down. All points were mentions and very well written. Keep Posting & writing such content.


    Online AWS Certification Training
    online aws Course

    ReplyDelete
  36. It is for the first that I just visited your site and I find it really interesting! Congratulations! please visit for latesetnews

    ReplyDelete
  37. It is for the first that I just visited your site and I find it really interesting! Congratulations! please visit for latesetnews

    ReplyDelete
  38. It's excellent article post. 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. I really cannot thank you enough for sharing. But I'll give you a small knowledge about Server Hosting. so I’d recommend to customers a hosting plan Onlive Server. because it provides the USA VPS Hosting and here is many more plans with fully knowledge of hosting are at on very low-cost.

    ReplyDelete
  39. Thanks for giving a wonderful article. If you want to promote your blog page or your product or your business then go for bulk sms service Chennai, they provide the best bulk sms service.

    bulk sms in bangalore | bulk sms explicit Bangalore | promotional sms provider | bulk sms reseller mysuru | SMS API | bulk sms gateway | sms implicit

    ReplyDelete
  40. Thanks for the valuable feedback. If you want the most cost-effective bulk sms service in chennai to reach your customer. Don't worry here plenty of companies provide bulk sms for businesses or individuals. Search transactional bulk sms, you can get a lot of answers.

    Transactional SMS Chennai
    OTP SMS
    Service Implicit Coimbatore

    ReplyDelete
  41. Very useful to read your article daily. Thanks for giving such information. You can check bulk sms service to promote your business or any products, we provide different kinds of Bulk SMS services Without DLT | Free SMS API | Free Registration, promotional bulk sms used to promote your product and business in a most effective and reliable way to establish your businesses. It allows you to get a higher income and get a customer easily. transactional sms service used to send other alerts and transactional sms.

    ReplyDelete
  42. Hire ReactJS Developers from CronJ to leverage 9+ years of React handling and 15+ industrial experience at just $8 per hour!

    hire reactjs developers
    hire react developer

    ReplyDelete