Problem resolving artifacts from local ivy repository generated by SBT


(jeppe) #1

We’re primarily using artifacts from remote maven repos (sonatype etc), but sometimes need to try out some local changes to a library which is published locally to ~/.ivy2 with SBT.

In my gradle (using 1.0) file I add this

ivy {
          ivyPattern '/Users/jeppe/.ivy2/local/[organisation]/[module]/[revision]/ivys/ivy.xml'
          artifactPattern '/Users/jeppe/.ivy2/local/[organisation]/[module]/[revision]/jars/[module].[ext]'
        }

and

compile
group: 'net.liftweb', name: "lift-webkit_$scalaVersion", version: "$liftVersion" , configuration: "compile"

But it seems gradle tries to resolve the pom file which is not found (though it exists in the poms dir)

Any hints? It’s not possible to modify the generated ivy info…

Here’s an excerpt of the stacktrace

11:03:32.110 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain] Attempting to download net.liftweb#lift-webkit_2.9.1;2.5-SNAPSHOT!lift-webkit_2.9.1.jar(src) using repository 'ivy'
11:03:32.112 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper]
 tried /Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/jars/lift-webkit_2.9.1.jar
11:03:32.113 [DEBUG] [org.gradle.api.internal.artifacts.repositories.ExternalResourceResolver] Loading /Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/jars/lift-webkit_2.9.1.jar
11:03:32.116 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on artifact cache (/Users/jeppe/.gradle/caches/artifacts-13).
11:03:32.119 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:03:32.122 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Opening cache artifact-at-url.bin (/Users/jeppe/.gradle/caches/artifacts-13/artifact-at-url.bin)
11:03:32.125 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-url.bin (/Users/jeppe/.gradle/caches/artifacts-13/artifact-at-url.bin)
11:03:32.127 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/Users/jeppe/.gradle/caches/artifacts-13).
11:03:32.130 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper]
[NOT REQUIRED] net.liftweb#lift-webkit_2.9.1;2.5-SNAPSHOT!lift-webkit_2.9.1.jar(src)
11:03:32.133 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain] Attempting to download net.liftweb#lift-webkit_2.9.1;2.5-SNAPSHOT!lift-webkit_2.9.1.jar(doc) using repository 'ivy'
11:03:32.151 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper]
 tried /Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/jars/lift-webkit_2.9.1.jar
11:03:32.255 [DEBUG] [org.gradle.api.internal.artifacts.repositories.ExternalResourceResolver] Loading /Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/jars/lift-webkit_2.9.1.jar
11:03:32.260 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on artifact cache (/Users/jeppe/.gradle/caches/artifacts-13).
11:03:32.260 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:03:32.261 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Opening cache artifact-at-url.bin (/Users/jeppe/.gradle/caches/artifacts-13/artifact-at-url.bin)
11:03:32.261 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-url.bin (/Users/jeppe/.gradle/caches/artifacts-13/artifact-at-url.bin)
11:03:32.263 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/Users/jeppe/.gradle/caches/artifacts-13).
11:03:32.264 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper]
[NOT REQUIRED] net.liftweb#lift-webkit_2.9.1;2.5-SNAPSHOT!lift-webkit_2.9.1.jar(doc)
11:03:32.265 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain] Attempting to download net.liftweb#lift-webkit_2.9.1;2.5-SNAPSHOT!lift-webkit_2.9.1.pom using repository 'ivy'
11:03:32.265 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper]
 tried /Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/jars/lift-webkit_2.9.1.pom
11:03:32.266 [DEBUG] [org.gradle.api.internal.artifacts.repositories.ExternalResourceResolver] Loading /Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/jars/lift-webkit_2.9.1.pom
11:03:32.266 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on artifact cache (/Users/jeppe/.gradle/caches/artifacts-13).
11:03:32.267 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
11:03:32.267 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Opening cache artifact-at-url.bin (/Users/jeppe/.gradle/caches/artifacts-13/artifact-at-url.bin)
11:03:32.268 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-url.bin (/Users/jeppe/.gradle/caches/artifacts-13/artifact-at-url.bin)
11:03:32.269 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/Users/jeppe/.gradle/caches/artifacts-13).
11:03:32.269 [DEBUG] [org.gradle.api.internal.artifacts.repositories.ExternalResourceResolver] Resource not reachable for net.liftweb#lift-webkit_2.9.1;2.5-SNAPSHOT: res=org.gradle.api.internal.externalresource.ExternalResourceIvyResourceAdapter@4e2e29c
11:03:32.272 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':fzlib:compileScala'
11:03:32.291 [ERROR] [org.gradle.BuildExceptionReporter]
 11:03:32.292 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:03:32.293 [ERROR] [org.gradle.BuildExceptionReporter]
 11:03:32.293 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
