Hi,

Doing the following in an ant project causes a java.lang.ClassCastException: 
org.apache.maven.artifact.ant.LocalRepository--

       <taskdef classpathref="ant.classpath" 
classname="org.apache.maven.artifact.ant.DependenciesTask" name="dependencies" 
/>
       <typedef classpathref="ant.classpath" 
classname="org.apache.maven.artifact.ant.LocalRepository" 
name="localRepository" />

       <localRepository id="local.lib.repository" layout="default" 
path="${local-repository.path}" />

       <dependencies pathId="compile.classpath" verbose="true">
              <!-- dependencies listed here -->
              <localRepository refid="local.lib.repository" />
       </dependencies>

However, the following works fine--

       <taskdef classpathref="ant.classpath" 
classname="org.apache.maven.artifact.ant.DependenciesTask" name="dependencies" 
/>
       <typedef classpathref="ant.classpath" 
classname="org.apache.maven.artifact.ant.LocalRepository" 
name="localRepository" />

       <dependencies pathId="compile.classpath" verbose="true">
              <!-- dependencies listed here -->
              <localRepository layout="default" path="${local-repository.path}" 
/>
       </dependencies>

Same thing happens for the RemoteRepository type.  Any ideas why this might be 
happening?

Thanks,
David

Reply via email to