From nobody Thu Jul 28 15:55:43 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LtwGl56gGz4X7NP; Thu, 28 Jul 2022 15:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LtwGl4Zjtz3FKp; Thu, 28 Jul 2022 15:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659023743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MncKaLbcxbUQdb60mAEGSjPxLtYPy9M3Vfd3PlZ+NSM=; b=bmIorkURoewMP6Vl673EqAoyE3sxfF4iN8n0b2VuQAVVqlqZq9A2qg2OV9NS45lp9eSdsY se0tmhZZwiFE5sLtYjxvnfkk/B3LythWyD0E5ufttVJx1UUKNkL4/3Wt1x+xbb8YSH8YDu 8cktHfnQcKR9qf1eMCxnuxXoNcXK4UIjjmukDDfVkFZ7dyjtfgI5OG6zJnQoH+a2rXIAKR +B+V0ETLj67U5UOd9gGtYA6qS45H9pVxZbo0TFkN1wVgdMh2JBxwmhQa4jou4U5wQO4oD/ CBy6KWl+6OyxQS+xSmPhNdj9K1myQIcNFkXUui05o2NwNgPe4XuzIGBl+1OFtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LtwGl3fH1z126M; Thu, 28 Jul 2022 15:55:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26SFthFN037610; Thu, 28 Jul 2022 15:55:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26SFthkU037609; Thu, 28 Jul 2022 15:55:43 GMT (envelope-from git) Date: Thu, 28 Jul 2022 15:55:43 GMT Message-Id: <202207281555.26SFthkU037609@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kurt Jaeger Subject: git: 5f0ee47286fc - main - devel/maven-wrapper: massively update port, align with devel/maven List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pi X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f0ee47286fc1f0350efda5e88bd114a9a9b80a5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659023743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MncKaLbcxbUQdb60mAEGSjPxLtYPy9M3Vfd3PlZ+NSM=; b=L1Kn2D+dU9XnQu/OgqODH+o9puVkaaCt+z9OKAq4g57vcjzPF9vnZJZMD1Qb1dIaAOFlsE cvYZlT+bOzOU8ZeYP3IcM9uzz1J5yVo8pViXydiv75cAvrxWfzRto/EvQixSmzZ5z0bnSf 5dioDTtdfy9t6oM9SzbEfoi0WvfzW02CVqpWz0F6NwQ8xDSDsK77NdIFy8S1SiCgzk8PUI yVqfIYJreUFe/paas+XGh8appGgk/8zoJDR2lT+yFlEB9hwHiuj1Pp1Y2v/Szd82f/YO/k +sp3Cug/iwFkvZ9WhMWktoDD3Q4wCZf4gmmuuwKSaaeHjwo/pf6Auw+Bu67/qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659023743; a=rsa-sha256; cv=none; b=YR42er4txn/MQazjOuA9rhQ+NBlFs0piOY3zr77GUoF2yuzxRxTovwoyV+uvaQP0KpTjE1 bgUOPexaap+5bFYnVjs6fP2VvQvbcpXjDX4X1s4GAqUc5+EcnFpVKmODb3L+FfC+lLRFMX wS71mpEiyutGLuOJisMH64f8oVtMmWHRWNekcAkyNknyHLuZpE7x22HXEvJnJQ3FyjZjs9 JPOD+DcG6H3Uv5nu54gQt+8x86EpZg7T2Jf2eyNnv5w9arG8VrMRjYIz5TcEU3fQpfgscV ty5oYEo1Lh50e+QOBXFZf8uujMNkVPMwKrSlIkhtpa8RlCdYbBzhmDwZqKHLCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pi: URL: https://cgit.FreeBSD.org/ports/commit/?id=5f0ee47286fc1f0350efda5e88bd114a9a9b80a5 commit 5f0ee47286fc1f0350efda5e88bd114a9a9b80a5 Author: Michael Osipov AuthorDate: 2022-07-28 15:53:13 +0000 Commit: Kurt Jaeger CommitDate: 2022-07-28 15:55:11 +0000 devel/maven-wrapper: massively update port, align with devel/maven - Submitter changes MAINTAINER to his @apache.org address - Bump version to 2 - Use ETCDIR wherever possible - Also install mvnDebug - Burry long dead M2_HOME in favor of MAVEN_HOME which will *never* be propagated PR: 265028, 265025 --- UPDATING | 7 ++++++ devel/maven-wrapper/files/mvn.sh.in | 21 ++++++++--------- devel/maven-wrapper/pkg-descr | 4 ++-- devel/maven-wrapper/pkg-plist | 3 ++- devel/maven/files/mvn.sh.in | 46 ------------------------------------- 5 files changed, 20 insertions(+), 61 deletions(-) diff --git a/UPDATING b/UPDATING index 6d76e6add9b7..d73e9010cf42 100644 --- a/UPDATING +++ b/UPDATING @@ -18,6 +18,13 @@ you update your ports collection, before attempting any port upgrades. # pkill stunnel;service stunnel start after the upgrade has been completed. +202207XYZ: + AFFECTS: users of devel/maven-wrapper and devel/maven + AUTHOR: michaelo@apache.org + + The environment variable M2_HOME has been replaced with more common + MAVEN_HOME which can be used to pass a custom Maven home directory. + 20220628: AFFECTS: users of Erlang and Elixir AUTHOR: dch@FreeBSD.org diff --git a/devel/maven-wrapper/files/mvn.sh.in b/devel/maven-wrapper/files/mvn.sh.in index 16506f407246..a822dfef5819 100644 --- a/devel/maven-wrapper/files/mvn.sh.in +++ b/devel/maven-wrapper/files/mvn.sh.in @@ -2,26 +2,23 @@ set -e -if [ -f "%%PREFIX%%/etc/maven/setenv.sh" ] ; then - . "%%PREFIX%%/etc/maven/setenv.sh" -fi +SCRIPT_NAME="$(basename $0)" -if [ -z "${M2_HOME}" ] ; then - INSTANCES_DIRECTORY="/usr/local/etc/maven-wrapper/instances.d" - INSTANCE="`%%FIND%% -s "${INSTANCES_DIRECTORY}" -type f -mindepth 1 -maxdepth 1 | %%TAIL%% -n 1`" +if [ -z "${MAVEN_HOME}" ] ; then + INSTANCES_DIRECTORY="%%ETCDIR%%/instances.d" + INSTANCE="$(%%FIND%% -s "${INSTANCES_DIRECTORY}" -type f -mindepth 1 -maxdepth 1 | %%TAIL%% -n 1)" if [ -z "${INSTANCE}" ] ; then - echo "could not find a Maven instance! (${INSTANCES_DIRECTORY})" >&2 + echo "Could not find a Maven instance in ${INSTANCES_DIRECTORY}" >&2 exit 1 fi - M2_HOME="`%%CAT%% "${INSTANCE}"`" + MAVEN_HOME="$(%%CAT%% "${INSTANCE}")" - if [ ! -d "${M2_HOME}" ] ; then - echo "not a directory: ${M2_HOME}" >&2 + if [ ! -d "${MAVEN_HOME}" ] ; then + echo "Not a directory: ${MAVEN_HOME}" >&2 exit 2 fi fi -export M2_HOME -exec "${M2_HOME}/bin/mvn" "$@" +exec "${MAVEN_HOME}/bin/${SCRIPT_NAME}" "$@" diff --git a/devel/maven-wrapper/pkg-descr b/devel/maven-wrapper/pkg-descr index a75f8cd0d9a7..febfe74f39ac 100644 --- a/devel/maven-wrapper/pkg-descr +++ b/devel/maven-wrapper/pkg-descr @@ -1,7 +1,7 @@ The maven-wrapper provides a convenient way to switch between several Maven installations. -- By setting the M2_HOME environment variable the user can select the Maven +- By setting the MAVEN_HOME environment variable the user can select the Maven instance to use. - A default Maven instance is selected according to the files in - /usr/local/etc/maven/instances.d/ + /usr/local/etc/maven-wrapper/instances.d/ diff --git a/devel/maven-wrapper/pkg-plist b/devel/maven-wrapper/pkg-plist index 08a1b2b15539..01389ee11108 100644 --- a/devel/maven-wrapper/pkg-plist +++ b/devel/maven-wrapper/pkg-plist @@ -1,2 +1,3 @@ bin/mvn -@dir etc/maven-wrapper/instances.d +bin/mvnDebug +@dir %%ETCDIR%%/instances.d diff --git a/devel/maven/files/mvn.sh.in b/devel/maven/files/mvn.sh.in deleted file mode 100644 index cb8111acfea2..000000000000 --- a/devel/maven/files/mvn.sh.in +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# - -if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc -fi - -if [ -f "${HOME}/.mavenrc" ] ; then - . "${HOME}/.mavenrc" -fi - -M2_HOME=${M2_HOME:-"%%DATADIR%%"} - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() -{ - local basedir=$(pwd) - local wdir=$(pwd) - while [ "$wdir" != '/' ] ; do - wdir=$(cd "$wdir/.."; pwd) - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() -{ - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -exec "%%LOCALBASE%%/bin/java" $MAVEN_OPTS \ - -classpath "${M2_HOME}/boot/%%CLASSWORLDS_JAR%%" \ - "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \ - "-Dmaven.home=${M2_HOME}" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - org.codehaus.classworlds.Launcher "$@"