11:03:32.293 [ERROR] [org.gradle.BuildExceptionReporter] Could not resolve all dependencies for configuration ':fzlib:compile'.
11:03:32.419 [ERROR] [org.gradle.BuildExceptionReporter] > Artifact 'net.liftweb:lift-webkit_2.9.1:2.5-SNAPSHOT@pom' not found.
11:03:32.419 [ERROR] [org.gradle.BuildExceptionReporter]
 11:03:32.420 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
11:03:32.421 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':fzlib:compile'.
11:03:32.424 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.wrapException(ErrorHandlingArtifactDependencyResolver.java:47)
11:03:32.427 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.access$000(ErrorHandlingArtifactDependencyResolver.java:26)
11:03:32.431 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingArtifactDependencyResolver.java:80)
11:03:32.435 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:460)
11:03:32.436 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:203)
11:03:32.437 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)
11:03:32.460 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:191)
11:03:32.461 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:103)
11:03:32.555 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:75)
11:03:32.555 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:182)
11:03:32.555 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:98)
11:03:32.556 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:75)
11:03:32.556 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.CompositeFileCollection$1.resolve(CompositeFileCollection.java:88)
11:03:32.556 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections(CompositeFileCollection.java:143)
11:03:32.556 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.CompositeFileTree.getSourceCollections(CompositeFileTree.java:30)
11:03:32.556 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.CompositeFileCollection.getFiles(CompositeFileCollection.java:38)
11:03:32.557 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:60)
11:03:32.557 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.DefaultFileSnapshotter.snapshot(DefaultFileSnapshotter.java:42)
11:03:32.557 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.InputFilesChangedUpToDateRule.create(InputFilesChangedUpToDateRule.java:35)
11:03:32.557 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.CompositeUpToDateRule.create(CompositeUpToDateRule.java:35)
11:03:32.557 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$HistoricExecution.calcCurrentState(DefaultTaskArtifactStateRepository.java:80)
11:03:32.558 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$HistoricExecution.isUpToDate(DefaultTaskArtifactStateRepository.java:88)
11:03:32.558 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:128)
11:03:32.558 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactStateRepository$ShortCircuitArtifactState.isUpToDate(ShortCircuitTaskArtifactStateRepository.java:77)
11:03:32.558 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifactStateRepository$1.isUpToDate(FileCacheBroadcastTaskArtifactStateRepository.java:37)
11:03:32.558 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:44)
11:03:32.559 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
11:03:32.559 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
11:03:32.559 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
11:03:32.559 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
11:03:32.559 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
11:03:32.560 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:247)
11:03:32.560 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:192)
11:03:32.560 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:177)
11:03:32.560 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:83)
11:03:32.561 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:36)
11:03:32.561 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
11:03:32.561 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
11:03:32.562 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
11:03:32.562 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
11:03:32.563 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:111)
11:03:32.563 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)
11:03:32.563 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:109)
11:03:32.563 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:103)
11:03:32.564 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
11:03:32.565 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
11:03:32.565 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
11:03:32.566 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
11:03:32.567 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
11:03:32.567 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
11:03:32.567 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
11:03:32.567 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
11:03:32.568 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155)
11:03:32.568 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
11:03:32.569 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
11:03:32.569 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42)
11:03:32.569 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28)
11:03:32.570 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
11:03:32.571 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
11:03:32.571 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
11:03:32.571 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
11:03:32.572 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:31)
11:03:32.572 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:20)
11:03:32.572 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.Main.doAction(Main.java:48)
11:03:32.573 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:45)
11:03:32.573 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.Main.main(Main.java:39)
11:03:32.573 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
11:03:32.573 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:32)
11:03:32.579 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
11:03:32.580 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
11:03:32.580 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
11:03:32.581 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:47)
11:03:32.581 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ArtifactNotFoundException: Artifact 'net.liftweb:lift-webkit_2.9.1:2.5-SNAPSHOT@pom' not found.
11:03:32.581 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain$ModuleVersionRepositoryBackedArtifactResolver.resolve(UserResolverChain.java:168)
11:03:32.582 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver$ErrorHandlingArtifactResolver.resolve(LazyDependencyToModuleResolver.java:59)
11:03:32.582 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1$1.create(ResolvedArtifactFactory.java:39)
11:03:32.582 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1$1.create(ResolvedArtifactFactory.java:37)
11:03:32.583 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)
11:03:32.583 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:99)
11:03:32.583 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:49)
11:03:32.583 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1.get(ResolvedArtifactFactory.java:37)
11:03:32.584 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.DefaultResolvedArtifact.getFile(DefaultResolvedArtifact.java:107)
11:03:32.584 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactFileResolver.getFile(DefaultLenientConfiguration.java:137)
11:03:32.585 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFiles(DefaultLenientConfiguration.java:115)
11:03:32.587 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFilesStrict(DefaultLenientConfiguration.java:98)
11:03:32.588 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.getFiles(DefaultResolvedConfiguration.java:45)
11:03:32.588 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.getFiles(SelfResolvingDependencyResolver.java:56)
11:03:32.594 [ERROR] [org.gradle.BuildExceptionReporter]
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingArtifactDependencyResolver.java:78)

