[GRADLE-2686] codenarc plugin fails Created: 21/Feb/13 Updated: 24/Jan/17 Resolved: 24/Jan/17 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.4 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Christian Lipp | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 0 |
Description |
Excerp from the Gradle 1.4 release notes: For Gradle 1.4 you will receive the following error if using the codenarc plugin inside an user extended build (buildSrc/gradle.build): FAILURE: Build failed with an exception.
Shouldn't the plugin define it's own dependencies? |
Comments |
Comment by Christian Lipp [ 21/Feb/13 ] |
The same occurs with the findbugs plugin: FAILURE: Build failed with an exception.
|
Comment by Peter Niederwieser [ 22/Feb/13 ] |
Are you only getting this for buildSrc/? PS: Please use http://forums.gradle.org for reporting problems. |
Comment by Christian Lipp [ 22/Feb/13 ] |
Sorry, next time. |
Comment by Peter Niederwieser [ 22/Feb/13 ] |
If this happens even outside buildSrc/, the cause is likely related to the specifics of your build. Do you have a repository declared that contains the correct codenarc/findbugs version and their transitive dependencies? If necessary, you can also provide the dependencies manually by adding them to the codenarc/findbugs configuration. Another potential cause is that you use configurations.all.exclude .. somewhere in your build, which would also affect the codenarc and findbugs configurations. If you need more help, please provide a reproducible example. |
Comment by Christian Lipp [ 22/Feb/13 ] |
I tried to provide a simpler sample and found the reason when doing this: When I use repositories { mavenCentral() } everything works. When I use repositories { mavenLocal() mavenCentral() } standard dependencies are downloaded, but not plugin dependencies. There is no difference between buildSrc and regular projects. |
Comment by Peter Niederwieser [ 22/Feb/13 ] |
Sounds like a problem with the state of your local Maven repo. Or maybe some of the dependencies in your local Maven repo only have a POM but no Jar, in which case Gradle won't look for the Jar elsewhere unless you explicitly tell it to. Don't use `mavenLocal()` unless you absolutely must exchange artifacts with Maven builds. Otherwise there is absolutely no gain in doing so, and it risks to make your build irreproducible. |
Comment by Christian Lipp [ 25/Feb/13 ] |
Apologize again that I did not discuss this with you on the forums. I was pretty sure that we have a bug here because it works with Gradle 1.3 and stopped working with Gradle 1.4. However I still believe it is a bug, because Gradle should not stop looking for dependencies if one repository has an error. But this is your decision. Thanks and regards! |
Comment by Benjamin Muschko [ 15/Nov/16 ] |
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub. We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to. Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle! |
Comment by Benjamin Muschko [ 24/Jan/17 ] |
We have long upgraded to a newer version of CodeNarc in the meantime: 0.25.2. Please open issue on GitHub if you are still experiencing the issue. |