View | Details | Raw Unified | Return to bug 265028
Collapse All | Expand All

(-)b/devel/maven-wrapper/Makefile (-7 / +6 lines)
Lines 1-21 Link Here
1
# Created by: Herve Quiroz <hq@FreeBSD.org>
2
3
PORTNAME=	maven-wrapper
1
PORTNAME=	maven-wrapper
4
PORTVERSION=	1
2
PORTVERSION=	2
5
PORTREVISION=	2
6
CATEGORIES=	devel java
3
CATEGORIES=	devel java
7
MASTER_SITES=	# none
4
MASTER_SITES=	# none
8
DISTFILES=	# none
5
DISTFILES=	# none
9
6
10
MAINTAINER=	ports@FreeBSD.org
7
MAINTAINER=	michaelo@apache.org
11
COMMENT=	Wrapper script for the various installations of Maven
8
COMMENT=	Wrapper script for the various installations of Maven
12
9
13
NO_BUILD=	yes
10
NO_BUILD=	yes
14
SUB_FILES=	mvn.sh
11
SUB_FILES=	mvn.sh
15
SUB_LIST=	CAT=${CAT} FIND=${FIND} TAIL=${TAIL}
12
SUB_LIST=	ETCDIR=${ETCDIR} CAT=${CAT} FIND=${FIND} TAIL=${TAIL}
13
PLIST_SUB=	ETCDIR=${ETCDIR}
16
14
17
do-install:
15
do-install:
18
	${MKDIR} "${STAGEDIR}${PREFIX}/etc/maven-wrapper/instances.d"
16
	${MKDIR} "${STAGEDIR}${ETCDIR}/instances.d"
19
	${INSTALL_SCRIPT} "${WRKDIR}/mvn.sh" "${STAGEDIR}${PREFIX}/bin/mvn"
17
	${INSTALL_SCRIPT} "${WRKDIR}/mvn.sh" "${STAGEDIR}${PREFIX}/bin/mvn"
18
	${INSTALL_SCRIPT} "${WRKDIR}/mvn.sh" "${STAGEDIR}${PREFIX}/bin/mvnDebug"
20
19
21
.include <bsd.port.mk>
20
.include <bsd.port.mk>
(-)b/devel/maven-wrapper/files/mvn.sh.in (-12 / +9 lines)
Lines 2-27 Link Here
2
2
3
set -e
3
set -e
4
4
5
if [ -f "%%PREFIX%%/etc/maven/setenv.sh" ] ; then
5
SCRIPT_NAME="$(basename $0)"
6
	. "%%PREFIX%%/etc/maven/setenv.sh"
7
fi
8
6
9
if [ -z "${M2_HOME}" ] ; then
7
if [ -z "${MAVEN_HOME}" ] ; then
10
	INSTANCES_DIRECTORY="/usr/local/etc/maven-wrapper/instances.d"
8
	INSTANCES_DIRECTORY="%%ETCDIR%%/instances.d"
11
	INSTANCE="`%%FIND%% -s "${INSTANCES_DIRECTORY}" -type f -mindepth 1 -maxdepth 1 | %%TAIL%% -n 1`"
9
	INSTANCE="$(%%FIND%% -s "${INSTANCES_DIRECTORY}" -type f -mindepth 1 -maxdepth 1 | %%TAIL%% -n 1)"
12
10
13
	if [ -z "${INSTANCE}" ] ; then
11
	if [ -z "${INSTANCE}" ] ; then
14
		echo "could not find a Maven instance! (${INSTANCES_DIRECTORY})" >&2
12
		echo "Could not find a Maven instance in ${INSTANCES_DIRECTORY}" >&2
15
		exit 1
13
		exit 1
16
	fi
14
	fi
17
15
18
	M2_HOME="`%%CAT%% "${INSTANCE}"`"
16
	MAVEN_HOME="$(%%CAT%% "${INSTANCE}")"
19
17
20
	if [ ! -d "${M2_HOME}" ] ; then
18
	if [ ! -d "${MAVEN_HOME}" ] ; then
21
		echo "not a directory: ${M2_HOME}" >&2
19
		echo "Not a directory: ${MAVEN_HOME}" >&2
22
		exit 2
20
		exit 2
23
	fi
21
	fi
24
fi
22
fi
25
23
26
export M2_HOME
24
exec "${MAVEN_HOME}/bin/${SCRIPT_NAME}" "$@"
27
exec "${M2_HOME}/bin/mvn" "$@"
(-)b/devel/maven-wrapper/pkg-descr (-2 / +2 lines)
Lines 1-7 Link Here
1
The maven-wrapper provides a convenient way to switch between several Maven
1
The maven-wrapper provides a convenient way to switch between several Maven
2
installations.
2
installations.
3
3
4
- By setting the M2_HOME environment variable the user can select the Maven
4
- By setting the MAVEN_HOME environment variable the user can select the Maven
5
  instance to use.
5
  instance to use.
6
- A default Maven instance is selected according to the files in
6
- A default Maven instance is selected according to the files in
7
  /usr/local/etc/maven/instances.d/
7
  /usr/local/etc/maven-wrapper/instances.d/
(-)b/devel/maven-wrapper/pkg-plist (-1 / +2 lines)
Lines 1-2 Link Here
1
bin/mvn
1
bin/mvn
2
@dir etc/maven-wrapper/instances.d
2
bin/mvnDebug
3
@dir %%ETCDIR%%/instances.d

Return to bug 265028