git: a70b25ff2f54 - main - devel/maven39: new port: version 3.9 of devel/maven

From: Koichiro Iwao <meta_at_FreeBSD.org>
Date: Wed, 06 Sep 2023 15:41:47 UTC
The branch main has been updated by meta:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a70b25ff2f5451019085b6cd68f7aa2c05749d52

commit a70b25ff2f5451019085b6cd68f7aa2c05749d52
Author:     Michael Zhilin <mizhka@FreeBSD.org>
AuthorDate: 2023-08-01 10:05:35 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-09-06 15:41:16 +0000

    devel/maven39: new port: version 3.9 of devel/maven
    
    java/eclipse requires Maven 3.9+ and actual version of devel/maven is 3.8.
    This patch adds devel/maven39 to manage this requirement.
    
    Changelog: https://maven.apache.org/docs/3.9.4/release-notes.html
    
    Co-authored-by: Michael Osipov <michaelo@apache.org>
    
    PR:             272863
---
 devel/Makefile          |  1 +
 devel/maven39/Makefile  | 57 +++++++++++++++++++++++++++++++++
 devel/maven39/distinfo  |  3 ++
 devel/maven39/pkg-descr |  3 ++
 devel/maven39/pkg-plist | 85 +++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 149 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 35e9db4fc350..ff70b93e60bb 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1573,6 +1573,7 @@
     SUBDIR += mate-common
     SUBDIR += maven
     SUBDIR += maven-wrapper
+    SUBDIR += maven39
     SUBDIR += maven363
     SUBDIR += mcpp
     SUBDIR += mdb
