Skip to content

Commit

Permalink
Merge pull request #289 from lutovich/mvn-version-requirement
Browse files Browse the repository at this point in the history
Include Maven version requirement in the generated POM
  • Loading branch information
nedtwigg authored Aug 31, 2018
2 parents 366c1b9 + 2b8bafd commit aa9fae9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
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

0 comments on commit aa9fae9

Please sign in to comment.