Changeset 4447
- Timestamp:
- 04/06/09 13:09:36 (3 years ago)
- Location:
- trunk
- Files:
-
- 18 modified
-
ChangeLog (modified) (1 diff)
-
pom.xml (modified) (1 diff)
-
profiles.xml.sample (modified) (1 diff)
-
pustefix-archetypes/pustefix-archetype-application/src/main/resources/archetype-resources/profiles.xml (modified) (1 diff)
-
pustefix-archetypes/pustefix-archetype-application/src/main/resources/archetype-resources/src/main/pustefix/conf/pustefix.xml (modified) (1 diff)
-
pustefix-core/src/main/java/de/schlund/pfixxml/config/BuildTimeProperties.java (modified) (1 diff)
-
pustefix-core/src/main/java/de/schlund/pfixxml/config/GlobalConfig.java (modified) (1 diff)
-
pustefix-core/src/main/java/org/pustefixframework/http/DocrootRequestHandler.java (modified) (1 diff)
-
pustefix-core/src/main/java/org/pustefixframework/http/internal/FactoryInitWorker.java (modified) (3 diffs)
-
pustefix-core/src/main/resources/build/create_serverxml.xsl (modified) (3 diffs)
-
pustefix-plugins/pustefix-webapp-plugin/src/main/java/org/pustefixframework/maven/plugins/PustefixWebappMojo.java (modified) (3 diffs)
-
pustefix-samples/pustefix-sample-firstapp/src/main/pustefix/conf/pustefix.xml (modified) (1 diff)
-
pustefix-samples/pustefix-sample1/src/main/pustefix/conf/pustefix.xml (modified) (1 diff)
-
pustefix-samples/pustefix-samplebank/src/main/pustefix/conf/pustefix.xml (modified) (1 diff)
-
pustefix-samples/pustefix-testsuite/src/main/pustefix/conf/pustefix.xml (modified) (1 diff)
-
pustefix-samples/pustefix-webservice/pom.xml (modified) (1 diff)
-
pustefix-samples/pustefix-webservice/src/main/pustefix/conf/pustefix.xml (modified) (1 diff)
-
pustefix-webservices/pustefix-webservices-jaxws/src/main/java/org/pustefixframework/webservices/jaxws/generate/WebserviceTask.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r4435 r4447 1 2009-04-06 Michael Hartmeier <michael.hartmeier@1und1.de> 2 3 Dump standalone.tomcat. It was always true since we have a war file build now. 4 1 5 2009-04-02 Martin Leidig <mleidig@schlund.de> 2 6 -
trunk/pom.xml
r4428 r4447 23 23 <properties> 24 24 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 25 <standalone.tomcat>true</standalone.tomcat>26 25 <makemode>test</makemode> 27 26 </properties> -
trunk/profiles.xml.sample
r4391 r4447 9 9 <properties> 10 10 <makemode>test</makemode> 11 <standalone.tomcat>true</standalone.tomcat>12 11 </properties> 13 12 </profile> -
trunk/pustefix-archetypes/pustefix-archetype-application/src/main/resources/archetype-resources/profiles.xml
r4391 r4447 8 8 <properties> 9 9 <makemode>test</makemode> 10 <standalone.tomcat>true</standalone.tomcat>11 10 </properties> 12 11 </profile> -
trunk/pustefix-archetypes/pustefix-archetype-application/src/main/resources/archetype-resources/src/main/pustefix/conf/pustefix.xml
r4394 r4447 20 20 21 21 <!-- URL for the Pustefix editor --> 22 <choose> 23 <when test="${symbol_dollar}standalone.tomcat = 'true'"> 24 <prop name="xmlserver.editor_url">http://cmsskel.${symbol_dollar}{fqdn}:8080</prop> 25 </when> 26 <otherwise> 27 <prop name="xmlserver.editor_url">http://cmsskel.${symbol_dollar}{fqdn}</prop> 28 </otherwise> 29 </choose> 22 <prop name="xmlserver.editor_url">http://cmsskel.${symbol_dollar}{fqdn}:8080</prop> 30 23 31 24 <choose> -
trunk/pustefix-core/src/main/java/de/schlund/pfixxml/config/BuildTimeProperties.java
r4383 r4447 54 54 } 55 55 56 public static void generate(Properties props, String mode, String machine, String fqdn, String uid , boolean standaloneTomcat) throws IOException {56 public static void generate(Properties props, String mode, String machine, String fqdn, String uid) throws IOException { 57 57 props.setProperty("mode", mode); 58 58 props.setProperty("machine", machine); 59 59 props.setProperty("fqdn", fqdn); 60 60 props.setProperty("uid", uid); 61 props.setProperty("standalone.tomcat", Boolean.toString(standaloneTomcat));62 61 props.store(ResourceUtil.getFileResourceFromDocroot("buildtime.prop").getOutputStream(), "Properties used at buildtime"); 63 62 } -
trunk/pustefix-core/src/main/java/de/schlund/pfixxml/config/GlobalConfig.java
r4314 r4447 110 110 * Returns the servlet context 111 111 * 112 * @return The servlet context or <code>null</code> if this instance of 113 * Pustefix is shared across different contexts (e.g. in standalone mode) 112 * @return The servlet context or <code>null</code> if not available 114 113 */ 115 114 public static ServletContext getServletContext() { -
trunk/pustefix-core/src/main/java/org/pustefixframework/http/DocrootRequestHandler.java
r3756 r4447 39 39 40 40 /** 41 * In standalone mode this servlet serves the static files from the docroot. 42 * In all modes, it serves files from the webapplication directory below 43 * /xml because they would usually be masked by the files within the docroot. 41 * This servlet serves the static files from the docroot. 44 42 * 45 43 * @author Sebastian Marsching <sebastian.marsching@1und1.de> -
trunk/pustefix-core/src/main/java/org/pustefixframework/http/internal/FactoryInitWorker.java
r4249 r4447 98 98 99 99 private boolean warMode = false; 100 private boolean standaloneMode= false;100 private boolean docrootSpecified = false; 101 101 102 102 private final static Object initLock = new Object(); … … 158 158 String docrootstr = servletContext.getInitParameter("pustefix.docroot"); 159 159 if (docrootstr != null && !docrootstr.equals("")) { 160 standaloneMode= true;160 docrootSpecified = true; 161 161 } else { 162 162 docrootstr = servletContext.getRealPath("/WEB-INF/pfixroot"); … … 226 226 private void configureLogging(Properties properties, ServletContext servletContext) throws ServletException { 227 227 String containerProp = properties.getProperty(PROP_PREFER_CONTAINER_LOGGING); 228 if (warMode || (! standaloneMode&& (containerProp != null && containerProp.toLowerCase().equals("true")))) {228 if (warMode || (!docrootSpecified && (containerProp != null && containerProp.toLowerCase().equals("true")))) { 229 229 ProxyLogUtil.getInstance().configureLog4jProxy(); 230 230 ProxyLogUtil.getInstance().setServletContext(servletContext); -
trunk/pustefix-core/src/main/resources/build/create_serverxml.xsl
r3958 r4447 7 7 > 8 8 9 <xsl:param name="standalone">true</xsl:param>10 9 <xsl:param name="portbase"/> 11 10 <xsl:param name="warmode">false</xsl:param> … … 112 111 <xsl:if test="not(string($maxprocessors)='')"><xsl:attribute name="maxThreads"><xsl:value-of select="$maxprocessors"/></xsl:attribute></xsl:if> 113 112 </Connector> 114 <xsl:if test="$standalone = 'true'"> 115 <Connector maxHttpHeaderSize="8192" 116 maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 117 enableLookups="false" acceptCount="100" 118 connectionTimeout="20000" disableUploadTimeout="true" 119 useBodyEncodingForURI="true"> 120 <xsl:attribute name="debug"><xsl:value-of select="$debug"/></xsl:attribute> 121 <xsl:attribute name="port"><xsl:value-of select="$portbase+80"/></xsl:attribute> 122 <xsl:attribute name="redirectport"><xsl:value-of select="$portbase+443"/></xsl:attribute> 123 </Connector> 124 <Connector maxHttpHeaderSize="8192" 125 maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 126 enableLookups="false" disableUploadTimeout="true" 127 acceptCount="100" scheme="https" secure="true" 128 clientAuth="false" sslProtocol="TLS" keystoreFile="conf/keystore" keystorePass="secret" 129 useBodyEncodingForURI="true"> 130 <xsl:attribute name="port"><xsl:value-of select="$portbase+443"/></xsl:attribute> 131 <xsl:attribute name="debug"><xsl:value-of select="$debug"/></xsl:attribute> 132 </Connector> 133 </xsl:if> 113 <Connector maxHttpHeaderSize="8192" 114 maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 115 enableLookups="false" acceptCount="100" 116 connectionTimeout="20000" disableUploadTimeout="true" 117 useBodyEncodingForURI="true"> 118 <xsl:attribute name="debug"><xsl:value-of select="$debug"/></xsl:attribute> 119 <xsl:attribute name="port"><xsl:value-of select="$portbase+80"/></xsl:attribute> 120 <xsl:attribute name="redirectport"><xsl:value-of select="$portbase+443"/></xsl:attribute> 121 </Connector> 122 <Connector maxHttpHeaderSize="8192" 123 maxThreads="150" minSpareThreads="25" maxSpareThreads="75" 124 enableLookups="false" disableUploadTimeout="true" 125 acceptCount="100" scheme="https" secure="true" 126 clientAuth="false" sslProtocol="TLS" keystoreFile="conf/keystore" keystorePass="secret" 127 useBodyEncodingForURI="true"> 128 <xsl:attribute name="port"><xsl:value-of select="$portbase+443"/></xsl:attribute> 129 <xsl:attribute name="debug"><xsl:value-of select="$debug"/></xsl:attribute> 130 </Connector> 134 131 </xsl:template> 135 132 … … 187 184 </xsl:with-param> 188 185 <xsl:with-param name="staticDocBase"> 189 <xsl:if test="$standalone = 'true'"> 190 <xsl:if test="p:application/p:docroot-path/text()"> 191 <xsl:variable name="docroot" select="p:application/p:docroot-path/text()"/> 192 <xsl:variable name="abs_path"> 193 <xsl:choose> 194 <xsl:when test="starts-with(normalize-space(text()), 'pfixroot:')"> 195 <xsl:value-of select="$docroot"/><xsl:value-of select="substring-after(normalize-space(text()), 'pfixroot:')"/> 196 </xsl:when> 197 <xsl:when test="starts-with(normalize-space(text()), 'file:')"> 198 <xsl:value-of select="substring-after(normalize-space(text()), 'file:')"/> 199 </xsl:when> 200 <xsl:otherwise> 201 <xsl:value-of select="normalize-space(text())"/> 202 </xsl:otherwise> 203 </xsl:choose> 204 </xsl:variable> 186 <xsl:if test="p:application/p:docroot-path/text()"> 187 <xsl:variable name="docroot" select="p:application/p:docroot-path/text()"/> 188 <xsl:variable name="abs_path"> 205 189 <xsl:choose> 206 <xsl:when test="ext:exists($abs_path)"> 207 <xsl:value-of select="$abs_path"/> 190 <xsl:when test="starts-with(normalize-space(text()), 'pfixroot:')"> 191 <xsl:value-of select="$docroot"/><xsl:value-of select="substring-after(normalize-space(text()), 'pfixroot:')"/> 192 </xsl:when> 193 <xsl:when test="starts-with(normalize-space(text()), 'file:')"> 194 <xsl:value-of select="substring-after(normalize-space(text()), 'file:')"/> 208 195 </xsl:when> 209 196 <xsl:otherwise> 210 <xsl: message>CAUTION: documentroot does not exist: <xsl:value-of select="$abs_path"/></xsl:message>197 <xsl:value-of select="normalize-space(text())"/> 211 198 </xsl:otherwise> 212 199 </xsl:choose> 213 </xsl:if> 200 </xsl:variable> 201 <xsl:choose> 202 <xsl:when test="ext:exists($abs_path)"> 203 <xsl:value-of select="$abs_path"/> 204 </xsl:when> 205 <xsl:otherwise> 206 <xsl:message>CAUTION: documentroot does not exist: <xsl:value-of select="$abs_path"/></xsl:message> 207 </xsl:otherwise> 208 </xsl:choose> 214 209 </xsl:if> 215 210 </xsl:with-param> -
trunk/pustefix-plugins/pustefix-webapp-plugin/src/main/java/org/pustefixframework/maven/plugins/PustefixWebappMojo.java
r4383 r4447 113 113 114 114 /** 115 * @parameter default-value="true"116 */117 private boolean standaloneTomcat;118 119 120 /**121 115 * @parameter expression="${project}" 122 116 * @required … … 172 166 ant.setProperty("pfixroot", pfixroot); 173 167 ant.setProperty("aptdir", aptdir); 174 ant.setProperty("standalone.tomcat", Boolean.toString(standaloneTomcat));175 168 ant.setProperty("makemode", makemode); 176 169 ant.setProperty("data.tar.gz", getDataTarGz()); … … 218 211 219 212 private void buildtimeProps() throws IOException { 220 BuildTimeProperties.generate(getProperties(), makemode, getMachine(), getFqdn(), System.getProperty("user.name") , standaloneTomcat);213 BuildTimeProperties.generate(getProperties(), makemode, getMachine(), getFqdn(), System.getProperty("user.name")); 221 214 } 222 215 private Properties getProperties() { -
trunk/pustefix-samples/pustefix-sample-firstapp/src/main/pustefix/conf/pustefix.xml
r4371 r4447 18 18 19 19 <!-- URL for the Pustefix editor --> 20 <choose> 21 <when test="$standalone.tomcat = 'true'"> 22 <prop name="xmlserver.editor_url">http://cmsskel.${fqdn}:8080</prop> 23 </when> 24 <otherwise> 25 <prop name="xmlserver.editor_url">http://cmsskel.${fqdn}</prop> 26 </otherwise> 27 </choose> 20 <prop name="xmlserver.editor_url">http://cmsskel.${fqdn}:8080</prop> 28 21 29 22 <choose> -
trunk/pustefix-samples/pustefix-sample1/src/main/pustefix/conf/pustefix.xml
r4370 r4447 16 16 17 17 <!-- URL for the Pustefix editor --> 18 <choose> 19 <when test="$standalone.tomcat = 'true'"> 20 <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 21 </when> 22 <otherwise> 23 <prop name="xmlserver.editor_url">http://cms.${fqdn}</prop> 24 </otherwise> 25 </choose> 18 <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 26 19 27 20 <choose> -
trunk/pustefix-samples/pustefix-samplebank/src/main/pustefix/conf/pustefix.xml
r4371 r4447 16 16 17 17 <!-- URL for the Pustefix editor --> 18 <choose> 19 <when test="$standalone.tomcat = 'true'"> 20 <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 21 </when> 22 <otherwise> 23 <prop name="xmlserver.editor_url">http://cms.${fqdn}</prop> 24 </otherwise> 25 </choose> 18 <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 26 19 27 20 <choose> -
trunk/pustefix-samples/pustefix-testsuite/src/main/pustefix/conf/pustefix.xml
r4371 r4447 16 16 17 17 <!-- URL for the Pustefix editor --> 18 <choose> 19 <when test="$standalone.tomcat = 'true'"> 20 <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 21 </when> 22 <otherwise> 23 <prop name="xmlserver.editor_url">http://cms.${fqdn}</prop> 24 </otherwise> 25 </choose> 18 <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 26 19 27 20 <choose> -
trunk/pustefix-samples/pustefix-webservice/pom.xml
r4401 r4447 103 103 <tasks> 104 104 <taskdef name="pfx-webservice" classname="org.pustefixframework.webservices.jaxws.generate.WebserviceTask" classpathref="maven.compile.classpath" description="Generates/deploys WSDL, WSDD and JS stubs from web service interfaces/configuration" /> 105 <pfx-webservice tmpdir="target/webservice" prjdir="src/main/pustefix" builddir="target/classes" gendir="target/generated-sources" webappdir="target/${artifactId}-${version}/" classpathref="maven.compile.classpath" standalone="${standalone.tomcat}"portbase="80" includes="**/conf/project.xml" />105 <pfx-webservice tmpdir="target/webservice" prjdir="src/main/pustefix" builddir="target/classes" gendir="target/generated-sources" webappdir="target/${artifactId}-${version}/" classpathref="maven.compile.classpath" portbase="80" includes="**/conf/project.xml" /> 106 106 </tasks> 107 107 </configuration> -
trunk/pustefix-samples/pustefix-webservice/src/main/pustefix/conf/pustefix.xml
r4371 r4447 16 16 17 17 <!-- URL for the Pustefix editor --> 18 <choose> 19 <when test="$standalone.tomcat = 'true'"> 20 <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 21 </when> 22 <otherwise> 23 <prop name="xmlserver.editor_url">http://cms.${fqdn}</prop> 24 </otherwise> 25 </choose> 18 <prop name="xmlserver.editor_url">http://cms.${fqdn}:8080</prop> 26 19 27 20 <choose> -
trunk/pustefix-webservices/pustefix-webservices-jaxws/src/main/java/org/pustefixframework/webservices/jaxws/generate/WebserviceTask.java
r4384 r4447 65 65 private File gendir; 66 66 private Path classPath; 67 private boolean standalone;68 67 private int portbase; 69 68 … … 213 212 String srvName = "HOST"; 214 213 String srvPort = ""; 215 if (standalone)srvPort = ":" + (portbase + 80);214 srvPort = ":" + (portbase + 80); 216 215 String wsUrl = "http://" + srvName + srvPort + globConf.getRequestPath() + "/" + conf.getName(); 217 216 FileUtils.searchAndReplace(wsdlFile, "UTF-8", "REPLACE_WITH_ACTUAL_URL", wsUrl); … … 327 326 328 327 /** 329 * Set if it's build in Tomcat standalone mode.330 */331 public void setStandalone(boolean standalone) {332 this.standalone = standalone;333 }334 335 /**336 328 * Set the relative port for the Tomcat. 337 329 */
