switched to tomcat 8.5 (should be developed this way for maximum compatibility)

Sun, 29 Oct 2017 13:35:43 +0100

author
mike@uapl02
date
Sun, 29 Oct 2017 13:35:43 +0100
changeset 3
acf54d3fa1d1
parent 2
fcb452578142
child 4
a89240b61819

switched to tomcat 8.5 (should be developed this way for maximum compatibility)

.hgignore file | annotate | diff | comparison | revisions
nbproject/ant-deploy.xml file | annotate | diff | comparison | revisions
nbproject/genfiles.properties file | annotate | diff | comparison | revisions
nbproject/project.properties file | annotate | diff | comparison | revisions
nbproject/project.xml file | annotate | diff | comparison | revisions
web/META-INF/context.xml file | annotate | diff | comparison | revisions
     1.1 --- a/.hgignore	Thu Apr 06 17:44:17 2017 +0200
     1.2 +++ b/.hgignore	Sun Oct 29 13:35:43 2017 +0100
     1.3 @@ -1,3 +1,8 @@
     1.4  syntax: regexp
     1.5  ^nbproject/private/
     1.6  ^build/
     1.7 +\.orig\..*$
     1.8 +\.orig$
     1.9 +\.chg\..*$
    1.10 +\.rej$
    1.11 +\.conflict\~$
     2.1 --- a/nbproject/ant-deploy.xml	Thu Apr 06 17:44:17 2017 +0200
     2.2 +++ b/nbproject/ant-deploy.xml	Sun Oct 29 13:35:43 2017 +0100
     2.3 @@ -1,111 +1,76 @@
     2.4  <?xml version="1.0" encoding="UTF-8"?>
     2.5 +<!--
     2.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     2.7 +
     2.8 +Copyright (c) 2006, 2016 Oracle and/or its affiliates. All rights reserved.
     2.9 +
    2.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    2.11 +Other names may be trademarks of their respective owners.
    2.12 +
    2.13 +The contents of this file are subject to the terms of either the GNU
    2.14 +General Public License Version 2 only ("GPL") or the Common
    2.15 +Development and Distribution License("CDDL") (collectively, the
    2.16 +"License"). You may not use this file except in compliance with the
    2.17 +License. You can obtain a copy of the License at
    2.18 +http://www.netbeans.org/cddl-gplv2.html
    2.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    2.20 +specific language governing permissions and limitations under the
    2.21 +License.  When distributing the software, include this License Header
    2.22 +Notice in each file and include the License file at
    2.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    2.24 +particular file as subject to the "Classpath" exception as provided
    2.25 +by Oracle in the GPL Version 2 section of the License file that
    2.26 +accompanied this code. If applicable, add the following below the
    2.27 +License Header, with the fields enclosed by brackets [] replaced by
    2.28 +your own identifying information:
    2.29 +"Portions Copyrighted [year] [name of copyright owner]"
    2.30 +
    2.31 +If you wish your version of this file to be governed by only the CDDL
    2.32 +or only the GPL Version 2, indicate your decision by adding
    2.33 +"[Contributor] elects to include this software in this distribution
    2.34 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    2.35 +single choice of license, a recipient has the option to distribute
    2.36 +your version of this file under either the CDDL, the GPL Version 2 or
    2.37 +to extend the choice of license to its licensees as provided above.
    2.38 +However, if you add GPL Version 2 code and therefore, elected the GPL
    2.39 +Version 2 license, then the option applies only if the new code is
    2.40 +made subject to such option by the copyright holder.
    2.41 +
    2.42 +Contributor(s):
    2.43 +-->
    2.44  <project default="-deploy-ant" basedir=".">
    2.45 -    <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
    2.46 -        <property file="${deploy.ant.properties.file}" />
    2.47 -        <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
    2.48 -        <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
    2.49 -        <available file="${deploy.ant.resource.dir}" property="has.setup"/>
    2.50 -        <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
    2.51 -        <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
    2.52 +    <target name="-init" if="deploy.ant.enabled">
    2.53 +        <property file="${deploy.ant.properties.file}"/>
    2.54 +        <tempfile property="temp.module.folder" prefix="tomcat" destdir="${java.io.tmpdir}"/>
    2.55 +        <unwar src="${deploy.ant.archive}" dest="${temp.module.folder}">
    2.56 +            <patternset includes="META-INF/context.xml"/>
    2.57 +        </unwar>
    2.58 +        <xmlproperty file="${temp.module.folder}/META-INF/context.xml"/>
    2.59 +        <delete dir="${temp.module.folder}"/>
    2.60      </target>
    2.61 -    
    2.62 -    <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
    2.63 -        <tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
    2.64 -        <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
    2.65 -        <!-- The doctype triggers resolution which can fail -->
    2.66 -        <replace file="${temp.sun.web}">
    2.67 -            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
    2.68 -            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
    2.69 -        </replace>
    2.70 -        <replace file="${temp.sun.web}">
    2.71 -            <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
    2.72 -            <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
    2.73 -        </replace>
    2.74 -        <xmlproperty file="${temp.sun.web}" validate="false">
    2.75 -        </xmlproperty>    
    2.76 -        <delete file="${temp.sun.web}"/>
    2.77 -        <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
    2.78 -            <isset property="sun-web-app.context-root"/>
    2.79 -        </condition>
    2.80 -        <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
    2.81 -            <isset property="sun-web-app.context-root"/>
    2.82 -        </condition>
    2.83 +    <target name="-check-credentials" if="deploy.ant.enabled" depends="-init">
    2.84 +        <fail message="Tomcat password has to be passed as tomcat.password property.">
    2.85 +            <condition>
    2.86 +                <not>
    2.87 +                    <isset property="tomcat.password"/>
    2.88 +                </not>
    2.89 +            </condition>
    2.90 +        </fail>
    2.91      </target>
    2.92 -    <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
    2.93 -        <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
    2.94 -        <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
    2.95 -        <!-- The doctype triggers resolution which can fail -->
    2.96 -        <replace file="${temp.gf.web}">
    2.97 -            <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
    2.98 -            <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
    2.99 -        </replace>
   2.100 -        <replace file="${temp.gf.web}">
   2.101 -            <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
   2.102 -            <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
   2.103 -        </replace>
   2.104 -        <xmlproperty file="${temp.gf.web}" validate="false">
   2.105 -        </xmlproperty>
   2.106 -        <delete file="${temp.gf.web}"/>
   2.107 -        <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
   2.108 -            <isset property="glassfish-web-app.context-root"/>
   2.109 -        </condition>
   2.110 -        <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
   2.111 -            <isset property="glassfish-web-app.context-root"/>
   2.112 -        </condition>
   2.113 +    <target name="-deploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
   2.114 +        <echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/>
   2.115 +        <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
   2.116 +                 classpath="${tomcat.home}/server/lib/catalina-ant.jar"/>
   2.117 +        <deploy url="${tomcat.url}/manager" username="${tomcat.username}"
   2.118 +                password="${tomcat.password}" path="${Context(path)}"
   2.119 +                war="${deploy.ant.archive}"/>
   2.120 +        <property name="deploy.ant.client.url" value="${tomcat.url}${Context(path)}"/>
   2.121      </target>
   2.122 -    <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
   2.123 -        <property name="deploy.context.root.argument" value=""/>
   2.124 -    </target>
   2.125 -    <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
   2.126 -        <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
   2.127 -        <mkdir dir="${gfv3.resources.dir}"/>
   2.128 -        <mkdir dir="${gfv3.resources.dir}/META-INF"/>
   2.129 -        <copy todir="${gfv3.resources.dir}/META-INF">
   2.130 -            <fileset dir="${deploy.ant.resource.dir}"/>
   2.131 -        </copy>
   2.132 -        <jar destfile="${deploy.ant.archive}" update="true">
   2.133 -            <fileset dir="${gfv3.resources.dir}"/>
   2.134 -        </jar>
   2.135 -        <delete dir="${gfv3.resources.dir}"/>
   2.136 -    </target>
   2.137 -    <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
   2.138 -        <antcall target="-deploy-without-pw"/>
   2.139 -        <antcall target="-deploy-with-pw"/>
   2.140 -    </target>
   2.141 -
   2.142 -    <target name="-deploy-without-pw" unless="gfv3.password">
   2.143 -        <echo message="Deploying ${deploy.ant.archive}"/>
   2.144 -        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
   2.145 -        <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
   2.146 -        <get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
   2.147 -            dest="${gfv3.results.file}"/>
   2.148 -        <delete file="${gfv3.results.file}"/>    
   2.149 -    </target>
   2.150 -    <target name="-deploy-with-pw" if="gfv3.password">
   2.151 -        <echo message="Deploying ${deploy.ant.archive}"/>
   2.152 -        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
   2.153 -        <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
   2.154 -        <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
   2.155 -            dest="${gfv3.results.file}"/>
   2.156 -        <delete file="${gfv3.results.file}"/>
   2.157 -    </target>
   2.158 -    <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
   2.159 -        <antcall target="-undeploy-without-pw"/>
   2.160 -        <antcall target="-undeploy-with-pw"/>
   2.161 -    </target>
   2.162 -
   2.163 -    <target name="-undeploy-without-pw" unless="gfv3.password">
   2.164 -        <echo message="Undeploying ${deploy.ant.archive}"/>
   2.165 -        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
   2.166 -        <get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
   2.167 -            dest="${gfv3.results.file}"/>
   2.168 -        <delete file="${gfv3.results.file}"/>    
   2.169 -    </target>
   2.170 -    <target name="-undeploy-with-pw" if="gfv3.password">
   2.171 -        <echo message="Undeploying ${deploy.ant.archive}"/>
   2.172 -        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
   2.173 -        <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
   2.174 -            dest="${gfv3.results.file}"/>
   2.175 -        <delete file="${gfv3.results.file}"/>
   2.176 +    <target name="-undeploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials">
   2.177 +        <echo message="Undeploying ${Context(path)}"/>
   2.178 +        <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"
   2.179 +                classpath="${tomcat.home}/server/lib/catalina-ant.jar"/>
   2.180 +        <undeploy url="${tomcat.url}/manager" username="${tomcat.username}" 
   2.181 +                  password="${tomcat.password}" path="${Context(path)}"/>
   2.182      </target>
   2.183  </project>
     3.1 --- a/nbproject/genfiles.properties	Thu Apr 06 17:44:17 2017 +0200
     3.2 +++ b/nbproject/genfiles.properties	Sun Oct 29 13:35:43 2017 +0100
     3.3 @@ -1,8 +1,8 @@
     3.4 -build.xml.data.CRC32=6b6de059
     3.5 +build.xml.data.CRC32=526d7b6b
     3.6  build.xml.script.CRC32=1f023e98
     3.7 -build.xml.stylesheet.CRC32=651128d4@1.75.1.1
     3.8 +build.xml.stylesheet.CRC32=651128d4@1.77.1.1
     3.9  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    3.10  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    3.11 -nbproject/build-impl.xml.data.CRC32=6b6de059
    3.12 +nbproject/build-impl.xml.data.CRC32=526d7b6b
    3.13  nbproject/build-impl.xml.script.CRC32=3fd540ea
    3.14 -nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.75.1.1
    3.15 +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1
     4.1 --- a/nbproject/project.properties	Thu Apr 06 17:44:17 2017 +0200
     4.2 +++ b/nbproject/project.properties	Sun Oct 29 13:35:43 2017 +0100
     4.3 @@ -33,13 +33,8 @@
     4.4  j2ee.copy.static.files.on.save=true
     4.5  j2ee.deploy.on.save=true
     4.6  j2ee.platform=1.7-web
     4.7 -j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar
     4.8 -j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
     4.9 -j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
    4.10 -j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar
    4.11 -j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar
    4.12 -j2ee.platform.wsit.classpath=
    4.13 -j2ee.server.type=gfv3ee6
    4.14 +j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.6.3.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jaspic-api.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar
    4.15 +j2ee.server.type=Tomcat
    4.16  jar.compress=false
    4.17  javac.classpath=
    4.18  # Space-separated list of extra javac options
    4.19 @@ -68,7 +63,6 @@
    4.20  javadoc.version=false
    4.21  javadoc.windowtitle=
    4.22  lib.dir=${web.docbase.dir}/WEB-INF/lib
    4.23 -no.dependencies=false
    4.24  persistence.xml.dir=${conf.dir}
    4.25  platform.active=default_platform
    4.26  resource.dir=setup
     5.1 --- a/nbproject/project.xml	Thu Apr 06 17:44:17 2017 +0200
     5.2 +++ b/nbproject/project.xml	Sun Oct 29 13:35:43 2017 +0100
     5.3 @@ -8,10 +8,10 @@
     5.4              <web-module-libraries/>
     5.5              <web-module-additional-libraries/>
     5.6              <source-roots>
     5.7 -                <root id="src.dir" name="Source Packages"/>
     5.8 +                <root id="src.dir"/>
     5.9              </source-roots>
    5.10              <test-roots>
    5.11 -                <root id="test.src.dir" name="Test Packages"/>
    5.12 +                <root id="test.src.dir"/>
    5.13              </test-roots>
    5.14          </data>
    5.15      </configuration>
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/web/META-INF/context.xml	Sun Oct 29 13:35:43 2017 +0100
     6.3 @@ -0,0 +1,2 @@
     6.4 +<?xml version="1.0" encoding="UTF-8"?>
     6.5 +<Context path="/lightpit"/>

mercurial