diff options
authorJason Helfman <jgh@FreeBSD.org>2014-01-24 17:03:57 +0000
committerJason Helfman <jgh@FreeBSD.org>2014-01-24 17:03:57 +0000
commit0ce65d8efb4aa43d970dc9603d8e76b55ec65b0c (patch)
parent963fea08004db5c7fa445ddc67970ef46dda9cef (diff)
- document proper handling of .war file in porters handbook
Approved by: wblock (mentor) Reviewed by: bcr, remko (mentors)
Notes: svn path=/head/; revision=43639
1 files changed, 27 insertions, 0 deletions
diff --git a/en_US.ISO8859-1/books/porters-handbook/book.xml b/en_US.ISO8859-1/books/porters-handbook/book.xml
index 9eac572195..c622c37cad 100644
--- a/en_US.ISO8859-1/books/porters-handbook/book.xml
+++ b/en_US.ISO8859-1/books/porters-handbook/book.xml
@@ -7547,6 +7547,33 @@ USE_QT4= moc_build qmake_build rcc_build uic_build</programlisting>
already installed ones (from
+ <para>When porting a &java; application that requires an
+ application server such as
+ <package role="port">www/tomcat7</package> to run the
+ service, it is quite common for a vendor to distribute a
+ <filename>.war</filename> file. A <filename>.war</filename>
+ file is a Web application ARchive and is extracted when called
+ by the application. Avoid adding a <filename>.war</filename>
+ file to the <filename>pkg-plist</filename>.
+ It is not considered best practice. An application server
+ will expand the <filename>war</filename> archive, but not
+ clean it up properly if the port is removed. A more
+ desirable way of working with this file is to extract the
+ archive, then install the files, and lastly add these files
+ to <filename>pkg-plist</filename>.</para>
+ <programlisting>TOMCATDIR= ${LOCALBASE}/apache-tomcat-7.0
+WEBAPPDIR= myapplication
+ @${TAR} xf ${WRKDIR}/myapplication.war -C ${WRKDIR}/${PORTDIRNAME}
+ cd ${WRKDIR} &amp;&amp; \
+ @cd ${WRKDIR}/${PORTDIRNAME} &amp;&amp; ${COPYTREE_SHARE} \* ${WEBAPPDIR}/${PORTDIRNAME}</programlisting>
<para>Regardless of the type of your port (library or
application), the additional documentation should be
installed in the