← All tasks
javaspring-projects/spring-boot #695Repaired task

maven-enforcer-plugin does not allow Java 1.8.0_05

envgap__spring-projects__spring-boot-695

01 / FAILURE SIGNATURE

Captured in a clean container

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-rules) on project spring-boot-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

02 / ENVIRONMENT RECIPE

Base commit
0ed1642989c99583b877c7d8b68b597a4028d96d
Manifest
spring-boot-parent/pom.xml
Reproduce
mvn -B -q -f spring-boot-parent/pom.xml -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip -DskipTests package
Run under trace
mvn -B -q -f spring-boot-parent/pom.xml -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip -DskipTests package
Reference environment fix used for admission
diff --git a/spring-boot-parent/pom.xml b/spring-boot-parent/pom.xml
index 62827f6a0e8..f5dd2f701e5 100644
--- a/spring-boot-parent/pom.xml
+++ b/spring-boot-parent/pom.xml
@@ -342,7 +342,7 @@
 						<configuration>
 							<rules>
 								<requireJavaVersion>
-									<version>(1.7,1.8)</version>
+									<version>1.7</version>
 								</requireJavaVersion>
 							</rules>
 						</configuration>

03 / ORIGINAL ISSUE TEXT

spring-projects/spring-boot #695 · read the original issue
Spring Boot fails to build after updating to Java version 1.8.0_05. The problem is that the current configuration of the `maven-enforcer-plugin` does not allow Java versions above 1.8.0.

``` sh
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-rules) @ spring-boot-parent ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.8.0-5 is not in the allowed range (1.7,1.8).
[…]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-rules) on project spring-boot-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
```

Ref: http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html
Continue on GitHub ↗

04 / LABELS

Labels checked by running the task · needs human review

misspecification
Label rules and the text that matched
[
  {
    "category": "misspecification",
    "rule": "diff.changes_existing_manifest_line",
    "source": "manifest_diff:spring-boot-parent/pom.xml",
    "excerpt": "-\t\t\t\t\t\t\t\t\t<version>(1.7,1.8)</version>\n+\t\t\t\t\t\t\t\t\t<version>1.7</version>"
  }
]

Mined from a merged pull request linked to the issue whose changed files are all environment files.

The base commit is the pull request's base, not the dated default-branch commit; the registry is pinned to the merge date so the pull request's own pins resolve.

Default commands from envgap default-recipe synthesizer v1; gold_files are the pull request's environment diff.

Preparation uses current registries. Historical package availability is not enforced here; execution metadata records this limitation separately from the oracle's date-bounding policy.