Maven 2 : java.net.URISyntaxException : Illegal character in path at index 18:

Environment Maven 2.0/ Windows XP/ Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)

I had a peculiar problem with Maven 2.0, my builds were working fine and one fine monday morning, I got a problem

Caused by: java.lang.RuntimeException: Not a valid URL: file:/C:/Documents and Settings/rnallakukkala/.m2

/repository/com/dpwn/newops/server/core/model/1.0-SNAPSHOT/model- 1.0-SNAPSHOT.jar
at org.jboss.util.file.ArchiveBrowser.getBrowser(Unknown Source)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:588)
… 75 more
Caused by: java.net.URISyntaxException : Illegal character in path at index 18: file:/C:/Documents and Settings/rnallakukkala/.m2/repository/com/dpwn/newops/server/core/model/1.0-SNAPSHOT/model-1.0-SNAPSHOT.jar
at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.checkChars(URI.java:2989)
at java.net.URI$Parser.parseHierarchical(URI.java:3073)
at java.net.URI$Parser.parse(URI.java:3021)
at java.net.URI.<init>(URI.java:578)

when trying to look for a dependency jar (this dependency jar is available in my local repository)

Additional Information for this problem

Solution

Configuring your Local Repository

<settings>

  ...
  <localRepository>/path/to/local/repo/</localRepository>
  ...
</settings>

Written by Ravi Nallakukkala on March 25th, 2007 with no comments.
Read more articles on Build.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .