Back to snippet library
Shell Snippet #3

DEX660 - deploy POMs

The special profile deploy-to-exchange-v3 defined in the settings file and referenced in the BOM file is designed to enable publishing of parent POMs and BOMs as outlined in https://help.salesforce.com/s/articleView?id=001116554&type=1. Given the BOM and parent POM are already configured as outlined in the help document, all that’s required to run these commands from from the parent-pom or bom directory.

Shell
# INSTALL POMS IN LOCAL REPOSITORY (i.e. ~/.m2/repository) NEEDED FOR MUNIT
cd $WORKSPACE
mvn install:install-file -Dfile=bom/pom.xml -DpomFile=bom/pom.xml
mvn install:install-file -Dfile=parent-pom/pom.xml -DpomFile=parent-pom/pom.xml

# PUBLISH TO EXCHANGE (based on the POMs and settings.xml above)
cd $WORKSPACE/bom
mvn clean deploy -Pdeploy-to-exchange-v3
cd $WORKSPACE/parent-pom
mvn clean deploy -Pdeploy-to-exchange-v3

Diagram