#!/bin/sh
#
# Copyright The OpenZipkin Authors
# SPDX-License-Identifier: Apache-2.0
#

# This is a go-offline that properly works with multi-module builds

set -ue

export MAVEN_OPTS="$($(dirname "$0")/maven_opts)"
if [ -x ./mvnw ]; then alias mvn=${PWD}/mvnw; fi

(
  if [ "${MAVEN_PROJECT_BASEDIR:-.}" != "." ]; then cd ${MAVEN_PROJECT_BASEDIR}; fi
  mvn -q --batch-mode -nsu -Prelease de.qaware.maven:go-offline-maven-plugin:resolve-dependencies "$@"
)