and here’s the ivy.xml for the artifact

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
 <info organisation="net.liftweb" module="lift-webkit_2.9.1" revision="2.5-SNAPSHOT" status="integration" publication="20120720103903">
  <license name="Apache License, Version 2.0" url="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
  <description homepage="http://www.liftweb.net">
  Webkit Library
  </description>
 </info>
 <configurations>
  <conf name="compile" visibility="public" description=""/>
  <conf name="runtime" visibility="public" description="" extends="compile"/>
  <conf name="test" visibility="public" description="" extends="runtime"/>
  <conf name="provided" visibility="public" description=""/>
  <conf name="optional" visibility="public" description=""/>
                  <conf name="sources" visibility="public" description=""/>
  <conf name="docs" visibility="public" description=""/>
  <conf name="pom" visibility="public" description=""/>
 </configurations>
 <publications>
  <artifact name="lift-webkit_2.9.1" type="pom" ext="pom" conf="pom"/>
  <artifact name="lift-webkit_2.9.1" type="jar" ext="jar" conf="compile"/>
  <artifact name="lift-webkit_2.9.1" type="src" ext="jar" conf="sources" e:classifier="sources"/>
  <artifact name="lift-webkit_2.9.1" type="doc" ext="jar" conf="docs" e:classifier="javadoc"/>
 </publications>
 <dependencies>
  <dependency org="net.liftweb" name="lift-util_2.9.1" rev="2.5-SNAPSHOT" conf="compile->default(compile)">
                      </dependency>
  <dependency org="net.liftweb" name="lift-testkit_2.9.1" rev="2.5-SNAPSHOT" conf="provided->default(compile)">
                      </dependency>
  <dependency org="org.scala-tools.testing" name="specs_2.9.1" rev="1.6.9" conf="test->default(compile)"/>
  <dependency org="org.scala-tools.testing" name="scalacheck_2.9.1" rev="1.9" conf="test->default(compile)"/>
  <dependency org="org.scala-lang" name="scala-library" rev="2.9.1" conf="compile->default(compile)"/>
  <dependency org="commons-fileupload" name="commons-fileupload" rev="1.2.2" conf="compile->default(compile)"/>
  <dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="provided->default(compile)"/>
  <dependency org="org.scala-tools.testing" name="specs_2.9.1" rev="1.6.9" conf="provided->default(compile)"/>
  <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.26" conf="test->default(compile)"/>
  <dependency org="net.sourceforge.jwebunit" name="jwebunit-htmlunit-plugin" rev="2.5" conf="test->default(compile)"/>
  <exclude org="org.scala-lang" module="scala-library" artifact="*" type="jar" ext="*" matcher="exact"/>
  <exclude org="org.scala-lang" module="scala-compiler" artifact="*" type="jar" ext="*" matcher="exact"/>
  <override org="org.scala-lang" module="scala-library" matcher="exact" rev="2.9.1"/>
  <override org="org.scala-lang" module="scala-compiler" matcher="exact" rev="2.9.1"/>
 </dependencies>
