1、在Maven项目或者pom.xml上右键——>Run As ——>“Maven Build...”或者Run Configuration——>“Maven Build”

2、在“Goals”输入框中输入:clean install -X

3、使用时在Run As中选中Maven build即可

mvn命令若干:

  • mvn -h,不会用时,可寻求帮助。

  • mvn clean compile,将.java类编译为.class文件;

  • mvn clean test, 执行单元测试。本质上,还是执行了一个完整的生命周期,clean:clean, resources:resources, compiler:compile, resources:testResources, compiler:testCompile

  • mvn clean package,进行打包。

  • mvn clean install –Dmaven.test.skip

  • mvn clean install,将某jar包安装到maven本地仓库中。

  • mvn archetype:generate,快速的搭建项目骨架,输入一些groupId/artifactId/version等信息,由mvn插件自动生成一些必要的依赖和项目骨架。

GitHub 加速计划 / ma / maven
36
3
下载
Maven: Apache Maven是一个开源的项目管理和构建工具,主要用于Java项目。适合需要自动化项目构建和依赖管理的开发者。特点包括约定优于配置、易于使用和社区驱动。
最近提交(Master分支:3 个月前 )
6f0294df * Maven Parent 46 w/ some slight updates * Do run RAT on submodules * Fixes I missed parent rat in plugins Just alter config, nothing more 1 天前
1db41bbe Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](https://github.com/junit-team/junit-framework/compare/r6.0.1...r6.0.2) --- updated-dependencies: - dependency-name: org.junit:junit-bom dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 3 天前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