Skip to content
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

Generate latest version of mvnw with no additional resources #551

Merged
merged 2 commits into from Mar 11, 2024

Conversation

VonUniGE
Copy link
Contributor

@VonUniGE VonUniGE commented Mar 9, 2024

Running ./mvnw gives:

Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
Caused by: java.lang.ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain

In pom.xml, mavenVersion is set to 3.6.3, but in .mvn/wrapper/maven-wrapper.properties it is still set to 3.5.4

This commit is obtained by regenerating the latest version of mvnw with no additional resources:

rm -rf mvnw mvnw.cmd .mvn
mvn -N wrapper:wrapper -Dmaven=3.6.3 -Dtype=only-script

It allows to:

  • run ./mvnw without errors
  • solves the version mismatch between pom.xml and .mvn/wrapper/maven-wrapper.properties
  • upgrade maven wrapper to latestet version (3.2.0)
  • remove a jar file (.mvn/wrapper/maven-wrapper.jar) from source control

After merging, #549 can be closed.

@VonUniGE
Copy link
Contributor Author

I did a rebase and push force to include 2e5fa8b

@slawekjaranowski slawekjaranowski merged commit 97cf094 into mojohaus:master Mar 11, 2024
20 checks passed
VonUniGE added a commit to VonUniGE/license-maven-plugin that referenced this pull request Mar 11, 2024
…s#551)

* Generate latest version of mvnw with no additional resources
* Use Maven 3.9.6 with Maven Wrapper
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.

Maven versions defined in pom.xml and maven-wrapper.properties differ
3 participants