Skip to content

Commit

Permalink
Code and documentation cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmuschko committed Apr 3, 2015
1 parent 90d96f6 commit d54966e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
2.2.1 (unreleased)
===================

* support for provided configuration in poms generated by gradle install.
* Pull request #19: Support for provided configuration in POMs generated by Maven plugin.

2.2.0 / 2015-1-30
===================
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This plugin allows dependencies to be declared with a configuration or attribute

The following publishing plugins support the correct handling when generating the relevant metadata:

* [Maven](http://gradle.org/docs/current/userguide/maven_plugin.html)
* [Maven Publishing](http://www.gradle.org/docs/current/userguide/publishing_maven.html)
* [Ivy Publishing](http://www.gradle.org/docs/current/userguide/publishing_ivy.html)

Expand All @@ -21,7 +22,7 @@ To include, add the following to your build.gradle
repositories { jcenter() }

dependencies {
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:1.12.+'
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.+'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ class ProvidedBasePlugin implements Plugin<Project> {
}

/**
* Configures the Maven plugin, so that provided dependencies are listed in the pom when using 'gradle install'.
* Configures the Maven plugin to ensure that published dependencies receive the correct scope.
*
* @param project Project
* @param providedConfiguration provided configuration
*/
private void configureMavenPlugin(Project project, Configuration providedConfiguration) {
project.plugins.withType(MavenPlugin){
project.conf2ScopeMappings.addMapping(MavenPlugin.COMPILE_PRIORITY + 1,
project.configurations.getByName(PROVIDED_CONFIGURATION_NAME), Conf2ScopeMappingContainer.PROVIDED)
project.plugins.withType(MavenPlugin) {
project.conf2ScopeMappings.addMapping(MavenPlugin.COMPILE_PRIORITY + 1, providedConfiguration,
Conf2ScopeMappingContainer.PROVIDED)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ dependencies {
classpathXml.classpath.classpathentry.find { it?.@path?.contains 'org.apache.commons/commons-lang3/3.3.2' } != null
}

def "Publishing provided dependencies to a Maven repository preserves the scope"() {
def "Publishing provided dependencies to a Maven repository preserves the scope when using Maven Publish plugin"() {
given:
File repoUrl = new File(projectDir, 'build/repo')

Expand Down Expand Up @@ -194,7 +194,7 @@ publishing {
commonsLang.scope.text() == 'provided'
}

def "Publishing provided dependencies to a Maven repository preserves the scope when using maven plugin"() {
def "Publishing provided dependencies to a Maven repository preserves the scope when using Maven plugin"() {
given:
File repoUrl = new File(projectDir, 'build/repo/')

Expand Down

0 comments on commit d54966e

Please sign in to comment.