How to generate maven wrapper for a project

Create project directory

mkdir -p maven-wrapper
cd maven-wrapper

Generate maven wrapper

lwk@qwfys:~/Public/project/default/maven-wrapper$ mvn -N io.takari:maven:wrapper
[INFO] Scanning for projects...
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven/maven-metadata.xml
Downloading from rdc-releases: https://repo.rdc.aliyun.com/repository/32217-release-EcXJKr/io/takari/maven/maven-metadata.xml
Downloading from snapshots: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven/maven-metadata.xml
Downloading from rdc-snapshots: https://repo.rdc.aliyun.com/repository/32217-snapshot-ymqNrV/io/takari/maven/maven-metadata.xml
Downloaded from snapshots: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven/maven-metadata.xml (942 B at 737 B/s)
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven/maven-metadata.xml (942 B at 731 B/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven/0.7.7/maven-0.7.7.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven/0.7.7/maven-0.7.7.pom (2.3 kB at 3.2 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari/27/takari-27.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari/27/takari-27.pom (14 kB at 46 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven/0.7.7/maven-0.7.7.jar
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven/0.7.7/maven-0.7.7.jar (9.0 kB at 28 kB/s)
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven:0.7.7:wrapper (default-cli) @ standalone-pom ---
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.pom (2.4 kB at 4.6 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari-archiver/0.1.9/takari-archiver-0.1.9.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari-archiver/0.1.9/takari-archiver-0.1.9.pom (1.8 kB at 4.8 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari/15/takari-15.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari/15/takari-15.pom (15 kB at 44 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/graph/takari-graph/0.0.3/takari-graph-0.0.3.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/graph/takari-graph/0.0.3/takari-graph-0.0.3.pom (4.7 kB at 16 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari/14/takari-14.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari/14/takari-14.pom (13 kB at 38 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.16/plexus-utils-3.0.16.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.16/plexus-utils-3.0.16.pom (3.4 kB at 4.8 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/tinkerpop/blueprints/blueprints-core/2.6.0/blueprints-core-2.6.0.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/tinkerpop/blueprints/blueprints-core/2.6.0/blueprints-core-2.6.0.pom (3.6 kB at 6.9 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/tinkerpop/blueprints/blueprints/2.6.0/blueprints-2.6.0.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/tinkerpop/blueprints/blueprints/2.6.0/blueprints-2.6.0.pom (7.0 kB at 20 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-model/3.2.3/maven-model-3.2.3.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-model/3.2.3/maven-model-3.2.3.pom (4.1 kB at 16 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven/3.2.3/maven-3.2.3.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven/3.2.3/maven-3.2.3.pom (23 kB at 58 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/github/spullara/mustache/java/compiler/0.8.15/compiler-0.8.15.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/github/spullara/mustache/java/compiler/0.8.15/compiler-0.8.15.pom (5.6 kB at 14 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/github/spullara/mustache/java/mustache.java/0.8.15/mustache.java-0.8.15.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/github/spullara/mustache/java/mustache.java/0.8.15/mustache.java-0.8.15.pom (3.5 kB at 7.9 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/squareup/javapoet/1.0.0/javapoet-1.0.0.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/squareup/javapoet/1.0.0/javapoet-1.0.0.pom (3.5 kB at 6.9 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/airlift/airline/0.6/airline-0.6.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/airlift/airline/0.6/airline-0.6.pom (6.8 kB at 23 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/google/guava/guava/12.0/guava-12.0.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/google/guava/guava/12.0/guava-12.0.pom (5.3 kB at 22 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/google/guava/guava-parent/12.0/guava-parent-12.0.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/google/guava/guava-parent/12.0/guava-parent-12.0.pom (2.8 kB at 9.0 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/antlr/antlr4-runtime/4.5/antlr4-runtime-4.5.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/antlr/antlr4-runtime/4.5/antlr4-runtime-4.5.pom (2.7 kB at 7.1 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.pom
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.pom (3.1 kB at 4.9 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/graph/takari-graph/0.0.3/takari-graph-0.0.3.jar
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari-archiver/0.1.9/takari-archiver-0.1.9.jar
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-model/3.2.3/maven-model-3.2.3.jar
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/tinkerpop/blueprints/blueprints-core/2.6.0/blueprints-core-2.6.0.jar
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar (51 kB at 73 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/github/spullara/mustache/java/compiler/0.8.15/compiler-0.8.15.jar
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/graph/takari-graph/0.0.3/takari-graph-0.0.3.jar (173 kB at 95 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/squareup/javapoet/1.0.0/javapoet-1.0.0.jar
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/github/spullara/mustache/java/compiler/0.8.15/compiler-0.8.15.jar (116 kB at 60 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/airlift/airline/0.6/airline-0.6.jar
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/takari/takari-archiver/0.1.9/takari-archiver-0.1.9.jar (41 kB at 20 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/antlr/antlr4-runtime/4.5/antlr4-runtime-4.5.jar
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-model/3.2.3/maven-model-3.2.3.jar (160 kB at 77 kB/s)
Downloading from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.jar
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/squareup/javapoet/1.0.0/javapoet-1.0.0.jar (65 kB at 29 kB/s)
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/com/tinkerpop/blueprints/blueprints-core/2.6.0/blueprints-core-2.6.0.jar (274 kB at 116 kB/s)
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/io/airlift/airline/0.6/airline-0.6.jar (87 kB at 36 kB/s)
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.jar (26 kB at 10 kB/s)
Downloaded from mirror: https://maven.aliyun.com/nexus/content/groups/public/org/antlr/antlr4-runtime/4.5/antlr4-runtime-4.5.jar (374 kB at 132 kB/s)
[INFO] 
[INFO] Maven Wrapper version 0.5.6 has been successfully set up for your project.
[INFO] Using Apache Maven: 3.6.3
[INFO] Repo URL in properties file: https://repo.maven.apache.org/maven2
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.221 s
[INFO] Finished at: 2021-06-05T00:03:20+08:00
[INFO] ------------------------------------------------------------------------
lwk@qwfys:~/Public/project/default/maven-wrapper$
lwk@qwfys:~/Public/project/default/maven-wrapper$ tree -a
.
├── .mvn
│   └── wrapper
│       ├── MavenWrapperDownloader.java
│       ├── maven-wrapper.jar
│       └── maven-wrapper.properties
├── mvnw
└── mvnw.cmd

2 directories, 5 files
lwk@qwfys:~/Public/project/default/maven-wrapper$

lwk@qwfys:~/Public/project/default/maven-wrapper$ cat .mvn/wrapper/maven-wrapper.properties 
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
lwk@qwfys:~/Public/project/default/maven-wrapper$
lwk@qwfys:~/Public/project/default/maven-wrapper$ mvn -N io.takari:maven:wrapper -Dmaven=3.8.1
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven:0.7.7:wrapper (default-cli) @ standalone-pom ---
[INFO] 
[INFO] Maven Wrapper version 0.5.6 has been successfully set up for your project.
[INFO] Using Apache Maven: 3.8.1
[INFO] Repo URL in properties file: https://repo.maven.apache.org/maven2
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.318 s
[INFO] Finished at: 2021-06-05T00:26:13+08:00
[INFO] ------------------------------------------------------------------------
lwk@qwfys:~/Public/project/default/maven-wrapper$

lwk@qwfys:~/Public/project/default/maven-wrapper$ cat .mvn/wrapper/maven-wrapper.properties 
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
lwk@qwfys:~/Public/project/default/maven-wrapper$

Reference

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qwfys200

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值