栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

maven使用

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

maven使用

资源
项目地址: https://maven.apache.org/plugins/index.html

1. 解决的问题

java项目依赖管理
自动化项目构建

2. 典型使用 配置
 com.mycompany.app
  my-app
  1.0-SNAPSHOT
my-app
  
  http://www.example.com
 
  
    UTF-8
    1.7
    1.7
  
 
 
    
      junit
      junit
      4.11
      test
    
  
 
    
       ... lots of helpful plugins
    
  
阶段


如果进行了deploy或者install,如何撤回?

3.概念与细节 snapshot

The SNAPSHOT value refers to the ‘latest’ code along a development branch, and provides no guarantee the code is stable or unchanging. Conversely, the code in a ‘release’ version (any version value without the suffix SNAPSHOT) is unchanging.

In other words, a SNAPSHOT version is the ‘development’ version before the final ‘release’ version. The SNAPSHOT is “older” than its release.

parent

父级引用

最终两个app项目中都要引用parent.pom信息,可以方便的在parent中做统一的配置,提高复用性和修改的灵活性。

例如 spring-boot-starter-parent.pom

  1. 定义了java编译版本为1.8;

  2. 使用UTF-8格式编码;

  3. 继承自spring-boot-dependencies,这个里边定义了依赖的版本,也正是因为继承了这个依赖,所以我们在写依赖时才不需要写版本号;

  4. 执行打包操作的配置;

  5. 自动化的资源过滤;

  6. 自动化的插件配置;

  7. 针对 application.properties 和 application.yml 的资源过滤,包括通过 profile 定义的不同环境的配置文件,例如 application-dev.properties 和 application-dev.yml。

maven库

usages 被其他项目引用次数。

scope

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/821686.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号