www/glassfish: 3.1.2.2 -> 4.1

Changes since 3.1.2.2:
https://glassfish.java.net/docs/4.0/release-notes.pdf
https://glassfish.java.net/docs/4.1/release-notes.pdf

PR:		194097
Submitted by:	Enrico M. Crisostomo <enrico.m.crisostomo@gmail.com>
Approved by:	cjr@cruwe.de (maintainer)
This commit is contained in:
Kurt Jaeger 2014-10-15 17:25:25 +00:00
parent f14e7c0cf1
commit 59571c7bbc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370937
4 changed files with 1061 additions and 859 deletions

View file

@ -2,29 +2,30 @@
# $FreeBSD$
PORTNAME= glassfish
PORTVERSION= 3.1.2.2
PORTVERSION= 4.1
CATEGORIES= www java
MASTER_SITES= http://download.java.net/glassfish/${PORTVERSION}/release/
MASTER_SITES= http://dlc.sun.com.edgesuite.net/glassfish/${PORTVERSION}/release/
MAINTAINER= cjr@cruwe.de
COMMENT= Reference implementation of the Java EE application server
USES= zip
USE_JAVA= yes
JAVA_VERSION= 1.6+
JAVA_VERSION= 1.7+
NO_BUILD= yes
WRKSRC= ${WRKDIR}/glassfish3
WRKSRC= ${WRKDIR}/glassfish4
DATADIR= ${PREFIX}/${PORTNAME}-${PORTVERSION}
PLIST_SUB= GLASSFISHVERSION=${PORTVERSION} \
PORTVERSION=${PORTVERSION}
SUB_LIST= GLASSFISHVERSION=${PORTVERSION}
# Since we USE_JAVA, we propagate the received JAVA_HOME variable to the
# template files, since it is used by the rc script.
SUB_LIST= GLASSFISHVERSION=${PORTVERSION} \
JAVA_HOME=${JAVA_HOME}
DOWNLOAD_URL= http://download.java.net/glassfish/${PORTVERSION}/release/
DOWNLOAD_URL= http://dlc.sun.com.edgesuite.net/glassfish/${PORTVERSION}/release/
USE_RC_SUBR= glassfish
GLASSFISH_BIN_FILES= appclient asadmin asupgrade capture-schema jspc package-appclient schemagen startserv stopserv wscompile wsdeploy wsgen wsimport xjc
GLASSFISH_BIN_FILES= appclient asadmin capture-schema jspc package-appclient schemagen startserv stopserv wscompile wsdeploy wsgen wsimport xjc
.include <bsd.port.pre.mk>

View file

@ -1,2 +1,2 @@
SHA256 (glassfish-3.1.2.2.zip) = 53b3a5345599c60da78076ac60ea8213b3eb5994e2b25ec67a1418db38b0ab9c
SIZE (glassfish-3.1.2.2.zip) = 87053323
SHA256 (glassfish-4.1.zip) = 3edc5fc72b8be241a53eae83c22f274479d70e15bdfba7ba2302da5260f23e9d
SIZE (glassfish-4.1.zip) = 107743725

View file

@ -9,8 +9,18 @@
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# glassfish_enable (bool): Set to NO by default.
# Set it to YES to enable doormand.
# glassfish_enable (bool):
# Set to NO by default.
# Set it to YES to enable glassfish.
#
# glassfish_java_home (string):
# Used to set JAVA_HOME (optional).
#
# glassfish_java_opts (string):
# Used to set JAVA_OPTS (optional).
#
# glassfish_domain_name (string):
# Set the name of the Glassfish domain to start (default: domain1).
. /etc/rc.subr
@ -20,10 +30,51 @@ rcvar=glassfish_enable
load_rc_config $name
: ${glassfish_enable:=NO}
: ${glassfish_java_home=""}
: ${glassfish_java_opts=""}
: ${glassfish_domain_name="domain1"}
: ${glassfish_home="%%DATADIR%%/glassfish"}
export PATH=${PATH}:%%LOCALBASE%%/bin
procname="${glassfish_java_home}/bin/java"
start_cmd="%%PREFIX%%/glassfish-%%GLASSFISHVERSION%%/bin/asadmin start-domain"
stop_cmd="%%PREFIX%%/glassfish-%%GLASSFISHVERSION%%/bin/asadmin stop-domain"
# Since we receive the JAVA_HOME variable by default from the Java package
# we depend on, we override JAVA_HOME only if the user overrid it.
if [ ! -z ${glassfish_java_home} ] ; then
export JAVA_HOME=${glassfish_java_home}
else
export JAVA_HOME=%%JAVA_HOME%%
fi
export PATH=${JAVA_HOME}/bin:${PATH}
export JAVA_OPTS=${glassfish_java_opts}
start_precmd="glassfish_prestart"
start_cmd="${glassfish_home}/bin/asadmin start-domain ${glassfish_domain_name}"
stop_cmd="${glassfish_home}/bin/asadmin stop-domain ${glassfish_domain_name}"
status_cmd="glassfish_status"
glassfish_prestart()
{
if [ -z ${glassfish_domain_name} ] ; then
warn "Glassfish domain name cannot be empty, Glassfish will NOT start."
return 1
fi
}
glassfish_status()
{
# The output of list-domains -l in glassfish 4.1 is the following:
#
# DOMAIN ADMIN_HOST ADMIN_PORT RUNNING RESTART_REQUIRED
# domain1 localhost 4848 true false
IS_DOMAIN_RUNNING=$(${glassfish_home}/bin/asadmin list-domains -l | grep "^${glassfish_domain_name}" | awk '{ print $4; }')
if checkyesno IS_DOMAIN_RUNNING ; then
echo Glassfish is running.
return 0
else
echo Glassfish is not running.
return 1
fi
}
run_rc_command "$1"

File diff suppressed because it is too large Load diff