aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/maven/Makefile7
-rw-r--r--devel/maven/files/patch-maven-home21
-rw-r--r--devel/maven/pkg-message6
3 files changed, 25 insertions, 9 deletions
diff --git a/devel/maven/Makefile b/devel/maven/Makefile
index 49c7d0e6e9f8..b0d3cfe9cd9c 100644
--- a/devel/maven/Makefile
+++ b/devel/maven/Makefile
@@ -14,13 +14,18 @@ MASTER_SITE_SUBDIR= ${PORTNAME}/binaries
MAINTAINER= jbq@caraldi.com
COMMENT= Java project management and project comprehension tool
+RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper
+
USE_BZIP2= yes
USE_JAVA= yes
JAVA_VERSION= 1.3+
NO_BUILD= yes
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
PKGMESSAGE= ${WRKDIR}/pkg-message
-SUBSTITUTIONS= -e 's,%%DATADIR%%,${DATADIR},g'
+SUBSTITUTIONS= -e 's,%%DATADIR%%,${DATADIR},g' \
+ -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
+ -e 's,%%GREP%%,${GREP},g' \
+ -e 's,%%CUT%%,${CUT},g'
REINPLACE_FILES= ${WRKSRC}/bin/maven
post-configure:
diff --git a/devel/maven/files/patch-maven-home b/devel/maven/files/patch-maven-home
index d57e7cdbcd9e..c8e1eb5b2d1a 100644
--- a/devel/maven/files/patch-maven-home
+++ b/devel/maven/files/patch-maven-home
@@ -1,10 +1,25 @@
+$FreeBSD$
+
+. Set default FreeBSD values for MAVEN_HOME and JAVA_HOME
+. Use 'exec' to launch the JVM
+
--- bin/maven.orig Tue Dec 7 12:13:46 2004
-+++ bin/maven Sat Apr 1 00:07:23 2006
-@@ -19,6 +19,7 @@
++++ bin/maven Mon Jun 19 17:31:50 2006
+@@ -19,6 +19,8 @@
# reserved.
FOREHEAD_VERSION=1.0-beta-5
-+MAVEN_HOME=%%DATADIR%%
++: ${MAVEN_HOME="%%DATADIR%%"}
++: ${JAVA_HOME="`JAVAVM_DRYRUN=yes %%LOCALBASE%%/bin/java | %%GREP%% '^JAVA_HOME' | %%CUT%% -d= -f2`"}
if [ -z "$MAVEN_OPTS" ] ; then
MAVEN_OPTS="-Xmx256m"
+@@ -150,7 +153,7 @@
+ MAVEN_OPTS="$MAVEN_OPTS -Dmaven.home.local=${MAVEN_HOME_LOCAL}"
+ fi
+
+-"$JAVACMD" \
++exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \
+ -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl \
diff --git a/devel/maven/pkg-message b/devel/maven/pkg-message
index 6fc376fecdd4..052d46356652 100644
--- a/devel/maven/pkg-message
+++ b/devel/maven/pkg-message
@@ -1,9 +1,5 @@
-To work with Maven you need to set the following environment variable:
- * JAVA_HOME
- Set it to the base directory of your java installation.
-
-Then, you should initialize your repository with:
+You may initialize your repository with:
%%DATADIR%%/bin/install_repo.sh ~/.maven/repository
If you are behind a proxy, create a ~/.mavenrc file with something like: