zoukankan      html  css  js  c++  java
  • java-maven

        <parent>
            <groupId>com.ycgwl.base</groupId>
            <artifactId>rosefinch-basedev</artifactId>
            <version>2.0.0-SNAPSHOT</version>
        </parent>

    以上groupId,artifactId,version对应的仓库文件结构为

    com/ycgwl/base/rosefinch-basedev/2.0.0-SNAPSHOT/rosefinch-basedev-2.0.0-SNAPSHOT

    注:控制台mvn命令读的环境变量中的 maven,jdk

    maven命令:

    mvn version

    mvn dependency:tree 查看依赖(ps:分析后发现,当前项目依赖从最上往下加载,子级项目内部依赖优先级低于当前项目依赖)

    mvn help:effective-pom 查看最终生成的pom(ps:分析后发现:dependency,pugin Management会全部拷贝到子项目pom,if(包含){拷贝version到子项目对应模块},properties是合并到子项目)

    使用总结:

    如果本地仓库中有构件,还是去中央仓库下载,那么可以将本地构件中的 _remote.repositories,_maven.repositories删除,然后重启 Intellij idea

    maven项目生成骨架

    在项目根目录执行命令:mvn archetype:create-from-project,新生成的archetype在target/generated-sources/archetype目录

    在archetype根(.. argetgenerated-sourcesarchetype)目录执行:mvn clean install,将该archetype传到本地的maven仓库

    通过 mvn archetype:generate -DarchetypeGroupId=com.ycgwl.base -DarchetypeArtifactId=rosefinch-basedev-archetype -DarchetypeVersion=2.0.0-SNAPSHOT 就可以创建项目了

  • 相关阅读:
    selenium1-安装
    jmeter9-图形监控
    InetAddress.getLocalHost().getHostAddress() 在macOS里面反应很慢
    自定义实现简易定时任务
    Redis性能监控
    Linux启动进程、线程数量查看及修改方式
    jmeter处理request和response
    centos安装netdata
    scp使用expect自动输入密码
    Linux系统下生成TPS,ResponseTime曲线图
  • 原文地址:https://www.cnblogs.com/zfzf1/p/6623927.html
Copyright © 2011-2022 走看看