Hello, I’m on Gradle 1.8 and I have a local Ivy repository and one in SVN. Prior to upgrade to Gradle 1.8, I was using the add(FileSystemResolver) and add(SvnResolver) respectively.
After seeing the deprecated warnings for add, I’ve attempted to use the ivy DSL, however, for the Ivy via svn repository, I’m seeing this error:
A problem occurred evaluating root project 'myproject-ws-trunk'.
> Could not resolve all dependencies for configuration ':compileCopy'.
> Could not resolve com.mycompany:my-api:5.2.+.
Required by:
com.mycompany:myproject-ws-trunk:unspecified
> Could not list versions using Ivy pattern 'https://<mysvnrepository>/svn/ctsvn/ivy/repository/[organisation]/[module]/[revision]/ivy.xml'.
> Unable to parse Http directory listing
> Unsupported ContentType text/xml for DirectoryListing
The build.gradle snippet is:
ivy {
name "local"
ivyPattern "${USER_HOME}/.build/local/[organisation]/[module]/[revision]/ivy.xml"
artifactPattern "${USER_HOME}/.build/local/[organisation]/[module]/[revision]/[artifact](-[classifier])-[revision].[ext]"
}
ivy {
name "ivysvn"
url "https://<mysvnrepository>/svn/ctsvn/ivy/repository"
layout "pattern", {
ivy "[organisation]/[module]/[revision]/ivy.xml"
artifact "[organisation]/[module]/[revision]/[artifact](-[classifier])-[revision].[ext]"
}
credentials {
username 'jsmith'
password 'mypassword'
}
}
Web server and svn details: Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 DAV/2 SVN/1.6.16 PHP/5.3.3
The stack trace is:
Caused by: org.gradle.api.internal.resource.ResourceException: Could not list versions using Ivy pattern 'https://<mysvnrepository>/svn/ctsvn/ivy/repository/[organisation]/[module]/[revision]/ivy.xml'.
at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.visit(ResourceVersionLister.java:60)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.listVersionsForAllPatterns(ExternalResourceResolver.java:316)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.findDynamicResourceUsingPatterns(ExternalResourceResolver.java:307)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.findResourceUsingPatterns(ExternalResourceResolver.java:283)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.findIvyFileRef(ExternalResourceResolver.java:254)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.getDependency(ExternalResourceResolver.java:155)
at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.getDependency(ExternalResourceResolver.java:148)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockingModuleVersionRepository$1.run(CacheLockingModuleVersionRepository.java:45)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:214)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:276)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.longRunningOperation(DefaultCacheLockingManager.java:50)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockingModuleVersionRepository.getDependency(CacheLockingModuleVersionRepository.java:43)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository.getDependency(CachingModuleVersionRepository.java:87)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.CachedRepository.getDependency(CachedRepository.java:54)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain$RepositoryResolveState.resolve(UserResolverChain.java:183)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.findLatestModule(UserResolverChain.java:97)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.findLatestModule(UserResolverChain.java:80)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.resolve(UserResolverChain.java:55)
... 95 more
Caused by: org.gradle.api.internal.resource.ResourceException: Unable to parse Http directory listing
at org.gradle.api.internal.externalresource.transport.http.HttpResourceLister$1.transform(HttpResourceLister.java:57)
at org.gradle.api.internal.externalresource.transport.http.HttpResourceLister$1.transform(HttpResourceLister.java:49)
at org.gradle.api.internal.externalresource.AbstractExternalResource.withContent(AbstractExternalResource.java:60)
at org.gradle.api.internal.externalresource.transport.http.HttpResourceLister.list(HttpResourceLister.java:49)
at org.gradle.api.internal.externalresource.transport.DefaultExternalResourceRepository.list(DefaultExternalResourceRepository.java:119)
at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.listAll(ResourceVersionLister.java:145)
at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.listRevisionToken(ResourceVersionLister.java:73)
at org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister$1.visit(ResourceVersionLister.java:53)
... 114 more
Caused by: org.gradle.api.internal.resource.ResourceException: Unsupported ContentType text/xml for DirectoryListing
at org.gradle.api.internal.externalresource.transport.http.ApacheDirectoryListingParser.parse(ApacheDirectoryListingParser.java:45)
at org.gradle.api.internal.externalresource.transport.http.HttpResourceLister$1.transform(HttpResourceLister.java:54)
... 121 more
Any help would be appreciated.