Skip to content

Instantly share code, notes, and snippets.

@andrewmunro
Created January 23, 2018 17:20
Show Gist options
  • Save andrewmunro/2665483aa387b93bb5d3421ca32b86c3 to your computer and use it in GitHub Desktop.
Save andrewmunro/2665483aa387b93bb5d3421ca32b86c3 to your computer and use it in GitHub Desktop.
Maven Spigot Plugin Builder
#!/bin/bash
# Exists to fully update the git repo that you are sitting in...
git submodule update --init --recursive
docker-compose up -d
if [ -z "$1" ]; then
docker-compose run plugin-builder bash -c "find . -name 'pom.xml' -exec sh -c 'mvn install -f \"{}\"' \;"
else
docker-compose run plugin-builder bash -c "mvn install -f $1"
fi
version: '2'
services:
plugin-builder:
image: maven:alpine
command: tail -f /dev/null
working_dir: /build
volumes:
- "mvn_data:/root/.m2"
- "./:/build"
- "./deps/spigot-1.12.2.jar:/root/.m2/repository/org/spigotmc/spigot/1.12-R0.1-SNAPSHOT/spigot-1.12-R0.1-SNAPSHOT.jar"
- "./deps/spigot-api-1.12-R0.1-SNAPSHOT.jar:/root/.m2/repository/org/spigotmc/spigot-api/1.12-R0.1-SNAPSHOT/spigot-api-1.12-R0.1-SNAPSHOT.jar"
- "./deps/CivModCore-1.6.2.jar:/root/.m2/repository/vg/civcraft/mc/civmodcore/CivModCore/1.6.2/CivModCore-1.6.2.jar"
volumes:
mvn_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment