[GRADLE-3048] Gradle fails attempting to resolve jar for parent POM Created: 18/Mar/14 Updated: 18/Mar/14 Resolved: 18/Mar/14 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 1.12-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Description |
Im trying to build a simple scala app using Gradle and Im running into issues trying to resolve dependency via our private artifactory. It looks like gradle is throwing an error when it can't find a jar file for a parent pom . Here is what I have in my repository: repositories { maven { url "https://mycompany.com/artifactory/repo/" } Here are the errors, I see: Could not parse POM https://mycompany.com/artifactory/repo/org/fusesource/fusesource-pom/1.9/fusesource-pom-1.9.pom Could not parse POM https://mycompany.com/artifactory/repo/org/hamcrest/hamcrest-parent/1.1/hamcrest-parent-1.1.pom So far all the errors are related to a parent POM file. The strange thing here is that when I add `mavenCentral()` to my repositories section, this doesn't seem to be an issue. Could someone please shed some light on whats going on? Thank you! |
Comments |
Comment by Gradle Forums [ 18/Mar/14 ] |
Are these actually errors? What's the exact error message and stack trace (`--stacktrace`) you get, and what's the output of `gradle -v`? |
Comment by Gradle Forums [ 18/Mar/14 ] |
Also, you don't want to put Maven repo definitions within an `ivy` block (which defines an Ivy repository), and I don't think you want to add the same Artifactory URL both as a Maven and an Ivy repository. |
Comment by Gradle Forums [ 18/Mar/14 ] |
Thanks for the quick response! Here is the stack trace after I changed the dependency block: [1]https://gist.github.com/scuddalo/8872776 Here is the new dependency block: repositories { Here is the gradle -v output: ------------------------------------------------------------ Build time: 2013-12-17 09:28:15 UTC Groovy: 1.8.6 ---------------------------------------------------------------------------------------- |
Comment by Gradle Forums [ 18/Mar/14 ] |
What's the output of `gradle -v`, and why do you add the same repo both as Maven and Ivy repository? (Please try removing either of the two.) |
Comment by Gradle Forums [ 18/Mar/14 ] |
Sorry, I pasted the wrong thing. I updated it now. |
Comment by Gradle Forums [ 18/Mar/14 ] |
Is this a single trace? The topmost exception seems to be missing (the trace already starts with "Caused by:"). Can you also add the full error message? |
Comment by Gradle Forums [ 18/Mar/14 ] |
If I changed my dependency block to this: repositories { maven { Then it seems to correctly ignore the parent pom error. Here is the output when gradle successfully ignored the error: Download http://repo1.maven.org/maven2/org/fusesource/leveldbjni/leveldbjni-win64/1.5/leveldbjni-win64-1.5.pom |
Comment by Gradle Forums [ 18/Mar/14 ] |
just added the full stack trace here: [1]https://gist.github.com/scuddalo/8872776 |
Comment by Gradle Forums [ 18/Mar/14 ] |
Just added the full stacktrace here: [1]https://gist.github.com/scuddalo/8872776 |
Comment by Gradle Forums [ 18/Mar/14 ] |
Also, as I mentioned already this error seems to go away if I run the same requests against mavenCentral(). Do you know if there is a special setting in mavenCentral() that allows gradle to ignore unresolved parent pom errors? |
Comment by Gradle Forums [ 18/Mar/14 ] |
I still haven't figured this out yet. Could someone please help clarify this? I would really appreciate it. |
Comment by Gradle Forums [ 18/Mar/14 ] |
Hi Santoash, I suspect this might be a compatibility problem between Artifactory and our 1.10 release. Things to try:
I suspect that you have [Admin -> Security -> General -> Hide Existence of Unauthorized Resources] unchecked. Try checking it (and hitting Save). This may work... or you may find that it breaks resolution of all artifacts that require authentication.
If the above does not work it would be interesting to see if the problem exists in Gradle 1.9
I have recently made a change that should fix this issue. If you want, you can try it out by using our latest nightly build [1]http://www.gradle.org/nightly Please let me know how you go Pez |
Comment by Gradle Forums [ 18/Mar/14 ] |
actually you may need to try 1.8 for step 2 |
Comment by Gradle Forums [ 18/Mar/14 ] |
Hi Perryn, Thanks for looking into this. I just tried flipping the checkbox in my artifactory and that killed all the resources that required authentication. So I ended up trying 1.8 and Im still getting the same error. Im going to give the nightly build a shot. Is there a link to the other issue you mentioned? Thanks! |
Comment by Gradle Forums [ 18/Mar/14 ] |
Although, the nightly build did the trick!! Do you happen to have the patch that actually fixed this issue? Im just trying not to be on the bleeding edge if possible. Thanks again! |
Comment by Gradle Forums [ 18/Mar/14 ] |
Hi Santoash Did you try 1.9? Also can you tell me a little more about your Artifactory set up? Do you need authentication to get any resource from it or only a subset? Do you need to authenticate to get hamcrest? The change in the nightly is [1]https://github.com/gradle/gradle/comm... I'd expect this change to be in the 1.12 release in a few weeks |
Comment by Gradle Forums [ 18/Mar/14 ] |
Yeah, 1.9 is broken as well. Our artifactory needs auth only a subset of the resources. Most of the resources don't need authentication and yes, I didn't have to authenticate to get hamcrest. Cool, I will live in the bleeding edge for now and keep an eye on that change to see when it makes it to 1.12. Thanks again! |