This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch MWRAPPER-14 in repository https://gitbox.apache.org/repos/asf/maven-studies.git
commit f293d8ef20ace3d07223e500c96e7bdee5e623ad Author: Hervé Boutemy <[email protected]> AuthorDate: Sat Nov 27 12:02:46 2021 +0100 update documentation --- .../maven/wrapper/Downloader.java => Jenkinsfile | 18 +- LICENSE.txt | 202 --------------- README.md | 273 ++++++--------------- maven-wrapper-distribution/pom.xml | 1 + .../src/site/apt/index.apt.vm | 56 +++++ maven-wrapper-distribution/src/site/site.xml | 28 +++ maven-wrapper-plugin/src/site/markdown/usage.md | 8 +- .../apache/maven/wrapper/BootstrapMainStarter.java | 2 + .../java/org/apache/maven/wrapper/Downloader.java | 2 + .../java/org/apache/maven/wrapper/Installer.java | 2 + .../org/apache/maven/wrapper/MavenWrapperMain.java | 2 + .../org/apache/maven/wrapper/PathAssembler.java | 5 + .../org/apache/maven/wrapper/WrapperExecutor.java | 7 +- .../maven/wrapper/cli/CommandLineParser.java | 2 +- maven-wrapper/src/site/apt/index.apt | 30 +++ maven-wrapper/src/site/site.xml | 36 +++ pom.xml | 22 ++ CHANGELOG.md => src/site/markdown/CHANGELOG.old.md | 0 README.md => src/site/markdown/index.md | 81 +++--- src/site/resources/download.cgi | 22 ++ src/site/site.xml | 42 ++++ src/site/xdoc/download.xml.vm | 126 ++++++++++ 22 files changed, 505 insertions(+), 462 deletions(-) diff --git a/maven-wrapper/src/main/java/org/apache/maven/wrapper/Downloader.java b/Jenkinsfile similarity index 74% copy from maven-wrapper/src/main/java/org/apache/maven/wrapper/Downloader.java copy to Jenkinsfile index eb1e693..755ac1d 100644 --- a/maven-wrapper/src/main/java/org/apache/maven/wrapper/Downloader.java +++ b/Jenkinsfile @@ -1,6 +1,4 @@ -package org.apache.maven.wrapper; - -/* +/** * 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 @@ -9,7 +7,7 @@ package org.apache.maven.wrapper; * "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 + * 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 @@ -19,14 +17,4 @@ package org.apache.maven.wrapper; * under the License. */ -import java.io.File; -import java.net.URI; - -/** - * @author Hans Dockter - */ -public interface Downloader -{ - void download( URI address, File destination ) - throws Exception; -} +asfMavenTlpPlgnBuild(jdk:['8','11','17','18']) diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. diff --git a/README.md b/README.md index 49e833e..28e0c1a 100644 --- a/README.md +++ b/README.md @@ -14,197 +14,86 @@ See the License for the specific language governing permissions and limitations under the License. --> - -# Maven Wrapper - -The Maven Wrapper is an easy way to ensure a user of your Maven build has -everything necessary to run your Maven build. - -_Why might this be necessary?_ Maven to date has been very stable for users, is -available on most systems or is easy to procure: but with many of the recent -changes in Maven it will be easier for users to have a fully encapsulated build -setup provided by the project. With the Maven Wrapper this is very easy to do -and it's a great idea borrowed from Gradle. - -The easiest way to setup the Maven Wrapper for your project is to use the -[Takari Maven Plugin][1] with its provided `wrapper` goal. To add or update all -the necessary Maven Wrapper files to your project execute the following command: - -```bash -mvn -N io.takari:maven:0.7.7:wrapper -``` - -> Note: The default usage should be `mvn -N io.takari:maven:wrapper` but for -> some users this seem to result in usage of an old version of the wrapper and -> therefore installation of older Maven defaults and so on. - -Normally you instruct users to install a specific version of Apache Maven, put -it on the PATH and then run the `mvn` command like the following: - -```bash -mvn clean install -``` - -But now, with a Maven Wrapper setup, you can instruct users to run wrapper -scripts: - -```bash -./mvnw clean install +Contributing to [Apache Maven Wrapper](https://maven.apache.org/wrapper/) +====================== + +[][jira] +[][license] +[](https://search.maven.org/artifact/org.apache.maven.plugins/maven-wrapper-plugin) +[][build] +[][test-results] + + +You have found a bug or you have an idea for a cool new feature? Contributing +code is a great way to give something back to the open source community. Before +you dig right into the code, there are a few guidelines that we need +contributors to follow so that we can have a chance of keeping on top of +things. + +Getting Started +--------------- + ++ Make sure you have a [JIRA account](https://issues.apache.org/jira/). ++ Make sure you have a [GitHub account](https://github.com/signup/free). ++ If you're planning to implement a new feature, it makes sense to discuss your changes + on the [dev list][ml-list] first. + This way you can make sure you're not wasting your time on something that isn't + considered to be in Apache Maven's scope. ++ Submit a ticket for your issue, assuming one does not already exist. + + Clearly describe the issue, including steps to reproduce when it is a bug. + + Make sure you fill in the earliest version that you know has the issue. ++ Fork the repository on GitHub. + +Making and Submitting Changes +-------------- + +We accept Pull Requests via GitHub. The [developer mailing list][ml-list] is the +main channel of communication for contributors. +There are some guidelines which will make applying PRs easier for us: ++ Create a topic branch from where you want to base your work (this is usually the master branch). + Push your changes to a topic branch in your fork of the repository. ++ Make commits of logical units. ++ Respect the original code style: by using the same [codestyle][code-style], + patches should only highlight the actual difference, not being disturbed by any formatting issues: + + Only use spaces for indentation. + + Create minimal diffs - disable on save actions like reformat source code or organize imports. + If you feel the source code should be reformatted, create a separate PR for this change. + + Check for unnecessary whitespace with `git diff --check` before committing. ++ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue. ``` - -or on Windows - -```bash -mvnw.cmd clean install +[MWRAPPER-XXX] - Subject of the JIRA Ticket + Optional supplemental description. ``` - -A normal Maven build will be executed with the one important change that if the -user doesn't have the necessary version of Maven specified in -`.mvn/wrapper/maven-wrapper.properties` it will be downloaded for the user -first, installed and then used. - -Subsequent uses of `mvn`/`mvnw.cmd` use the previously downloaded, specific -version as needed. - -## Supported Systems - -The wrapper should work on various operating systems including - -* Linux (numerous versions, tested on Ubuntu and CentOS) -* OSX / macOS -* Windows (various newer versions) -* Solaris (10 and 11) - -For all those *nix operating systems, various shells should work including - -* sh -* bash -* dash -* zsh - -In terms of Apache Maven versions itself, the wrapper should work with any Maven -3.x version and it defaults to the latest release - currently 3.6.3. We do NOT -plan to support the deprecated, EOL'ed Maven 2.x. - -The maven-wrapper itself is compiled to work with Java 5. The Takari Maven -Plugin for installation however uses Java 7. Once the wrapper is installed with -the plugin you should be able to use the wrapper on the project with Java 5 and -up. This is however not really tested by the committers. - -## Changes - -Please check out the [changelog](./CHANGELOG.md) for more information about our -releases. - -## Verbose Mode - -The wrapper supports a verbose mode in which it outputs further information. It -is activated by setting the `MVNW_VERBOSE` environment variable to `true`. - -By default it is off. - -## Usage without Binary JAR - -By default, the Maven Wrapper JAR archive is added to the using project as small -binary file `.mvn/wrapper/maven-wrapper.jar`. It is used to bootstrap the -download and invocation of Maven from the wrapper shell scripts. - -If your project is not allowed to contain binary files like this, you can -configure your version control system to exclude checkin/commit of the wrapper -jar. - -If the JAR is not found to be available by the scripts they will attempt to -download the file from the URL specified in -`.mvn/wrapper/maven-wrapper.properties` under `wrapperUrl` and put it in place. -The download is attempted via curl, wget and, as last resort, by compiling the -`./mvn/wrapper/MavenWrapperDownloader.java` file and executing the resulting -class. - -If your Maven repository is password protected you can specify your username via -the environment variable `MVNW_USERNAME` and the password via the environment -variable `MVNW_PASSWORD`. - -## Using a Different Version of Maven - -To switch the version of Maven used to build a project you can initialize it -using: - -```bash -mvn -N io.takari:maven:0.7.7:wrapper -Dmaven=3.5.4 -``` - -which works for any version except snapshots. Once you have a wrapper you can -change its version by setting the `distributionUrl` in -`.mvn/wrapper/maven-wrapper.properties`, e.g. - -```bash -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip -``` - -## Using Basic Authentication for Distribution Download - -To download Maven from a location that requires Basic Authentication you have 2 -options: - -1. Set the environment variables MVNW_USERNAME and MVNW_PASSWORD - - or - -2. add user and password to the distributionUrl like that: -`distributionUrl=https://username:password@<yourserver>/maven2/org/apache/maven/apache-maven/3.2.1/apache-maven-3.2.1-bin.zip` - -[1]: https://github.com/takari/takari-maven-plugin - -## Specifying Maven Distribution Base Path - -This is a feature of Maven itself and the wrapper just happens to take it into -account. Simply set `MAVEN_USER_HOME` to the desired path and the wrapper uses -it as the base of the Maven distro installation. - -See https://www.lewuathe.com/maven-wrapper-home.html and -https://github.com/takari/maven-wrapper/issues/17 - -## Using a Maven Repository Manager - -When using an internal Maven repository manager you have two options: - -1. Just set the correct URL to wrapper jar and Maven distro in - `maven-wrapper.properties` in your project -2. Leave the default URL in the project pointing to Maven Central and set the - environment variable `MVNW_REPOURL` to your repo manager URL such as - `https://repo.example.com/central-repo-proxy`. - -If `MVNW_REPOURL` is set during the wrapper installation with the -takari-maven-plugin, the URL is used in the maven-wrapper.properties file. - -If not set, but your mirror URL in your settings.xml is configured, it will be -used. - -## Developing and Releasing - -To test Maven wrapper usage: - -- ensure you are building on a Unix filesystem with correct mounting for - executable flag setting -- build the maven-wrapper as snapshot version -- update version in takari-maven-plugin -- build takari-maven-plugin -- use on test project with takari-maven-plugin version - -```bash -mvn -N -X io.takari:maven:0.7.7-SNAPSHOT:wrapper -``` - -For release - -- make sure version in mvnw files, MavenWrapperDownloader.java and config files - and pom files is new upcoming release -- cut maven release with usual release plugin usage -- update maven plugin to release version -- release it as well - -Updating Maven version: - -- update URL in maven-wrapper/.mvn/wrapper/maven-wrapper.properties -- update URL in MavenWrapperMain -- updated DEFAULT_MAVEN_VER parameter in takari-maven-plugin WrapperMojo class ++ Make sure you have added the necessary tests (JUnit/IT) for your changes. ++ Run all the tests with `mvn -Prun-its verify` to assure nothing else was accidentally broken. ++ Submit a pull request to the repository in the Apache organization. ++ Update your JIRA ticket and include a link to the pull request in the ticket. + +If you plan to contribute on a regular basis, please consider filing a [contributor license agreement][cla]. + +Making Trivial Changes +---------------------- + +For changes of a trivial nature to comments and documentation, it is not always +necessary to create a new ticket in JIRA. In this case, it is appropriate to +start the first line of a commit with '(doc)' instead of a ticket number. + +Additional Resources +-------------------- + ++ [Contributing patches](https://maven.apache.org/guides/development/guide-maven-development.html#Creating_and_submitting_a_patch) ++ [Apache Maven Wrapper project page][jira] ++ [Contributor License Agreement][cla] ++ [General GitHub documentation](https://help.github.com/) ++ [GitHub pull request documentation](https://help.github.com/send-pull-requests/) ++ [Apache Maven Twitter Account](https://twitter.com/ASFMavenProject) ++ #Maven IRC channel on freenode.org + +[jira]: https://issues.apache.org/jira/projects/MWRAPPER/ +[license]: https://www.apache.org/licenses/LICENSE-2.0 +[ml-list]: https://maven.apache.org/mailing-lists.html +[code-style]: https://maven.apache.org/developers/conventions/code.html +[cla]: https://www.apache.org/licenses/#clas +[maven-wiki]: https://cwiki.apache.org/confluence/display/MAVEN/Index +[test-results]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-wrapper-plugin/job/master/lastCompletedBuild/testReport/ +[build]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-wrapper-plugin/job/master/ diff --git a/maven-wrapper-distribution/pom.xml b/maven-wrapper-distribution/pom.xml index cdccd4b..b916c2e 100644 --- a/maven-wrapper-distribution/pom.xml +++ b/maven-wrapper-distribution/pom.xml @@ -32,6 +32,7 @@ under the License. <packaging>pom</packaging> <name>Maven Wrapper Distribution</name> + <description>Maven Wrapper Distribution provides the distribution zip files containing mvnw/mvnw.cmd scripts and everything that has to be installed into a project wanting to use Maven Wrapper.</description> <dependencies> <dependency> diff --git a/maven-wrapper-distribution/src/site/apt/index.apt.vm b/maven-wrapper-distribution/src/site/apt/index.apt.vm new file mode 100644 index 0000000..dfb6ed3 --- /dev/null +++ b/maven-wrapper-distribution/src/site/apt/index.apt.vm @@ -0,0 +1,56 @@ +~~ 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. + + ----- + ${project.name} + ----- + Hervé Boutemy + ----- + 2021-10-10 + ----- + +${project.name} + + ${project.description} + + Distributions types share the same base structure: + +---- +mvnw +mvnw.cmd +.mvn/wrapper/maven-wrapper.properties +---- + + but every distribution has specific content to manage different strategies to get {{{../maven-wrapper/}<<<maven-wrapper.jar>>>}}: + + - <<<script>>> (default): <<<mvnw>>>/<<<mvnw.cmd>>> scripts will download {{{../maven-wrapper/}<<<maven-wrapper.jar>>>}} with <<<wget>>> or <<<curl>>> on Unix or PowerShell on Windows + + - <<<bin>>>: no need to download <<<maven-wrapper.jar>>> binary, it is directly provided and used from project source tree: + +---- +.mvn/wrapper/maven-wrapper.jar +---- + + - <<<source>>>: <<<mvnw>>>/<<<mvnw.cmd>>> scripts will compile <<<MavenWrapperDownloader.java>>> source then run the class to download {{{../maven-wrapper/}<<<maven-wrapper.jar>>>}}: + +---- +.mvn/wrapper/MavenWrapperDownloader.java +---- + + [] + + Distribution can be installed in a project either by unpacking zip archive by hand, or by using {{{../maven-wrapper-plugin/}<<<wrapper:wrapper>>>}}. diff --git a/maven-wrapper-distribution/src/site/site.xml b/maven-wrapper-distribution/src/site/site.xml new file mode 100644 index 0000000..7673a9a --- /dev/null +++ b/maven-wrapper-distribution/src/site/site.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd"> + <body> + <menu ref="parent"/> + <menu ref="reports"/> + </body> +</project> \ No newline at end of file diff --git a/maven-wrapper-plugin/src/site/markdown/usage.md b/maven-wrapper-plugin/src/site/markdown/usage.md index e7b8671..2105ee3 100644 --- a/maven-wrapper-plugin/src/site/markdown/usage.md +++ b/maven-wrapper-plugin/src/site/markdown/usage.md @@ -27,13 +27,11 @@ The Apache Maven Wrapper Plugin makes it easier to add these wrapper scripts to The scripts work like this: - download the maven-wrapper jar, if it is not available yet, -- the wrapper-jar contains the code to download and run Apache Maven +- the maven-wrapper.jar contains the code to download, install and run Apache Maven Apache Maven Wrapper Distribution Types ----- -Wrapper scripts are provided by Maven 4 releases as ["Apache Maven Wrapper Distribution"](/ref/4-LATEST/apache-maven-wrapper/). - There are 3 types available: - **script** _(default)_: With this type the scripts will try to download the scripts via wget or curl in case of Unix based system, or use Powershell in case of Windows @@ -48,7 +46,7 @@ This type comes with a `.mvn/wrapper/MavenWrapperDownloader.java` which will be Maven Version ------------- By default the plugin will assume the same version as the Maven runtime (calling `mvn -v`). But you can pick a different version. -Either call `mvn wrapper:wrapper -DmavenVersion=x`, where x is any valid Apache Maven Release, see https://search.maven.org/artifact/org.apache.maven/apache-maven +Either call `mvn wrapper:wrapper -Dmaven=x`, where x is any valid Apache Maven Release, see https://search.maven.org/artifact/org.apache.maven/apache-maven Another option is adjust the `distributionUrl` in `.mvn/wrapper/maven-wrapper.properties` Debugging @@ -56,4 +54,4 @@ Debugging The apache-maven-wrapper distributions all contains the `mvnwDebug`-script for both Windows and Unix based operating systems. This makes it possible to debug through Apache Maven, Maven Plugin or Maven Extension. -You can exclude these scripts by calling `mvn wrapper:wrapper -DincludeDebug=false` \ No newline at end of file +You can exclude these scripts by calling `mvn wrapper:wrapper -DincludeDebug=false` diff --git a/maven-wrapper/src/main/java/org/apache/maven/wrapper/BootstrapMainStarter.java b/maven-wrapper/src/main/java/org/apache/maven/wrapper/BootstrapMainStarter.java index 2627f5f..acc56f3 100644 --- a/maven-wrapper/src/main/java/org/apache/maven/wrapper/BootstrapMainStarter.java +++ b/maven-wrapper/src/main/java/org/apache/maven/wrapper/BootstrapMainStarter.java @@ -25,6 +25,8 @@ import java.net.URL; import java.net.URLClassLoader; /** + * Maven starter, from a provided Maven home directory. + * * @author Hans Dockter */ public class BootstrapMainStarter diff --git a/maven-wrapper/src/main/java/org/apache/maven/wrapper/Downloader.java b/maven-wrapper/src/main/java/org/apache/maven/wrapper/Downloader.java index eb1e693..9e11ae6 100644 --- a/maven-wrapper/src/main/java/org/apache/maven/wrapper/Downloader.java +++ b/maven-wrapper/src/main/java/org/apache/maven/wrapper/Downloader.java @@ -23,6 +23,8 @@ import java.io.File; import java.net.URI; /** + * Maven distribution downloader. + * * @author Hans Dockter */ public interface Downloader diff --git a/maven-wrapper/src/main/java/org/apache/maven/wrapper/Installer.java b/maven-wrapper/src/main/java/org/apache/maven/wrapper/Installer.java index 2e2e718..5de58ec 100644 --- a/maven-wrapper/src/main/java/org/apache/maven/wrapper/Installer.java +++ b/maven-wrapper/src/main/java/org/apache/maven/wrapper/Installer.java @@ -38,6 +38,8 @@ import java.util.zip.ZipFile; /** + * Maven distribution installer, eventually using a {@link Downloader} first. + * * @author Hans Dockter */ public class Installer diff --git a/maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java b/maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java index 3aa6c9b..ee1242c 100644 --- a/maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java +++ b/maven-wrapper/src/main/java/org/apache/maven/wrapper/MavenWrapperMain.java @@ -30,6 +30,8 @@ import org.apache.maven.wrapper.cli.CommandLineParser; import org.apache.maven.wrapper.cli.SystemPropertiesCommandLineConverter; /** + * Main entry point for the Maven Wrapper, delegating wrapper execution to {@link WrapperExecutor}. + * * @author Hans Dockter */ public class MavenWrapperMain diff --git a/maven-wrapper/src/main/java/org/apache/maven/wrapper/PathAssembler.java b/maven-wrapper/src/main/java/org/apache/maven/wrapper/PathAssembler.java index 2f0ac34..8c4c98d 100644 --- a/maven-wrapper/src/main/java/org/apache/maven/wrapper/PathAssembler.java +++ b/maven-wrapper/src/main/java/org/apache/maven/wrapper/PathAssembler.java @@ -46,6 +46,9 @@ public class PathAssembler /** * Determines the local locations for the distribution to use given the supplied configuration. + * + * @param configuration a wrapper configuration + * @return the local distribution */ public LocalDistribution getDistribution( WrapperConfiguration configuration ) { @@ -134,6 +137,7 @@ public class PathAssembler /** * Returns the location to install the distribution into. + * @return the location to install the distribution into */ public File getDistributionDir() { @@ -142,6 +146,7 @@ public class PathAssembler /** * Returns the location to install the distribution ZIP file to. + * @return the location to install the distribution ZIP file to */ public File getZipFile() { diff --git a/maven-wrapper/src/main/java/org/apache/maven/wrapper/WrapperExecutor.java b/maven-wrapper/src/main/java/org/apache/maven/wrapper/WrapperExecutor.java index 0b7537c..c2f5266 100644 --- a/maven-wrapper/src/main/java/org/apache/maven/wrapper/WrapperExecutor.java +++ b/maven-wrapper/src/main/java/org/apache/maven/wrapper/WrapperExecutor.java @@ -28,6 +28,9 @@ import java.net.URISyntaxException; import java.util.Properties; /** + * Wrapper executor, running {@link Installer} to get a Maven distribution ready, followed by + * {@link BootstrapMainStarter} to launch the Maven bootstrap. + * * @author Hans Dockter */ public class WrapperExecutor @@ -133,8 +136,9 @@ public class WrapperExecutor } /** - * Returns the distribution which this wrapper will use. Returns null if no wrapper meta-data was found in the + * Returns the Maven distribution which this wrapper will use. Returns null if no wrapper meta-data was found in the * specified project directory. + * @return the Maven distribution which this wrapper will use */ public URI getDistribution() { @@ -143,6 +147,7 @@ public class WrapperExecutor /** * Returns the configuration for this wrapper. + * @return the configuration for this wrapper */ public WrapperConfiguration getConfiguration() { diff --git a/maven-wrapper/src/main/java/org/apache/maven/wrapper/cli/CommandLineParser.java b/maven-wrapper/src/main/java/org/apache/maven/wrapper/cli/CommandLineParser.java index 7d41e75..c2853ad 100644 --- a/maven-wrapper/src/main/java/org/apache/maven/wrapper/cli/CommandLineParser.java +++ b/maven-wrapper/src/main/java/org/apache/maven/wrapper/cli/CommandLineParser.java @@ -43,7 +43,7 @@ import java.util.TreeSet; * </p> * * <pre> - * <option>* (<sub-command> <sub-command-option>*)* + * <option>* (<sub-command> <sub-command-option>*)* * </pre> * <ul> * <li>Short options are a '-' followed by a single character. For example: {@code -a}.</li> diff --git a/maven-wrapper/src/site/apt/index.apt b/maven-wrapper/src/site/apt/index.apt new file mode 100644 index 0000000..f28a5fa --- /dev/null +++ b/maven-wrapper/src/site/apt/index.apt @@ -0,0 +1,30 @@ +~~ 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. + + ----- + Introduction + ----- + Hervé Boutemy + ----- + 2021-04-05 + ----- + +Maven Wrapper Jar + + Maven Wrapper Jar downloads Maven distribution if not already in cache, installs it, then launches Maven: Maven distributions installed by Maven Wrapper are stored under <<<~/.m2/wrapper/dists>>> by default. + + Maven Wrapper is called by {{{../maven-wrapper-distribution/}<<<mvnw>>>/<<<mvnw.cmd>>> scripts}} that need to be installed in the project source tree and called instead of <<<mvn>>>/<<<mvn.cmd>>>. diff --git a/maven-wrapper/src/site/site.xml b/maven-wrapper/src/site/site.xml new file mode 100644 index 0000000..1c1c7d8 --- /dev/null +++ b/maven-wrapper/src/site/site.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd"> + + <body> + <menu name="Overview"> + <item name="Introduction" href="index.html"/> + <item name="JavaDocs" href="apidocs/index.html"/> + <item name="Source Xref" href="xref/index.html"/> + <!--item name="FAQ" href="faq.html"/--> + </menu> + + <menu ref="parent"/> + <menu ref="reports"/> + </body> +</project> \ No newline at end of file diff --git a/pom.xml b/pom.xml index 8891d32..a4293ba 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,28 @@ under the License. <packaging>pom</packaging> <name>Apache Maven Wrapper</name> + <inceptionYear>2016</inceptionYear> + + <scm> + <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-wrapper.git</connection> + <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-wrapper.git</developerConnection> + <url>https://github.com/apache/maven-wrapper/tree/${project.scm.tag}</url> + <tag>HEAD</tag> + </scm> + <issueManagement> + <system>JIRA</system> + <url>https://issues.apache.org/jira/browse/MWRAPPER</url> + </issueManagement> + <ciManagement> + <system>Jenkins</system> + <url>https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-wrapper/</url> + </ciManagement> + <distributionManagement> + <site> + <id>apache.website</id> + <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url> + </site> + </distributionManagement> <properties> <maven.site.path>wrapper-archives/wrapper-LATEST</maven.site.path> diff --git a/CHANGELOG.md b/src/site/markdown/CHANGELOG.old.md similarity index 100% rename from CHANGELOG.md rename to src/site/markdown/CHANGELOG.old.md diff --git a/README.md b/src/site/markdown/index.md similarity index 65% copy from README.md copy to src/site/markdown/index.md index 49e833e..c47edd7 100644 --- a/README.md +++ b/src/site/markdown/index.md @@ -23,21 +23,17 @@ everything necessary to run your Maven build. _Why might this be necessary?_ Maven to date has been very stable for users, is available on most systems or is easy to procure: but with many of the recent changes in Maven it will be easier for users to have a fully encapsulated build -setup provided by the project. With the Maven Wrapper this is very easy to do +setup provided by the project. With the Maven Wrapper, this is very easy to do and it's a great idea borrowed from Gradle. The easiest way to setup the Maven Wrapper for your project is to use the -[Takari Maven Plugin][1] with its provided `wrapper` goal. To add or update all +[Maven Wrapper Plugin][1] with its provided `wrapper` goal. To add or update all the necessary Maven Wrapper files to your project execute the following command: ```bash -mvn -N io.takari:maven:0.7.7:wrapper +mvn wrapper:wrapper ``` -> Note: The default usage should be `mvn -N io.takari:maven:wrapper` but for -> some users this seem to result in usage of an old version of the wrapper and -> therefore installation of older Maven defaults and so on. - Normally you instruct users to install a specific version of Apache Maven, put it on the PATH and then run the `mvn` command like the following: @@ -58,12 +54,12 @@ or on Windows mvnw.cmd clean install ``` -A normal Maven build will be executed with the one important change that if the +A normal Maven build will be executed, with the one important change that if the user doesn't have the necessary version of Maven specified in `.mvn/wrapper/maven-wrapper.properties` it will be downloaded for the user first, installed and then used. -Subsequent uses of `mvn`/`mvnw.cmd` use the previously downloaded, specific +Subsequent uses of `mvnw`/`mvnw.cmd` use the previously downloaded, specific version as needed. ## Supported Systems @@ -83,18 +79,12 @@ For all those *nix operating systems, various shells should work including * zsh In terms of Apache Maven versions itself, the wrapper should work with any Maven -3.x version and it defaults to the latest release - currently 3.6.3. We do NOT +3.x version and it defaults to the release used when setting up the wrapper. We do NOT plan to support the deprecated, EOL'ed Maven 2.x. -The maven-wrapper itself is compiled to work with Java 5. The Takari Maven -Plugin for installation however uses Java 7. Once the wrapper is installed with -the plugin you should be able to use the wrapper on the project with Java 5 and -up. This is however not really tested by the committers. - -## Changes - -Please check out the [changelog](./CHANGELOG.md) for more information about our -releases. +The `maven-wrapper.jar` is compiled to work with Java 5. The Maven Wrapper Plugin for installation however uses Java 8. +Once the wrapper is installed with the plugin, you should be able to use the wrapper on the project with Java 5 and up. +This is however not really tested by the committers. ## Verbose Mode @@ -126,11 +116,11 @@ variable `MVNW_PASSWORD`. ## Using a Different Version of Maven -To switch the version of Maven used to build a project you can initialize it +To switch the version of Maven used to build a project, you can initialize it using: ```bash -mvn -N io.takari:maven:0.7.7:wrapper -Dmaven=3.5.4 +mvn wrapper:wrapper -Dmaven=3.5.4 ``` which works for any version except snapshots. Once you have a wrapper you can @@ -146,17 +136,19 @@ distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-mav To download Maven from a location that requires Basic Authentication you have 2 options: -1. Set the environment variables MVNW_USERNAME and MVNW_PASSWORD +1. Set the environment variables `MVNW_USERNAME` and `MVNW_PASSWORD` or 2. add user and password to the distributionUrl like that: `distributionUrl=https://username:password@<yourserver>/maven2/org/apache/maven/apache-maven/3.2.1/apache-maven-3.2.1-bin.zip` -[1]: https://github.com/takari/takari-maven-plugin +[1]: ./maven-wrapper-plugin ## Specifying Maven Distribution Base Path +<!--- TODO: check this feature --> + This is a feature of Maven itself and the wrapper just happens to take it into account. Simply set `MAVEN_USER_HOME` to the desired path and the wrapper uses it as the base of the Maven distro installation. @@ -166,7 +158,7 @@ https://github.com/takari/maven-wrapper/issues/17 ## Using a Maven Repository Manager -When using an internal Maven repository manager you have two options: +When using an internal Maven repository manager, you have two options: 1. Just set the correct URL to wrapper jar and Maven distro in `maven-wrapper.properties` in your project @@ -174,37 +166,34 @@ When using an internal Maven repository manager you have two options: environment variable `MVNW_REPOURL` to your repo manager URL such as `https://repo.example.com/central-repo-proxy`. +<!--- TODO: check this feature --> + If `MVNW_REPOURL` is set during the wrapper installation with the -takari-maven-plugin, the URL is used in the maven-wrapper.properties file. +maven-wrapper-plugin, the URL is used in the maven-wrapper.properties file. If not set, but your mirror URL in your settings.xml is configured, it will be used. -## Developing and Releasing +## Internals -To test Maven wrapper usage: +Maven Wrapper is composed of 3 pieces: + +1. [maven-wrapper](./maven-wrapper/), providing the `maven-wrapper.jar` that downloads, installs and runs target Maven distribution, -- ensure you are building on a Unix filesystem with correct mounting for - executable flag setting -- build the maven-wrapper as snapshot version -- update version in takari-maven-plugin -- build takari-maven-plugin -- use on test project with takari-maven-plugin version +2. [maven-wrapper-distribution](./maven-wrapper-distribution/), that provides `mvnw`/`mvnw.cmd` scripts distributions, -```bash -mvn -N -X io.takari:maven:0.7.7-SNAPSHOT:wrapper -``` +3. [maven-wrapper-plugin](./maven-wrapper-plugin/), the `wrapper` plugin to ease installing Wrapper into a project. + +### Development -For release +To test Maven Wrapper during SNAPSHOT development, the SNAPSHOT wrapper Jar is not available in any remote repository for `mvnw` to download from. +Then you'll need to choose between 2 options: -- make sure version in mvnw files, MavenWrapperDownloader.java and config files - and pom files is new upcoming release -- cut maven release with usual release plugin usage -- update maven plugin to release version -- release it as well +1. either to use the `bin` wrapper distribution, that installs `maven-wrapper.jar` directly: `mvn org.apache.maven.plugins:maven-wrapper-plugin:3.0.3-SNAPSHOT:wrapper -Dtype=bin`. + This is perfect if you want to test updates in `mvnw` scripts or `maven-wrapper.jar` that do not relate to downloading `maven-wrapper.jar`, -Updating Maven version: +2. change the `wrapperUrl` value in `./mvn/wrapper/maven-wrapper.properties` to point to an older version of `maven-wrapper.jar`. + This is perfect if you want to test updates related to `maven-wrapper.jar` download only, but obviously not updates to the [wrapper jar](./maven-wrapper/), -- update URL in maven-wrapper/.mvn/wrapper/maven-wrapper.properties -- update URL in MavenWrapperMain -- updated DEFAULT_MAVEN_VER parameter in takari-maven-plugin WrapperMojo class +3. or the `wrapperUrl` value in `./mvn/wrapper/maven-wrapper.properties` to point to a remote HTTP(S) repository containing latest SNAPSHOT. + This is the most accurate way of testing every updates of the Maven Wrapper, but requires more setup (requires effective deploy to remote repository). diff --git a/src/site/resources/download.cgi b/src/site/resources/download.cgi new file mode 100644 index 0000000..1b178d2 --- /dev/null +++ b/src/site/resources/download.cgi @@ -0,0 +1,22 @@ +#!/bin/sh +# +# 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. +# +# Just call the standard mirrors.cgi script. It will use download.html +# as the input template. +exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* \ No newline at end of file diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 0000000..b6816dd --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="https://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="https://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd"> + + <body> + <breadcrumbs> + <item name="Wrapper" href="https://maven.apache.org/wrapper/index.html" /> + </breadcrumbs> + + <menu name="Overview"> + <item name="Introduction" href="index.html"/> + <!--item name="JavaDocs" href="apidocs/index.html"/--> + <!--item name="Source Xref" href="xref/index.html"/--> + <!--item name="FAQ" href="faq.html"/--> + <!-- According to https://issues.apache.org/jira/browse/MNGSITE-152 --> + <item name="License" href="https://www.apache.org/licenses/"/> + <item name="Download" href="download.html"/> + </menu> + + <menu ref="modules" /> + </body> +</project> diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm new file mode 100644 index 0000000..43b2e5c --- /dev/null +++ b/src/site/xdoc/download.xml.vm @@ -0,0 +1,126 @@ +<?xml version="1.0"?> + +<!-- +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. +--> + +<document> + <properties> + <title>Download ${project.name} Source</title> + </properties> + <body> + <section name="Download ${project.name} ${project.version} Source"> + + <p>${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to build + ${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository.</p> + + <p>You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take 24 + hours to reach all mirrors.<p/> + + <p>In order to guard against corrupted downloads/installations, it is highly recommended to + <a href="http://www.apache.org/dev/release-signing#verifying-signature">verify the signature</a> + of the release bundles against the public <a href="https://www.apache.org/dist/maven/KEYS">KEYS</a> used by the Apache Maven + developers.</p> + + <p>${project.name} is distributed under the <a href="http://www.apache.org/licenses/">Apache License, version 2.0</a>.</p> + + <p></p>We <b>strongly</b> encourage our users to configure a Maven repository mirror closer to their location, please read <a href="/guides/mini/guide-mirror-settings.html">How to Use Mirrors for Repositories</a>.</p> + + <a name="mirror"/> + <subsection name="Mirror"> + + <p> + [if-any logo] + <a href="[link]"> + <img align="right" src="[logo]" border="0" + alt="logo"/> + </a> + [end] + The currently selected mirror is + <b>[preferred]</b>. + If you encounter a problem with this mirror, + please select another mirror. + If all mirrors are failing, there are + <i>backup</i> + mirrors + (at the end of the mirrors list) that should be available. + </p> + + <form action="[location]" method="get" id="SelectMirror"> + Other mirrors: + <select name="Preferred"> + [if-any http] + [for http] + <option value="[http]">[http]</option> + [end] + [end] + [if-any ftp] + [for ftp] + <option value="[ftp]">[ftp]</option> + [end] + [end] + [if-any backup] + [for backup] + <option value="[backup]">[backup] (backup)</option> + [end] + [end] + </select> + <input type="submit" value="Change"/> + </form> + + <p> + You may also consult the + <a href="http://www.apache.org/mirrors/">complete list of + mirrors.</a> + </p> + + </subsection> + + <subsection name="${project.name} ${project.version}"> + + <p>This is the current stable version of ${project.name}.</p> + + <table> + <thead> + <tr> + <th></th> + <th>Link</th> + <th>Checksum</th> + <th>Signature</th> + </tr> + </thead> + <tbody> + <tr> + <td>${project.name} ${project.version} (Source zip)</td> + <td><a href="[preferred]maven/wrapper/maven-wrapper-${project.version}-source-release.zip">maven/wrapper/maven-wrapper-${project.version}-source-release.zip</a></td> + <td><a href="https://www.apache.org/dist/maven/wrapper/maven-wrapper-${project.version}-source-release.zip.sha512">maven/wrapper/maven-wrapper-${project.version}-source-release.zip.sha512</a></td> + <td><a href="https://www.apache.org/dist/maven/wrapper/maven-wrapper-${project.version}-source-release.zip.asc">maven/wrapper/maven-wrapper-${project.version}-source-release.zip.asc</a></td> + </tr> + </tbody> + </table> + </subsection> + + <subsection name="Previous Versions"> + + <p>Older non-recommended releases can be found on our <a href="http://archive.apache.org/dist/maven/wrapper/">archive site</a>.</p> + + </subsection> + </section> + </body> +</document> +
