• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven - Error merging velocity templates: C:\Windows\system32\my-app\pom.xml

 
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to learn Maven; I downloaded it, unzipped it and set "<localRepository>C:\Java\maven_repo</localRepository>" in settings.xml. At section 2.2 of the book "Better Builds with Maven" it says to execute "mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app". I am the error "Error merging velocity templates: C:\Windows\system32\my-app\pom.xml (The system cannot find the path specified)".



 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your current working directory? I hope that it is not C:\Windows\system32! I do all of my work in c:\opt.
 
Alejandro Barrero
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your answer. I have never set a current working directory; I didn't even know it was possible. I ran echo %cd% in DOS and got "C:\Windows\system32"; I then created the system variable cd as "C:\Java\apache-maven-3.0.3\Local Directory" and after restarting the computer, echo %cd% gave me the value. However, I am still getting the same error from Maven; I am at a loss.
 
Alejandro Barrero
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem was that I was running the command on "C:\Windows\system32" and it bwas trying to created a directory there.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I was running the command on "C:\Windows\system32" and it bwas trying to created a directory there.


That is what I thought. Don't do that, especially in Windows 7 or Server 2008 SR2 (or Vista for that matter) because that is a "protected" directory and you need additional permissions to change things there.

The best thing to do is create a directory elsewhere and work in there. With Windows 7, working in c:\users\xxx\Documents is acceptable - at least there are no spaces in the path.
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic