gradle常春藤解析器为单独的ivys和文物

时间:2014-11-22 21:53:20

标签: gradle ivy

我基本上需要双重解析器的功能,但是不能让它以我想要的方式工作或者没有gradle工作的方式。我的猜测是gradle就是不能做我想要的。在这种情况下,我希望最新版本可以通过ivys定义,它可以在常春藤的存储库中看到,该存储库与存储工件的位置分开管理。

这可能吗?

repositories {
    ivy {
        // ivys and artfacts are stored separately
        ivyPattern "D:/ivys/[organisation]/[module]/[revision]/[artifact].[ext]"
        artifactPattern "D:/artifacts/[module]/[revision]/[artifact].[ext]"
    }
}

// D:/artifacts/javamail/1.3/mail.jar
// D:/artifacts/javamail/1.4.4/mail.jar
// D:/ivys/toolbox/javamail/1.3/mail.jar

configurations {
    config1
}

dependencies {
    // This configuration fails when there is a newer version of javamail in the artifacts directory
    // but no corresponding ivy in the ivy directory
    config1 "toolbox:javamail:latest.release"

    // This configuration work when I explicitly list the version to resolve
    //config1 "toolbox:javamail:1.3"
}

task build << {
    configurations.config1.each { println it.name }
}

日志信息(路径与示例略有不同):

16:38:22.570 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver] Resolving configuration ':config1'
16:38:22.573 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedRepositoryFactory] Creating new in-memory cache for repo 'ivy' [128cfbcee8fb5f2623bb47a30f078d89].
16:38:22.578 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Visiting configuration :toolbox_t1:unspecified(config1).
16:38:22.579 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Visiting dependency :toolbox_t1:unspecified(config1) -> toolbox:javamail:latest.release(dependency: toolbox#javamail;latest.release {config1=[default]})
16:38:22.580 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver] Attempting to resolve module 'toolbox:javamail:latest.release' using repositories [ivy]
16:38:22.581 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] Listing all in file:/D:/UDU/r/tc10.1.2.3.2014102000/src/build/ant/toolbox/javamail/[revision]/ivy.xml
16:38:22.582 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] using ivy to list all in file:/D:/UDU/r/tc10.1.2.3.2014102000/src/build/ant/toolbox/javamail/
16:38:22.583 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] found 1 resources
16:38:22.584 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] Listing all in file:/D:/UDU/tb/javamail/[revision]/javamail.jar
16:38:22.585 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] using ivy to list all in file:/D:/UDU/tb/javamail/
16:38:22.587 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] found 2 resources
16:38:22.588 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/D:/UDU/r/tc10.1.2.3.2014102000/src/build/ant/toolbox/javamail/1.4.4/ivy.xml
16:38:22.589 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading file:/D:/UDU/tb/javamail/1.4.4/javamail.jar
16:38:22.591 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No meta-data file or artifact found for module 'toolbox:javamail:1.4.4' in repository 'ivy'.
16:38:22.593 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.ResolvedConfigurationDependencyGraphVisitor] Attaching :toolbox_t1:unspecified(config1) to its parents.
16:38:22.597 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.oldresult.TransientConfigurationResultsBuilder] Flushing resolved configuration data in Binary store in C:\Temp\2\gradle2080536410688129731.bin. Wrote root :toolbox_t1:unspecified:config1.
16:38:22.600 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':build'
16:38:22.601 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :build FAILED

0 个答案:

没有答案