Skip to content

nes-034: empty prediction, enforcer rules already complete#252

Open
kaleev wants to merge 1 commit intones/task/034-enforcer-no-repeatfrom
nes/after/034-enforcer-no-repeat
Open

nes-034: empty prediction, enforcer rules already complete#252
kaleev wants to merge 1 commit intones/task/034-enforcer-no-repeatfrom
nes/after/034-enforcer-no-repeat

Conversation

@kaleev
Copy link
Copy Markdown

@kaleev kaleev commented Mar 16, 2026

{
  "description": "After both requireMavenVersion and requireJavaVersion are present, no further suggestion expected",
  "notes": "Negative test case. Enforcer plugin already has both rules. Model should not repeat them. Reported issue: NES was suggesting the same requireMavenVersion + requireJavaVersion block again after it was already accepted.",
  "context": {
    "filepath": "pom.xml",
    "caret": 7404,
    "history": [
      {
        "filepath": "pom.xml",
        "diff": "--- a/pom.xml\n+++ b/pom.xml\n@@ -175,6 +175,26 @@\n     <build>\n         <plugins>\n+            <plugin>\n+                <groupId>org.apache.maven.plugins</groupId>\n+                <artifactId>maven-enforcer-plugin</artifactId>\n+                <executions>\n+                    <execution>\n+                        <id>enforce-maven</id>\n+                        <goals>\n+                            <goal>enforce</goal>\n+                        </goals>\n+                        <phase>initialize</phase>\n+                        <configuration>\n+                            <rules>\n+                                <requireMavenVersion>\n+                                    <version>3.2.5</version>\n+                                </requireMavenVersion>\n+                            </rules>\n+                        </configuration>\n+                    </execution>\n+                </executions>\n+            </plugin>\n             <plugin>\n                 <groupId>org.apache.maven.plugins</groupId>\n                 <artifactId>maven-compiler-plugin</artifactId>"
      },
      {
        "filepath": "pom.xml",
        "diff": "--- a/pom.xml\n+++ b/pom.xml\n@@ -189,6 +189,9 @@\n                                 <requireMavenVersion>\n                                     <version>3.2.5</version>\n                                 </requireMavenVersion>\n+                                <requireJavaVersion>\n+                                    <version>1.8</version>\n+                                </requireJavaVersion>\n                             </rules>\n                         </configuration>\n                     </execution>"
      }
    ]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant