【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
maven
星期天整理书签之 maven
删除所有 lastUpdated 文件
包含.jar.lastUpdated 和 .pom.lastUpdated,以下操作等价随便选一条执行即可
~/.m2/repository$ find ~/.m2 -name "*lastUpdated" -exec rm -rf {} \;
~/.m2/repository$ find ~/.m2 -name \*lastUpdated -exec rm -fv {} +;
~/.m2/repository$ find ~/.m2 -name \*lastUpdated -delete;
~/.m2/repository$ find ~/.m2 -name \*lastUpdated | xargs rm -fr;
windows 下删除 lastupdate 的方法
@echo off
echo 开始...
for /f "delims=" %%i in ('dir /b /s "./*lastUpdated"') do (
del /s /q %%i
)
echo 结束
pause
参考:
批量删除Maven 仓库未下载成功.lastupdate 的文件 - Phoenix-Smile - 博客园
maven-downloads-have-lastupdated-as-extension
国内环境配置镜像仓库
配置 aliyun 作为镜像仓库 settings.xml
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
<mirror>
<!--This is used to direct the public snapshots repo in the
profile below over to a different nexus group -->
<id>nexus-public-snapshots</id>
<mirrorOf>public-snapshots</mirrorOf>
<url>http://maven.aliyun.com/nexus/content/repositories/snapshots/</url>
</mirror>
</mirrors>
参考:
仓库服务
国内已经没有maven镜像站了吗? - 知乎
aliyun maven - jis117 - 博客园
maven 多模块项目,编译打包指定模块
mvn package -pl ms-eureka -am
mvn package -pl ms-zuul -am
参考:
Maven多个mudule只编译、打包指定module
maven 相关的问题
- List the differences between ANT and Maven.
- What does it mean when you say Maven uses Convention over Configuration?
- What is the Maven Build lifecycle?
- Is it possible to refer a property defined in your pom.xml file
参考:
Top 50 Maven Interview Questions You Should know In 2020 | Edureka
Maven is a project management and comprehension tool. Maven provides developers a complete build lifecycle framework. The development team is easily able to automate the project’s build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle.
来源:oschina
链接:https://my.oschina.net/ois/blog/3142940