</ivy-module>

#2

There are 2 things that seem to be causing problems here: 1) Your ‘artifactPattern’ does not accurately describe how to find ‘pom’, ‘src’ or ‘doc’ artifacts in your repository. Without knowing the exact structure of your repository I can’t be sure, but I would guess that you need something like this:

artifactPattern '.../[organisation]/[module]/[revision]/[type]/[module].[ext]'
  1. For some reason, you’re resolving all configurations of the module, rather than just the ‘compile’ configuration. The dependency declaration you gave should not trigger this: is it possible this module is being referenced as a transitive dependency as well?

(jeppe) #3

Thanks,

Somehow I missed the [type]. Using this works for compilation:

artifactPattern '/Users/jeppe/.ivy2/local/[organisation]/[module]/[revision]/[type]s/[module].[ext]'

While not critical, the source jars are not found when generating e.g an eclipse project. The local repo structure looks like this:

jeppe@jnmmbp~/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT:find .
.
./docs
./docs/lift-webkit_2.9.1-javadoc.jar
./docs/lift-webkit_2.9.1-javadoc.jar.md5
./docs/lift-webkit_2.9.1-javadoc.jar.sha1
./ivys
./ivys/ivy.xml
./ivys/ivy.xml.md5
./ivys/ivy.xml.sha1
./jars
./jars/lift-webkit_2.9.1.jar
./jars/lift-webkit_2.9.1.jar.md5
./jars/lift-webkit_2.9.1.jar.sha1
./poms
./poms/lift-webkit_2.9.1.pom
./poms/lift-webkit_2.9.1.pom.md5
./poms/lift-webkit_2.9.1.pom.sha1
./srcs
./srcs/lift-webkit_2.9.1-sources.jar
./srcs/lift-webkit_2.9.1-sources.jar.md5
./srcs/lift-webkit_2.9.1-sources.jar.sha1

Now, an added complexity is that we use an artifact, fetched from a remote maven repo, that relies on the local artifact. When I add this dependency:

compile group: ‘net.liftweb’, name: “lift-widgets_$scalaVersion”, version: “$liftVersion”

I get the following error:

Artifact ‘net.liftweb:lift-webkit_2.9.1:2.5-SNAPSHOT:sources@jar’ not found

Wonder if they are related? Is there still something missing from the pattern to resolve e.g. sources?


(jeppe) #4

Ok,

A little googling revealed [classifier], so this seems to work for compilation:

artifactPattern '/Users/jeppe/.ivy2/local/[organisation]/[module]/[revision]/[type]s/[module](-[classifier]).[ext]'

But the eclipse .classpath doesn’t contain source attachments for the local jars and it also contains some strange looking dependencies:

<classpathentry kind="lib" path="/Users/jeppe/.ivy2/local/net.liftweb/lift-testkit_2.9.1/2.5-SNAPSHOT/jars/lift-testkit_2.9.1.jar" exported="true"/>
        <classpathentry kind="lib" path="/Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/srcs/lift-webkit_2.9.1-sources.jar" exported="true"/>
        <classpathentry kind="lib" path="/Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/docs/lift-webkit_2.9.1-javadoc.jar" exported="true"/>
        <classpathentry kind="lib" path="/Users/jeppe/.ivy2/local/net.liftweb/lift-webkit_2.9.1/2.5-SNAPSHOT/poms/lift-webkit_2.9.1.pom" exported="true"/>

#5

Using an Ivy repository to serve up dependencies of a Maven-repo module can be confusing: http://forums.gradle.org/gradle/topics/mixed_dependencies_in_maven_and_ivy_repositories_are_not_resolved_as_expected


(jeppe) #6

If I understand this correctly, the problem is that my local ivy artifacts don’t have the master configuration?

Is there any workaround for this on the gradle side if I can’t change the ivy.xmls?