Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.2
-
None
-
None
Description
I have heavily used the takari plugin in the past and am comparing to that. The takari plugin documentation is very clear and easy to follow, simply run
mvn -N io.takari:maven:0.7.7:wrapper
I am attempting to follow what is documented here, but running into a number of problems.
Setup
$ ~/Applications/apache-maven-3.8.1/bin/mvn archetype:generate -DartifactId=example -DgroupId=example -B .... $ cd example
Following the documentation
$ ~/Applications/apache-maven-3.8.1/bin/mvn wrapper [INFO] Scanning for projects... [INFO] [INFO] --------------------------< example:example >--------------------------- [INFO] Building example 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.093 s [INFO] Finished at: 2021-05-02T13:52:38-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Unknown lifecycle phase "wrapper". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
Trying something else
$ ~/Applications/apache-maven-3.8.1/bin/mvn wrapper:wrapper [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/2.4/maven-jar-plugin-2.4.jar (34 kB at 76 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar (43 kB at 682 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar (30 kB at 725 kB/s) [INFO] [INFO] --------------------------< example:example >--------------------------- [INFO] Building example 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-wrapper-plugin:3.0.1:wrapper (default-cli) @ example --- [WARNING] The POM for org.apache.maven:apache-maven-wrapper:zip:script:3.8.1 is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.622 s [INFO] Finished at: 2021-05-02T13:54:08-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-wrapper-plugin:3.0.1:wrapper (default-cli) on project example: org.apache.maven:apache-maven-wrapper:zip:script:3.8.1 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Based on this it seems maybe there are two issues
1. The documentation might not be right
2. Some artifact might not have been pushed