teragrep / project-archetype

Teragrep project archetype
GNU Affero General Public License v3.0
0 stars 1 forks source link

Add maven enforcer plugin #4

Closed StrongestNumber9 closed 5 months ago

StrongestNumber9 commented 6 months ago

Description

https://maven.apache.org/enforcer/maven-enforcer-plugin/

Use case or motivation behind the feature request

Related issues

Additional context

<plugin>
  <artifactId>maven-enforcer-plugin</artifactId>
  <version>3.4.1</version>
  <executions>
    <execution>
      <id>enforce</id>
      <phase>none</phase>
    </execution>
    <execution>
      <id>enforce-maven</id>
      <goals>
        <goal>enforce</goal>
      </goals>
      <configuration>
        <rules>
          <requireMavenVersion>
            <version>3.2.5</version>
          </requireMavenVersion>
        </rules>
      </configuration>
    </execution>
  </executions>
</plugin>

For example mvn versions:display-plugin-updates without the plugin gives output like

[ERROR] Project does not define required minimum version of Maven.
[ERROR] Update the pom.xml to contain maven-enforcer-plugin to
[ERROR] force the Maven version which is needed to build this project.
[ERROR] See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[ERROR] Using the minimum version of Maven: 3.2.5
StrongestNumber9 commented 5 months ago

Fixed in #7