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

Update to Maven Wrapper 3.3.1 #1528

Closed
wants to merge 2 commits into from
Closed

Conversation

breun
Copy link

@breun breun commented May 17, 2024

Update to Maven Wrapper 3.3.1, both for building the project and for projects generated by Spring Initializr.

Note that this is still using the bin type for Maven Wrapper (which includes the binary maven-wrapper.jar), and not the new only-script type, which became the new default with Maven Wrapper 3.3.0. See here for more info about the various installation types.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 17, 2024
@mhalbritter mhalbritter self-assigned this May 21, 2024
@mhalbritter mhalbritter added type: task and removed status: waiting-for-triage An issue we've not yet triaged labels May 21, 2024
@mhalbritter
Copy link
Contributor

Thanks! I have switched to the new only-script type and removed the JAR file.

@mhalbritter mhalbritter added this to the 0.21.0 milestone May 21, 2024
@breun
Copy link
Author

breun commented May 21, 2024

@mhalbritter The new maven-wrapper.properties file doesn't look correct for a project using Maven Wrapper 3.3.1 with the default only-script type.

To reproduce what it should look like:

  1. Create and enter a new directory:
❯ mkdir only-script-test && cd only-script-test
  1. Add Maven Wrapper 3.3.1 with type only-script (also the default when omitted) and Maven version 3.9.6 (defaults to the version of Maven used to execute this command when omitted):
❯ mvn wrapper:3.3.1:wrapper -Dtype=only-script -Dmaven=3.9.6
  1. Print Maven Wrapper properties:
❯ cat .mvn/wrapper/maven-wrapper.properties
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.1
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip

So, wrapperVersion should be there, and wrapperUrl shouldn't.

P.S. Maven Wrapper 3.3.2 will add distributionType (MWRAPPER-135).

@breun
Copy link
Author

breun commented May 21, 2024

@mhalbritter Maybe Spring Initializr could actually execute the Maven Wrapper plugin goal (via maven-invoker?) to install Maven Wrapper for generated projects, instead of trying to generate the same result?

@breun breun deleted the maven-wrapper-3.3.1 branch May 21, 2024 12:03
mhalbritter added a commit that referenced this pull request May 21, 2024
@mhalbritter
Copy link
Contributor

Oh yeah, you're right. I've mixed something up. This is now fixed in 5851307 and 059066c.

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.

None yet

3 participants