SoFunction
Updated on 2025-03-02

Use Maven to package, publish, and configure version number commands

Maven package, release, and configure version number commands

1. Skip the test when packaging and publishing

# Skip the test when packingmvn package -=true 

# Skip the test when packingmvn deploy -=true 

# Include source code when publishingmvn deploy source:jar

2. Specify the project version number

# Replace the version number to 2.0.0-SNAPSHOT, the version number will be modifiedmvn clean versions:set -DnewVersion=2.0.0-SNAPSHOT

# Publishmvn deploy source:jar

# After confirming that there is no problem with the upgrade version, execute Confirm the upgrade and remove the backupmvn versions:commit

#Rolled version numbermvn versions:revert

3. Specify configuration files

mvn deploy -s /xxxx/conf/

Summarize

The above is personal experience. I hope you can give you a reference and I hope you can support me more.