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.
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
- Found that this problem has been reported to maven here
- Root problem is that there is a space in the maven repository path location.
- Related bug has been raised in Java here, unfortunately closed as “will not be fixed”.
Solution
- Change the local repository location to a different path without spaces.
Configuring your Local Repository
- You can specify your user configuration in ${user.home}/.m2/settings.xml
- Location can be modified through the following configuration changes (to the above file)
<settings>
...
<localRepository>/path/to/local/repo/</localRepository>
...
</settings>
Written by Ravi Nallakukkala on March 25th, 2007 with no comments.
Read more articles on Build.