diff --git a/devel/maven39/Makefile b/devel/maven39/Makefile
new file mode 100644
index 000000000000..1d2f4f7d718e
--- /dev/null
+++ b/devel/maven39/Makefile
@@ -0,0 +1,57 @@
+PORTNAME=	maven
+DISTVERSION=	3.9.4
+CATEGORIES=	devel java
+MASTER_SITES=	APACHE/maven/maven-3/${DISTVERSION}/binaries
+PKGNAMESUFFIX=	${DISTVERSION:R:S/.//}
+DISTNAME=	apache-${PORTNAME}-${DISTVERSION}-bin
+
+MAINTAINER=	michaelo@apache.org
+COMMENT=	Java project management tool
+WWW=		https://maven.apache.org/
+
+LICENSE=	APACHE20
+
+RUN_DEPENDS=	mvn:devel/maven-wrapper
+
+USES=		cpe
+CPE_VENDOR=	apache
+CPE_PRODUCT=	maven
+USE_JAVA=	yes
+
+DATADIR=	${JAVASHAREDIR}/${INSTANCE_ID}
+NO_ARCH=	yes
+NO_BUILD=	yes
+WRKSRC=		${WRKDIR}/${DISTNAME:S/-bin//}
+PLIST_SUB=	PORTVERSION=${PORTVERSION} \
+	INSTANCE_ID=${INSTANCE_ID} \
+	INSTANCES_DIR=${INSTANCES_DIR}
+INSTANCE_ID=	${DISTNAME:S/-bin//:R}
+INSTANCES_DIR=	${LOCALBASE}/etc/maven-wrapper/instances.d
+
+post-extract:
+	${RM} -r ${WRKSRC}/lib/jansi-native ${WRKSRC}/bin/*.cmd
+	${ECHO_CMD} "${DATADIR}" > ${WRKDIR}/${INSTANCE_ID}
+
+post-patch:
+	@${REINPLACE_CMD} \
+		-e '37,40d;55,73d;76,77d' \
+		-e 's|/usr/local|${LOCALBASE}|g' \
+		-E -e 's|^MAVEN_HOME=.+$$|MAVEN_HOME="${DATADIR}"|g' ${WRKSRC}/bin/mvn
+	@${FIND} ${WRKSRC} -name '*.bak' -delete -o -name '*.orig' -delete
+
+do-install:
+	@cd ${WRKSRC} && ${FIND} . -type d -exec ${MKDIR} \
+		${STAGEDIR}${DATADIR}/{} \;
+	cd ${WRKSRC} && ${FIND} . -type f -not -path "\./bin/" \
+		-exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/{} \;
+	@cd ${STAGEDIR}${DATADIR} && ${FIND} conf -type f -exec ${CP} \
+		'{}' '{}'.sample \;
+	${INSTALL_DATA} ${WRKSRC}/bin/m2.conf ${STAGEDIR}${DATADIR}/bin/m2.conf.sample
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/mvn ${STAGEDIR}${DATADIR}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/mvnDebug ${STAGEDIR}${DATADIR}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/mvnyjp ${STAGEDIR}${DATADIR}/bin
+	@${MKDIR} ${STAGEDIR}${INSTANCES_DIR}
+	${INSTALL_DATA} ${WRKDIR}/${INSTANCE_ID} \
+		${STAGEDIR}${INSTANCES_DIR}
+
+.include <bsd.port.mk>
diff --git a/devel/maven39/distinfo b/devel/maven39/distinfo
new file mode 100644
index 000000000000..addba1ae8821
--- /dev/null
+++ b/devel/maven39/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1693510926
+SHA256 (apache-maven-3.9.4-bin.tar.gz) = ff66b70c830a38d331d44f6c25a37b582471def9a161c93902bac7bea3098319
+SIZE (apache-maven-3.9.4-bin.tar.gz) = 9336368
diff --git a/devel/maven39/pkg-descr b/devel/maven39/pkg-descr
new file mode 100644
index 000000000000..996ec6af025f
--- /dev/null
+++ b/devel/maven39/pkg-descr
@@ -0,0 +1,3 @@
+Apache Maven is a software project management and comprehension tool. Based on
+the concept of a project object model (POM), Maven can manage a project's
+build, reporting and documentation from a central piece of information.
diff --git a/devel/maven39/pkg-plist b/devel/maven39/pkg-plist
new file mode 100644
index 000000000000..7e5337ef1229
--- /dev/null
+++ b/devel/maven39/pkg-plist
@@ -0,0 +1,85 @@
+%%INSTANCES_DIR%%/%%INSTANCE_ID%%
+%%DATADIR%%/LICENSE
+%%DATADIR%%/NOTICE
+%%DATADIR%%/README.txt
+@sample %%DATADIR%%/bin/m2.conf.sample
+%%DATADIR%%/bin/mvn
+%%DATADIR%%/bin/mvnDebug
+%%DATADIR%%/bin/mvnyjp
+%%DATADIR%%/boot/plexus-classworlds-2.7.0.jar
+%%DATADIR%%/boot/plexus-classworlds.license
+@sample %%DATADIR%%/conf/logging/simplelogger.properties.sample
+@sample %%DATADIR%%/conf/settings.xml.sample
+@sample %%DATADIR%%/conf/toolchains.xml.sample
+%%DATADIR%%/lib/aopalliance-1.0.jar
+%%DATADIR%%/lib/aopalliance.license
+%%DATADIR%%/lib/commons-cli-1.5.0.jar
+%%DATADIR%%/lib/commons-cli.license
+%%DATADIR%%/lib/commons-codec-1.11.jar
+%%DATADIR%%/lib/commons-codec.license
+%%DATADIR%%/lib/commons-lang3-3.12.0.jar
+%%DATADIR%%/lib/commons-lang3.license
+%%DATADIR%%/lib/failureaccess-1.0.1.jar
+%%DATADIR%%/lib/failureaccess.license
+%%DATADIR%%/lib/guava-32.0.1-jre.jar
+%%DATADIR%%/lib/guava.license
+%%DATADIR%%/lib/guice-5.1.0.jar
+%%DATADIR%%/lib/guice.license
+%%DATADIR%%/lib/httpclient-4.5.14.jar
+%%DATADIR%%/lib/httpclient.license
+%%DATADIR%%/lib/httpcore-4.4.16.jar
+%%DATADIR%%/lib/httpcore.license
+%%DATADIR%%/lib/jansi-2.4.0.jar
+%%DATADIR%%/lib/jansi.license
+%%DATADIR%%/lib/javax.annotation-api-1.3.2.jar
+%%DATADIR%%/lib/javax.annotation-api.license
+%%DATADIR%%/lib/javax.inject-1.jar
+%%DATADIR%%/lib/javax.inject.license
+%%DATADIR%%/lib/jcl-over-slf4j-1.7.36.jar
+%%DATADIR%%/lib/jcl-over-slf4j.license
+%%DATADIR%%/lib/maven-artifact-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-builder-support-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-compat-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-core-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-embedder-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-model-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-model-builder-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-plugin-api-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-repository-metadata-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-resolver-api-1.9.14.jar
+%%DATADIR%%/lib/maven-resolver-connector-basic-1.9.14.jar
+%%DATADIR%%/lib/maven-resolver-impl-1.9.14.jar
+%%DATADIR%%/lib/maven-resolver-named-locks-1.9.14.jar
+%%DATADIR%%/lib/maven-resolver-provider-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-resolver-spi-1.9.14.jar
+%%DATADIR%%/lib/maven-resolver-transport-file-1.9.14.jar
+%%DATADIR%%/lib/maven-resolver-transport-http-1.9.14.jar
+%%DATADIR%%/lib/maven-resolver-transport-wagon-1.9.14.jar
+%%DATADIR%%/lib/maven-resolver-util-1.9.14.jar
+%%DATADIR%%/lib/maven-settings-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-settings-builder-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/maven-shared-utils-3.3.4.jar
+%%DATADIR%%/lib/maven-slf4j-provider-%%PORTVERSION%%.jar
+%%DATADIR%%/lib/org.eclipse.sisu.inject-0.3.5.jar
+%%DATADIR%%/lib/org.eclipse.sisu.inject.license
+%%DATADIR%%/lib/org.eclipse.sisu.plexus-0.3.5.jar
+%%DATADIR%%/lib/org.eclipse.sisu.plexus.license
+%%DATADIR%%/lib/plexus-cipher-2.0.jar
+%%DATADIR%%/lib/plexus-cipher.license
+%%DATADIR%%/lib/plexus-component-annotations-2.1.0.jar
+%%DATADIR%%/lib/plexus-component-annotations.license
+%%DATADIR%%/lib/plexus-interpolation-1.26.jar
+%%DATADIR%%/lib/plexus-interpolation.license
+%%DATADIR%%/lib/plexus-sec-dispatcher-2.0.jar
+%%DATADIR%%/lib/plexus-sec-dispatcher.license
+%%DATADIR%%/lib/plexus-utils-3.5.1.jar
+%%DATADIR%%/lib/plexus-utils.license
+%%DATADIR%%/lib/slf4j-api-1.7.36.jar
+%%DATADIR%%/lib/slf4j-api.license
+%%DATADIR%%/lib/wagon-file-3.5.3.jar
+%%DATADIR%%/lib/wagon-http-3.5.3.jar
+%%DATADIR%%/lib/wagon-http-shared-3.5.3.jar
+%%DATADIR%%/lib/wagon-provider-api-3.5.3.jar
+%%DATADIR%%/lib/ext/README.txt
+%%DATADIR%%/lib/ext/hazelcast/README.txt
+%%DATADIR%%/lib/ext/redisson/README.txt