On 9 Apr 2014, at 11:40 am, Biswa Dahal <biswa.w...@gmail.com> wrote:
> Hi everyone, > > I just joined the dev group, and wanted to start with something simple. > Actually, I have a working code for the issue mentioned below as I was > playing around with the code, but I thought I would bring it up in discussion > here anyways. Please let me know if there is a certain way to approach or a > "convention" to follow other than that listed in the github contribution page. > > > Based on the discussion here: > http://forums.gradle.org/gradle/topics/exclude_not_set_in_generated_pom_maven_publish > > which leads to open ticket: GRADLE-2945, dependency exclusions are not added > to POM files as of gradle-1.11 > > I have never worked with Ivy, so I don't know if there is something to be > solved there too. > But for maven, I could add it easily: > add method Collection<org.gradle.api.artifacts.ExcludeRule> getExcludeRules() > to interface > org.gradle.api.publish.maven.internal.dependencies.MavenDependencyInternal > Changing this interface forces the propagation of the rule to it's impl > classes (currently only one - DefaultMavenPublication) > DefaultMavenPublication get's a new contructor (The new one takes 5 arguments > instead of 4) > The DefaultMavenPublication addModuleDependency() uses this new information > The MavenPomFileGenerator uses this new information and delegates to existing > ivy MavenDependency type to add exclusions passed on from steps above > > Thoughts? Sounds good. It would be great if you could also add an integration test or two, and then send in a pull request. -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com Join us for Gradle Summit 2014, June 12th and 13th in Santa Clara, CA: http://www.gradlesummit.com