Skip to content

Remove useless Maven prerequisites section #68

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

Closed

Conversation

johanhammar
Copy link
Contributor

Use maven-enforcer-plugin to enforce Maven version instead of prerequisites which generates a warning like this
[WARNING] The project io.spring.javaformat:spring-javaformat-build:pom:0.0.7-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

@snicoll
Copy link
Contributor

snicoll commented Oct 3, 2018

Thanks for the PR. I am not sure that we want to enforce it that way really. The way I see it is just a way to add some metadata about the minimum Maven version we expect.

Since this project uses the maven wrapper, I'd be tempted to simply remove the prerequisite.

Let's see what the rest of the team thinks.

@wilkinsona
Copy link
Contributor

I'm in favour of removing the prerequisites. If the documentation is accurate, it won't be checked unless someone tries to use Maven 2 so it seems to be largely pointless:

The only element that exists as a prerequisite in POM 4.0 is the maven element, which takes a minimum version number. It is checked with Maven 2, it is not any more in Maven 3.

The recommendation is that, when using Maven 3, the enforcer plugin is used instead. That said, I'm not sure that we should as the wrapper already provides a version of Maven. If we enforced the version anywhere, it should probably be done in Boot's spring-boot-starter-parent as that will avoid any problems with Boot's required version and Initializr's enforced version getting out of sync.

@snicoll
Copy link
Contributor

snicoll commented Oct 3, 2018

Thanks for confirming. Let's remove the prerequisites.

@wilkinsona
Copy link
Contributor

Oops. My comment only makes partial sense. Apparently, I thought this was an Initializr issue. Sorry for the confusion.

snicoll added a commit that referenced this pull request Oct 3, 2018
* pr/68:
  Remove useless Maven prerequisites section
@snicoll snicoll changed the title Use maven-enforcer-plugin to enforce Maven version Remove useless Maven prerequisites section Oct 3, 2018
@snicoll snicoll self-assigned this Oct 3, 2018
@snicoll snicoll added this to the 0.0.7 milestone Oct 3, 2018
@snicoll
Copy link
Contributor

snicoll commented Oct 3, 2018

Closed by 8074fdd

@snicoll snicoll closed this Oct 3, 2018
@snicoll
Copy link
Contributor

snicoll commented Oct 3, 2018

@johanhammar thank you very much for your first contribution to this project. This is merged in master.

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

Successfully merging this pull request may close these issues.

3 participants