Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Maven version requirement in the generated POM #289

Merged
merged 1 commit into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion gradle/java-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def cred = {
}
}

final MAVEN_PLUGIN_ARTIFACT_NAME = 'spotless-maven-plugin'

model {
publishing {
publications {
Expand Down Expand Up @@ -97,8 +99,12 @@ model {
distribution 'repo'
}
}
if (project.ext.artifactId == MAVEN_PLUGIN_ARTIFACT_NAME) {
// Maven plugin required Maven 3.1.0+ to run
prerequisites { maven '3.1.0' }
}
developers {
if (project.ext.artifactId == 'spotless-plugin-maven') {
if (project.ext.artifactId == MAVEN_PLUGIN_ARTIFACT_NAME) {
developer {
id 'lutovich'
name 'Konstantin Lutovich'
Expand Down
1 change: 1 addition & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Skip `package-info.java` and `module-info.java` files from license header formatting. ([#273](https://github.com/diffplug/spotless/pull/273))
* Updated JSR305 annotation from 3.0.0 to 3.0.2 ([#274](https://github.com/diffplug/spotless/pull/274))
* Migrated from FindBugs annotations 3.0.0 to SpotBugs annotations 3.1.6 ([#274](https://github.com/diffplug/spotless/pull/274))
* Fix Maven version prerequisite in the generated POM ([#289](https://github.com/diffplug/spotless/pull/289))

### Version 1.14.0 - July 24th 2018 ([javadoc](https://diffplug.github.io/spotless/javadoc/spotless-maven-plugin/1.14.0/), [jcenter](https://bintray.com/diffplug/opensource/spotless-maven-plugin/1.14.0))

Expand Down
1 change: 1 addition & 0 deletions plugin-maven/src/test/resources/pom-build.xml.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<name>Spotless Maven Plugin</name>

<!-- Require plugin to be built with Maven 3.1.0+ -->
<prerequisites>
<maven>3.1.0</maven>
</prerequisites>
Expand Down
5 changes: 5 additions & 0 deletions plugin-maven/src/test/resources/pom-test.xml.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

<name>Spotless Maven Plugin Tests</name>

<!-- Require plugin to be tested with Maven 3.1.0+ -->
<prerequisites>
<maven>3.1.0</maven>
</prerequisites>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down