Skip to content

Commit

Permalink
Remove support for Gradle's maven plugin
Browse files Browse the repository at this point in the history
Closes gh-333
  • Loading branch information
wilkinsona committed Jul 1, 2022
1 parent 94d6ffa commit a262f6d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 148 deletions.
16 changes: 8 additions & 8 deletions src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -836,11 +836,11 @@ dependencyManagement {
[[pom-generation]]
== Pom generation

Gradle's `maven` and `maven-publish` plugins automatically generate a pom file that
describes the published artifact. The plugin will automatically include any global
dependency management, i.e. dependency management that does not target a specific
configuration, in the `<dependencyManagement>` section of the generated pom file. For
example, the following dependency management configuration:
Gradle's `maven-publish` plugins automatically generate a pom file that describes the
published artifact. The plugin will automatically include any global dependency
management, i.e. dependency management that does not target a specific configuration,
in the `<dependencyManagement>` section of the generated pom file. For example, the
following dependency management configuration:

[source,groovy,indent=0,subs="verbatim,attributes",role="primary"]
.Groovy
Expand Down Expand Up @@ -923,9 +923,9 @@ dependencyManagement {
[[pom-generation-manual]]
=== Configuring your own pom

If your build creates a pom outside of Gradle's standard `maven` and `maven-publish`
mechanisms you can still configure its dependency management by using the `pomConfigurer`
from `dependencyManagement`:
If your build creates a pom outside of Gradle's standard `maven-publish` mechanism you
can still configure its dependency management by using the `pomConfigurer` from
`dependencyManagement`:

[source,indent=0,subs="verbatim,attributes"]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
import org.gradle.api.Action;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.Task;
import org.gradle.api.publish.PublishingExtension;
import org.gradle.api.publish.maven.MavenPublication;
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
import org.gradle.api.tasks.Upload;

/**
* Main class for the dependency management plugin.
Expand Down Expand Up @@ -54,31 +52,6 @@ public void apply(final Project project) {
private void configurePomCustomization(final Project project,
DependencyManagementExtension dependencyManagementExtension) {
final PomDependencyManagementConfigurer pomConfigurer = dependencyManagementExtension.getPomConfigurer();
project.getTasks().withType(Upload.class, new Action<Upload>() {

@Override
public void execute(final Upload upload) {
upload.doFirst(new Action<Task>() {

@Override
@SuppressWarnings("deprecation")
public void execute(Task task) {
upload.getRepositories().withType(org.gradle.api.artifacts.maven.MavenResolver.class,
new Action<org.gradle.api.artifacts.maven.MavenResolver>() {

@Override
public void execute(org.gradle.api.artifacts.maven.MavenResolver mavenResolver) {
mavenResolver.getPom().withXml(pomConfigurer);
}

});
}

});

}

});
project.getPlugins().withType(MavenPublishPlugin.class, new Action<MavenPublishPlugin>() {

@Override
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit a262f6d

Please sign in to comment.