From 093fb434b19ed2d00c665f6fe7c001ba85ef9f04 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Tue, 20 Oct 2015 23:31:16 +0100 Subject: [PATCH] Create a port for Maven 3.3.3 --- devel/maven33/Makefile | 44 ++++++++++++++++++ devel/maven33/distinfo | 2 + devel/maven33/files/mvn.sh.in | 33 +++++++++++++ devel/maven33/pkg-descr | 5 ++ devel/maven33/pkg-plist | 88 +++++++++++++++++++++++++++++++++++ 5 files changed, 172 insertions(+) create mode 100644 devel/maven33/Makefile create mode 100644 devel/maven33/distinfo create mode 100644 devel/maven33/files/mvn.sh.in create mode 100644 devel/maven33/pkg-descr create mode 100644 devel/maven33/pkg-plist diff --git a/devel/maven33/Makefile b/devel/maven33/Makefile new file mode 100644 index 0000000000000..f96ad5451b16a --- /dev/null +++ b/devel/maven33/Makefile @@ -0,0 +1,44 @@ +# Created by: Herve Quiroz +# $FreeBSD$ + +PORTNAME= maven33 +DISTVERSION= 3.3.3 +PORTREVISION= 1 +CATEGORIES= devel java +MASTER_SITES= APACHE/maven/maven-3/${DISTVERSION}/binaries +DISTNAME= apache-maven-${DISTVERSION}-bin + +MAINTAINER= mnd999@gmail.com +COMMENT= Java project management tool, 3.3.x branch + +LICENSE= APACHE20 + +RUN_DEPENDS= mvn:${PORTSDIR}/devel/maven-wrapper + +USES= cpe +CPE_PRODUCT= maven +CPE_VENDOR= apache + +USE_JAVA= yes +JAVA_VERSION= 1.7+ +NO_BUILD= yes +DATADIR= ${JAVASHAREDIR}/${PORTNAME} +WRKSRC= ${WRKDIR}/apache-maven-${DISTVERSION} +SUB_FILES= mvn.sh +SUB_LIST= CLASSWORLDS_JAR=plexus-classworlds-2.5.2.jar +INSTANCE_FILE= 030101-${PORTNAME}-${PORTVERSION} +INSTANCES_DIR= etc/maven-wrapper/instances.d/ + +post-extract: + ${RM} -f ${WRKSRC}/bin/*.bat + ${ECHO_CMD} "${DATADIR}" > ${WRKSRC}/${INSTANCE_FILE} + +do-install: + cd ${WRKSRC} && ${FIND} . -type d -exec ${MKDIR} ${STAGEDIR}${DATADIR}/{} \; + cd ${WRKSRC} && ${FIND} . -type f -not -path "\./bin/" -exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/{} \; + ${INSTALL_DATA} ${WRKSRC}/bin/m2.conf ${STAGEDIR}${DATADIR}/bin/ + ${INSTALL_SCRIPT} ${WRKDIR}/mvn.sh ${STAGEDIR}${DATADIR}/bin/mvn + ${MKDIR} ${STAGEDIR}${PREFIX}/${INSTANCES_DIR} + ${INSTALL_DATA} ${WRKSRC}/${INSTANCE_FILE} ${STAGEDIR}${PREFIX}/${INSTANCES_DIR} + +.include diff --git a/devel/maven33/distinfo b/devel/maven33/distinfo new file mode 100644 index 0000000000000..0d2e9da47e67c --- /dev/null +++ b/devel/maven33/distinfo @@ -0,0 +1,2 @@ +SHA256 (apache-maven-3.3.3-bin.tar.gz) = 3a8dc4a12ab9f3607a1a2097bbab0150c947ad6719d8f1bb6d5b47d0fb0c4779 +SIZE (apache-maven-3.3.3-bin.tar.gz) = 8042383 diff --git a/devel/maven33/files/mvn.sh.in b/devel/maven33/files/mvn.sh.in new file mode 100644 index 0000000000000..d36c214468d0b --- /dev/null +++ b/devel/maven33/files/mvn.sh.in @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ + +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}" +} + +if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc +fi + +if [ -f "${HOME}/.mavenrc" ] ; then + . "${HOME}/.mavenrc" +fi + +M2_HOME=${M2_HOME:-"%%DATADIR%%"} +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)} + +JAVA_VERSION="%%JAVA_VERSION%%" exec "%%LOCALBASE%%/bin/java" $MAVEN_OPTS \ + -classpath "${M2_HOME}/boot/%%CLASSWORLDS_JAR%%" \ + "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + "-Dmaven.home=${M2_HOME}" org.codehaus.classworlds.Launcher "$@" diff --git a/devel/maven33/pkg-descr b/devel/maven33/pkg-descr new file mode 100644 index 0000000000000..65671ec5f41d9 --- /dev/null +++ b/devel/maven33/pkg-descr @@ -0,0 +1,5 @@ +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. + +WWW: http://maven.apache.org/ diff --git a/devel/maven33/pkg-plist b/devel/maven33/pkg-plist new file mode 100644 index 0000000000000..342849795fe5c --- /dev/null +++ b/devel/maven33/pkg-plist @@ -0,0 +1,88 @@ +etc/maven-wrapper/instances.d/030101-maven33-3.3.3 +%%DATADIR%%/030101-maven33-3.3.3 +%%DATADIR%%/LICENSE +%%DATADIR%%/NOTICE +%%DATADIR%%/README.txt +%%DATADIR%%/bin/m2.conf +%%DATADIR%%/bin/mvn +%%DATADIR%%/bin/mvn.cmd +%%DATADIR%%/bin/mvnDebug +%%DATADIR%%/bin/mvnDebug.cmd +%%DATADIR%%/bin/mvnyjp +%%DATADIR%%/boot/plexus-classworlds-2.5.2.jar +%%DATADIR%%/conf/logging/simplelogger.properties +%%DATADIR%%/conf/settings.xml +%%DATADIR%%/conf/toolchains.xml +%%DATADIR%%/lib/aether-api-1.0.2.v20150114.jar +%%DATADIR%%/lib/aether-api.license +%%DATADIR%%/lib/aether-connector-basic-1.0.2.v20150114.jar +%%DATADIR%%/lib/aether-connector-basic.license +%%DATADIR%%/lib/aether-impl-1.0.2.v20150114.jar +%%DATADIR%%/lib/aether-impl.license +%%DATADIR%%/lib/aether-spi-1.0.2.v20150114.jar +%%DATADIR%%/lib/aether-spi.license +%%DATADIR%%/lib/aether-transport-wagon-1.0.2.v20150114.jar +%%DATADIR%%/lib/aether-transport-wagon.license +%%DATADIR%%/lib/aether-util-1.0.2.v20150114.jar +%%DATADIR%%/lib/aether-util.license +%%DATADIR%%/lib/aopalliance-1.0.jar +%%DATADIR%%/lib/cdi-api-1.0.jar +%%DATADIR%%/lib/cdi-api.license +%%DATADIR%%/lib/commons-cli-1.2.jar +%%DATADIR%%/lib/commons-io-2.2.jar +%%DATADIR%%/lib/commons-lang-2.6.jar +%%DATADIR%%/lib/ext/README.txt +%%DATADIR%%/lib/guava-18.0.jar +%%DATADIR%%/lib/javax.inject-1.jar +%%DATADIR%%/lib/jsoup-1.7.2.jar +%%DATADIR%%/lib/jsoup.license +%%DATADIR%%/lib/jsr250-api-1.0.jar +%%DATADIR%%/lib/jsr250-api.license +%%DATADIR%%/lib/maven-aether-provider-3.3.3.jar +%%DATADIR%%/lib/maven-aether-provider.license +%%DATADIR%%/lib/maven-artifact-3.3.3.jar +%%DATADIR%%/lib/maven-artifact.license +%%DATADIR%%/lib/maven-builder-support-3.3.3.jar +%%DATADIR%%/lib/maven-builder-support.license +%%DATADIR%%/lib/maven-compat-3.3.3.jar +%%DATADIR%%/lib/maven-compat.license +%%DATADIR%%/lib/maven-core-3.3.3.jar +%%DATADIR%%/lib/maven-core.license +%%DATADIR%%/lib/maven-embedder-3.3.3.jar +%%DATADIR%%/lib/maven-embedder.license +%%DATADIR%%/lib/maven-model-3.3.3.jar +%%DATADIR%%/lib/maven-model-builder-3.3.3.jar +%%DATADIR%%/lib/maven-model-builder.license +%%DATADIR%%/lib/maven-model.license +%%DATADIR%%/lib/maven-plugin-api-3.3.3.jar +%%DATADIR%%/lib/maven-plugin-api.license +%%DATADIR%%/lib/maven-repository-metadata-3.3.3.jar +%%DATADIR%%/lib/maven-repository-metadata.license +%%DATADIR%%/lib/maven-settings-3.3.3.jar +%%DATADIR%%/lib/maven-settings-builder-3.3.3.jar +%%DATADIR%%/lib/maven-settings-builder.license +%%DATADIR%%/lib/maven-settings.license +%%DATADIR%%/lib/org.eclipse.sisu.inject-0.3.0.jar +%%DATADIR%%/lib/org.eclipse.sisu.inject.license +%%DATADIR%%/lib/org.eclipse.sisu.plexus-0.3.0.jar +%%DATADIR%%/lib/org.eclipse.sisu.plexus.license +%%DATADIR%%/lib/plexus-cipher-1.7.jar +%%DATADIR%%/lib/plexus-cipher.license +%%DATADIR%%/lib/plexus-component-annotations-1.5.5.jar +%%DATADIR%%/lib/plexus-interpolation-1.21.jar +%%DATADIR%%/lib/plexus-sec-dispatcher-1.3.jar +%%DATADIR%%/lib/plexus-sec-dispatcher.license +%%DATADIR%%/lib/plexus-utils-3.0.20.jar +%%DATADIR%%/lib/sisu-guice-3.2.5-no_aop.jar +%%DATADIR%%/lib/slf4j-api-1.7.5.jar +%%DATADIR%%/lib/slf4j-api.license +%%DATADIR%%/lib/slf4j-simple-1.7.5.jar +%%DATADIR%%/lib/slf4j-simple.license +%%DATADIR%%/lib/wagon-file-2.9.jar +%%DATADIR%%/lib/wagon-file.license +%%DATADIR%%/lib/wagon-http-2.9-shaded.jar +%%DATADIR%%/lib/wagon-http-shared-2.9.jar +%%DATADIR%%/lib/wagon-http-shared.license +%%DATADIR%%/lib/wagon-http.license +%%DATADIR%%/lib/wagon-provider-api-2.9.jar +%%DATADIR%%/lib/wagon-provider-api.license