mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
- Use new features from javavmwrapper 2.2 to set a default value for JAVA_HOME
- Set a default value for MAVEN_HOME only when not already defined - Update pkg-message to reflect these changes PR: 96659 Submitted by: hq Approved by: maintainer
This commit is contained in:
parent
dce18e1bf4
commit
be3bdc1dec
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=166329
3 changed files with 25 additions and 9 deletions
|
@ -14,13 +14,18 @@ MASTER_SITE_SUBDIR= ${PORTNAME}/binaries
|
||||||
MAINTAINER= jbq@caraldi.com
|
MAINTAINER= jbq@caraldi.com
|
||||||
COMMENT= Java project management and project comprehension tool
|
COMMENT= Java project management and project comprehension tool
|
||||||
|
|
||||||
|
RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper
|
||||||
|
|
||||||
USE_BZIP2= yes
|
USE_BZIP2= yes
|
||||||
USE_JAVA= yes
|
USE_JAVA= yes
|
||||||
JAVA_VERSION= 1.3+
|
JAVA_VERSION= 1.3+
|
||||||
NO_BUILD= yes
|
NO_BUILD= yes
|
||||||
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
|
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
|
||||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
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
|
REINPLACE_FILES= ${WRKSRC}/bin/maven
|
||||||
|
|
||||||
post-configure:
|
post-configure:
|
||||||
|
|
|
@ -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.orig Tue Dec 7 12:13:46 2004
|
||||||
+++ bin/maven Sat Apr 1 00:07:23 2006
|
+++ bin/maven Mon Jun 19 17:31:50 2006
|
||||||
@@ -19,6 +19,7 @@
|
@@ -19,6 +19,8 @@
|
||||||
# reserved.
|
# reserved.
|
||||||
|
|
||||||
FOREHEAD_VERSION=1.0-beta-5
|
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
|
if [ -z "$MAVEN_OPTS" ] ; then
|
||||||
MAVEN_OPTS="-Xmx256m"
|
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 \
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
|
|
||||||
To work with Maven you need to set the following environment variable:
|
You may initialize your repository with:
|
||||||
* JAVA_HOME
|
|
||||||
Set it to the base directory of your java installation.
|
|
||||||
|
|
||||||
Then, you should initialize your repository with:
|
|
||||||
%%DATADIR%%/bin/install_repo.sh ~/.maven/repository
|
%%DATADIR%%/bin/install_repo.sh ~/.maven/repository
|
||||||
|
|
||||||
If you are behind a proxy, create a ~/.mavenrc file with something like:
|
If you are behind a proxy, create a ~/.mavenrc file with something like:
|
||||||
|
|
Loading…
Add table
Reference in a new issue