Build

You are currently browsing the articles from Java Blog - Java, J2EE, SOA, Spring and Hibernate matching the category Build.

Displaying Classpath in ANT

Here’s a sample code by which one can display the classpath

<path id=”test.classpath“>
   <path path=”${test.dir}”/>
   <fileset dir=”${config.dir}/lib”>
    <include name=”*-all.jar” />
   </fileset>
  </path>
  <property name=”current.test.classpath” refid=”test.classpath“/>
  
                <echo level=”info”> message=”test.classpath=${current.test.classpath}” </echo>

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

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.