maven常用技巧

maven父子工程更新版本号

命令:
 mvn versions:set -DnewVersion=3.0.0-SNAPSHOT
 mvn versions:update-child-modules

maven 构建一个项目命令:

mvn archetype:generate -D groupId=com.mycompany.app -D artifactId=my-app -D archetypeArtifactId=maven-archetype-quickstart -D archetypeVersion=1.4 -D interactiveMode=false
archetype:generate
pom.xml是项目对象模型

打包配置

<properties>
<!-- java 版本 -->
        <maven.compiler.release>11</maven.compiler.release>
    </properties>
  <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

配置pom.xml中的build:
build描述了如何来编译打包项目,具体打包工作通过build中的plugin来完成。
通常manven绑定的插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值