jdk==1.8
./mvnw clean install -DskipTests=true -P skipNpmTests-maven.test.skip,skipNpmTests-skipTests
Зип упадет в assemblies/nexus-base-template/target/
mkdir -p /tmp/sonatype-work/nexus3/etc/
mkdir -p /tmp/nexus-data
chmod 777 /tmp/nexus-data
export PG_URL="localhost:5432"
export PG_USER="nexus"
export PG_PASSWORD="nexus"
export PG_DB="nexus"
cat <<EOF > /tmp/sonatype-work/nexus3/etc/nexus.properties
nexus.datastore.enabled=true
nexus.datastore.nexus.jdbcUrl=jdbc:postgresql://$PG_URL/$PG_DB?user=$PG_USER&password=$PG_PASSWORD
nexus.datastore.nexus.genericJdbc=true
EOF
docker build -t fraima.io/nexus:3.60.0-02 .
docker run -d -ti \
--rm \
-p 8080:8081 \
-p 9090:9090 \
-v /tmp/sonatype-work/nexus3/etc/nexus.properties:/opt/sonatype/sonatype-work/nexus3/etc/nexus.properties \
-v /tmp/nexus-data:/nexus-data \
fraima.io/nexus:3.60.0-02
<workdir>/sonatype-work/nexus3/etc/nexus.properties
:
nexus.datastore.enabled=true
nexus.datastore.nexus.jdbcUrl=jdbc:postgresql://<host>:<port>/<db>?user=<user>&password=<pass>
nexus.datastore.nexus.genericJdbc=true
распаковать zip в jdk == 1.8
./nexus-base-template-<X.XX.X>/bin/nexus.run
https://help.sonatype.com/repomanager3/installation-and-upgrades/migrating-to-a-new-database
java -Xmx4G -Xms4G -XX:MaxDirectMemorySize=4014M -jar nexus-db-migrator-*.jar --migration_type=h2_to_postgres --db_url="jdbc:postgresql://<database URL>:<port>/nexus?user=postgresUser&password=secretPassword¤tSchema=nexus"
java -jar nexus-db-migrator-*.jar --migration_type=postgres_to_h2 --db_url="jdbc:postgresql://<database URL>:<port>/nexus?user=postgresUser&password=secretPassword¤tSchema=nexus"
nexus-db-migrator не поддерживает прямую миграцию PG->PG для реализации такого сценария сначала нужно выполнить миграцию PG->H2 затем H2->PG
export NEXUS_VERSION=3.60.0-02 https://repo1.maven.org/maven2/org/sonatype/nexus/plugins/nexus-p2-bridge-plugin/${NEXUS_VERSION}/nexus-p2-bridge-plugin-${NEXUS_VERSION}-bundle.zip