maven笔记

tech2022-09-30  109

【1】常用命令 【2】部署到远程仓库 【3】创建Maven项目速度慢问题 DarchetypeCatalog 【4】maven打包带时间戳 【5】maven deploy 快照与发布 【6】nexus部署 【7】配置jdk版本 【8】settings文件 【9】配置http代理 【10】mirror与repositories的关系

【1】常用命令

创建一个简单的Java工程:mvn archetype:create -DgroupId=com.mycompany.example -DartifactId=Example 创 建一个java的web工程:mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DgroupId=com.mycompany.app -DartifactId=my-webapp 打包:mvn package 编译:mvn compile 编译测试程序:mvn test-compile 清空:mvn clean 运行测试:mvn test 生成站点目录: mvn site 生成站点目录并发布:mvn site-deploy 安装当前工程的输出文件到本地仓库: mvn install 安 装指定文件到本地仓库:mvn install:install-file -DgroupId=<groupId> -DartifactId=<artifactId> -Dversion=1.0.0 -Dpackaging=jar -Dfile=<myfile.jar> eg:mvn install:install-file -Dfile=D:\mvn\spring-
最新回复(0)