[GRADLE-3081] gradle 1.12 tries to resolve custom packaging with .jar extension Created: 05/May/14 Updated: 15/May/14 Resolved: 07/May/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 2.0-rc-1 |
Type: | Task | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Description |
Hi, I have a plugin that generates custom artifacts (.zip) and uploads them via maven to a nexus repository. When I upgrade to gradle 1.12 I get errors when the plugin tries to find the artificats. Caused by: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ArtifactNotFoundException: Artifact '<group>:<name>:<version>:<name>.jar' not found. I debugged a bit and found out that the jar extension is mentioned in the cache ~/.gradle/caches/modules-2/metadata-2.6/descriptors/<group>/<name>/<version>/a3513388c78b5904e7c3c3af682f5a1a/ivy.xml: .... Any idea where to tell gradle how to resolve the configurations with zip extension? Thanks in advance |
Comments |
Comment by Gradle Forums [ 05/May/14 ] |
Can you show the dependency declaration? Also, can you double-check that this problem exists with 1.12 but not 1.11? |
Comment by Gradle Forums [ 05/May/14 ] |
hey so the problem occures as soon as I set the The dependencies are defined like this: dependencies { webbundle is defined by my applied plugin: project.configurations { } there is also a conf2scopeMapping if (project.plugins.hasPlugin(MavenPlugin)) { The point where the plugin accesses the dependencies usually looks like this: ResolvedComponentResult module = configuration.incoming.resolutionResult.root for(Dependency d : module.dependencies){ Should I use @zip in the dependencies? but then I got the feeling the transitive dependencies are not being resolved or should I set the type/ext for the configuration somewhere explicitly? Running the dependencies task with 1.12 still seems to work. |
Comment by Gradle Forums [ 05/May/14 ] |
Can you show the code involved in publishing the zip? Perhaps the problem is on the publishing side. |
Comment by Gradle Forums [ 05/May/14 ] |
For publishing I use the "maven" plugin project.apply plugin: 'maven' The Archive task looks like this. def assembleWebbundleTask = project.task("assembleWebbundle", type: Zip) { from(taskX) { into "x/" }from(taskY) { into "y/" }from(taskZ) { into "z/" }from onMoreFileGeneratingTask The generated build/poms/pom-default.xml contains: <packaging>zip</packaging> and the other dependencies <dependency> |
Comment by Max Bruchmann [ 07/May/14 ] |
Here is a example for that issue: https://github.com/mxab/gradle-custom-package-resolve-problem The error occures not when i iterate through myZipConf.incoming.resolutionResult.root but when I try to access myZipConf.resolvedConfiguration.resolvedArtifacts files |
Comment by Roman Besolov [ 15/May/14 ] |
Adam Murdoch, Can you give me a link to the commit solves this issue? I want to do my own build of gradle 1.12 and fix this issue. Thanks. |