Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a port for Maven 3.3.3 #37

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions devel/maven33/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Created by: Herve Quiroz <hq@FreeBSD.org>
# $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 <bsd.port.mk>
2 changes: 2 additions & 0 deletions devel/maven33/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SHA256 (apache-maven-3.3.3-bin.tar.gz) = 3a8dc4a12ab9f3607a1a2097bbab0150c947ad6719d8f1bb6d5b47d0fb0c4779
SIZE (apache-maven-3.3.3-bin.tar.gz) = 8042383
33 changes: 33 additions & 0 deletions devel/maven33/files/mvn.sh.in
Original file line number Diff line number Diff line change
@@ -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 "$@"
5 changes: 5 additions & 0 deletions devel/maven33/pkg-descr
Original file line number Diff line number Diff line change
@@ -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/
88 changes: 88 additions & 0 deletions devel/maven33/pkg-plist
Original file line number Diff line number Diff line change
@@ -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