Skip to content

Commit 8572372

Browse files
committed
Remove configuration for org.gradle.api.plugins.MavenPlugin
1 parent 95b5231 commit 8572372

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/main/groovy/nebula/plugin/extraconfigurations/OptionalBasePlugin.groovy

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package nebula.plugin.extraconfigurations
1717

1818
import org.gradle.api.Plugin
1919
import org.gradle.api.Project
20-
import org.gradle.api.plugins.MavenPlugin
2120
import org.gradle.api.publish.PublishingExtension
2221
import org.gradle.api.publish.ivy.IvyPublication
2322
import org.gradle.api.publish.maven.MavenPublication
@@ -31,7 +30,6 @@ class OptionalBasePlugin implements Plugin<Project> {
3130
enhanceProjectModel(project)
3231
configureMavenPublishPlugin(project)
3332
configureIvyPublishPlugin(project)
34-
configureMavenPlugin(project)
3533
}
3634

3735
/**
@@ -110,27 +108,4 @@ class OptionalBasePlugin implements Plugin<Project> {
110108
}
111109
}
112110
}
113-
114-
/**
115-
* Configures Maven plugin to ensure that published dependencies receive the optional element.
116-
*
117-
* @param project Project
118-
*/
119-
private void configureMavenPlugin(Project project) {
120-
project.plugins.withType(MavenPlugin) {
121-
// Requires user definition of Maven installer/deployer which could be anywhere in the build script
122-
project.afterEvaluate {
123-
def installers = project.tasks.install.repositories
124-
def deployers = project.tasks.uploadArchives.repositories
125-
126-
(installers + deployers)*.activePomFilters.flatten()*.pomTemplate*.whenConfigured { pom ->
127-
project.ext.optionalDeps.each { optionalDep ->
128-
pom.dependencies.find {
129-
dep -> dep.groupId == optionalDep.group && dep.artifactId == optionalDep.name
130-
}.optional = true
131-
}
132-
}
133-
}
134-
}
135-
}
136111
}

0 commit comments

Comments
 (0)