[
https://issues.apache.org/jira/browse/MTOMCAT-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701854#comment-13701854
]
Stanislav Grushevskiy commented on MTOMCAT-230:
-----------------------------------------------
mod_jk.conf
<IfDefine JK>
LoadModule jk_module modules/mod_jk.so
###
### Where to find workers.properties
###
# JkWorkersFile specify the location where mod_jk will find
# the workers definitions.
JkWorkersFile /etc/apache2/jk-workers.properties
###
### Where to put mod_jk logs
###
# specify the location where mod_jk is going to place its log file.
JkLogFile /var/log/apache2/mod_jk.log
###
### Set the jk log level [debug/error/info]
###
# info log will contains standard mod_jk activity (default).
# error log will contains also error reports.
# debug log will contains all informations on mod_jk activity
JkLogLevel info
###
### Select the log format
###
# JkLogStampFormat will configure the date/time format found
# on mod_jk logfile. Using the strftime() format string it's
# set by default to "[%a %b %d %H:%M:%S %Y]"
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
###
### JkOptions indicate to send SSL KEY SIZE,
###
# The directive JkOptions allow you to set many forwarding
# options which will enable (+) or disable (-) following option.
#
#
# JkOptions ForwardKeySize , you ask mod_jk, when using ajp13, to
# forward also the SSL Key Size as required by Servlet API 2.3.
# This flag shouldn't be set when servlet engine is Tomcat 3.2.x
# (on by default).
#
#
# JkOptions ForwardURICompat , you told mod_jk to send the URI to
# Tomcat normally, which is less spec compliant but mod_rewrite
# compatible, use it for compatibility with Tomcat 3.2.x engines
# (on by default).
#
#
# JkOptions ForwardURICompatUnparsed , the forwarded URI is unparsed,
# it's spec compliant but broke mod_rewrite.
#
#
# JkOptions ForwardURIEscaped , the forwarded URI is escaped and
# Tomcat (since 3.3 rc2) will do the decoding part.
#
#
# JkOptions ForwardDirectories is used in conjunction with Directory-
# Index directive of Apache web server. As such mod_dir should be
# available to Apache, statically or dynamically (DSO)
#
# When DirectoryIndex is configured, Apache will create sub-requests
# for each of the local-url's specified in the directive, to determine
# if there is a local file that matches (this is done by stat-ing the file).
#
# If ForwardDirectories is set to false (default) and Apache doesn't
# find any files that match, Apache will serve the content of the
# directory (if directive Options specifies Indexes for that directory)
# or a 403 Forbidden response (if directive Options doesn't specify
# Indexes for that directory).
#
# If ForwardDirectories is set to true and Apache doesn't find any
# files that match, the request will be forwarded to Tomcat for
# resolution. This is used in cases when Apache cannot see the index
# files on the file system for various reasons: Tomcat is running on
# a different machine, the JSP file has been precompiled etc.
#
# Note that locally visible files will take precedence over the ones
# visible only to Tomcat (i.e. if Apache can see the file, that's
# the one that's going to get served). This is important if there is
# more then one type of file that Tomcat normally serves - for
# instance Velocity pages and JSP pages.
#
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
###
### JkEnvVar forward environment vars
###
# The directive JkEnvVar allow you to forward an environment vars
# from Apache server to Tomcat engine.
#
#JkEnvVar SSL_CLIENT_V_START
###
### JkRequestLogFormat set the request format
###
# JkRequestLogFormat will configure the format of mod_jk individual
# request logging. Request logging is configured and enabled on a
# per virtual host basis. To enable request logging for a virtual
# host just add a JkRequestLogFormat config. The syntax of the
# format string is similiar to the Apache LogFormat command, here
# is a list of the available request log format options:
#
# Options Description
# %b Bytes sent, excluding HTTP headers (CLF format)
# %B Bytes sent, excluding HTTP headers
# %H The request protocol
# %m The request method
# %p The canonical Port of the server serving the request
# %q The query string (prepended with a ? if a query string exists,
otherwise an empty string)
# %r First line of request
# %s Request HTTP status code
# %T Request duration, elapsed time to handle request in seconds '.'
micro seconds
# %U The URL path requested, not including any query string.
# %v The canonical ServerName of the server serving the request
# %V The server name according to the UseCanonicalName setting
# %w Tomcat worker name
#
JkRequestLogFormat "%w %V %T"
###
### JkMount assign specific URLs to Tomcat
###
# JkMount directive assign specific URLs to Tomcat. In general the
# structure of a JkMount directive is:
#
# send all requests ending in .jsp to worker1
# JkMount /*.jsp worker1
#
# send all requests ending /servlet to worker1
# JkMount /*/servlet/ worker1
#
# send all requests jsp requests to files located in /otherworker will go
worker2
# JkMount /otherworker/*.jsp worker2
#
#
# You can use the JkMount directive at the top level or inside
# <VirtualHost> sections of your httpd.conf file.
#
# We specify an autoalias, that makes it possible that apache is still
# reponsible for serving static html files. All requests of files with
# the ending .jsp will be redirected to a default Tomcat installation which
# uses the default profile. Change this to fit your needs.
jkAutoAlias /var/lib/tomcat-5.5/default/webapps/
jkMount /*.jsp ajp13
</IfDefine>
# vim: ts=4 filetype=apache
> CLONE - Plugin uploads WAR file twice
> -------------------------------------
>
> Key: MTOMCAT-230
> URL: https://issues.apache.org/jira/browse/MTOMCAT-230
> Project: Apache Tomcat Maven Plugin
> Issue Type: Bug
> Components: tomcat6
> Affects Versions: 2.0
> Environment: Win7/64, Maven 3.0.4
> Reporter: Stanislav Grushevskiy
> Assignee: Olivier Lamy (*$^¨%`£)
>
> To reproduce this issue you need to install apache and mod_jk and deploy
> application to apache, mod_jk, tomcat.
> If you deploy just to tomcat you will not reproduce it.
> This situation is reproduced in tomcat 6, 7.
> When I deploy my WAR using maven, the target war (exact the same one) is
> being uploaded to the server twice. Can someone explain that?
> I am using this on my module:
> {code}clean install org.apache.tomcat.maven:tomcat6-maven-plugin:2.0:redeploy
> {code}
> From the Log file
> {code =xml}
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mobile-server ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mobile-server] in
> [C:\develope\mobile\mobile-server\target\mobile-server]
> [INFO] Processing war project
> [INFO] Copying webapp resources
> [C:\develope\mobile\mobile-server\src\main\webapp]
> [INFO] Webapp assembled in [241 msecs]
> [INFO] Building war: C:\develope\mobile\mobile-server\target\mobile-server.war
> [INFO]
> [INFO] <<< tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server <<<
> [INFO]
> [INFO] --- tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server
> ---
> [INFO] Deploying war to http://myserver.eu/pra-mobile-server
> Uploading:
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> Uploaded:
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> (12678 KB at 49.3 KB/sec)
> Uploading:
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> Uploaded:
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> {code}
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <parent>
> <groupId>eu.company.prj.pramobile</groupId>
> <artifactId>mobile-parent</artifactId>
> <relativePath>../mobile-parent/pom.xml</relativePath>
> <version>1.0-SNAPSHOT</version>
> </parent>
> <artifactId>mobile-server</artifactId>
> <packaging>war</packaging>
> <name>mobile server</name>
> <properties>
> <version.standard.taglibs>1.1.2</version.standard.taglibs>
> </properties>
> <repositories>
> <repository>
> <id>com.springsource.repository.libs-milestone</id>
> <name>SpringSource Enterprise Bundle Repository - libs</name>
> <url>http://repo.springsource.org/libs-milestone/</url>
> </repository>
> </repositories>
> <dependencies>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>mobile-test</artifactId>
> <version>${project.version}</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>${project.groupId}</groupId>
> <artifactId>mobile-common</artifactId>
> <version>${project.version}</version>
> </dependency>
> <!-- Import Spring dependencies, these are either from community or
> versions
> certified in WFK2 -->
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-asm</artifactId>
> <version>${version.spring}</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-aop</artifactId>
> <version>${version.spring}</version>
> </dependency>
> <dependency>
> <groupId>org.springframework.security</groupId>
> <artifactId>spring-security-config</artifactId>
> <version>${version.spring}</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-web</artifactId>
> <version>${version.spring}</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-oxm</artifactId>
> <version>${version.spring}</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-webmvc</artifactId>
> <version>${version.spring}</version>
> </dependency>
> <dependency>
> <groupId>org.springframework.security</groupId>
> <artifactId>spring-security-web</artifactId>
> <version>${version.spring}</version>
> </dependency>
> <dependency>
> <groupId>commons-codec</groupId>
> <artifactId>commons-codec</artifactId>
> <version>1.7</version>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>jsp-api</artifactId>
> <version>2.0</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>commons-io</groupId>
> <artifactId>commons-io</artifactId>
> <version>2.4</version>
> </dependency>
> <dependency>
> <groupId>commons-fileupload</groupId>
> <artifactId>commons-fileupload</artifactId>
> <version>1.2.2</version>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>servlet-api</artifactId>
> <version>2.5</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>jstl</artifactId>
> <version>1.1.2</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>taglibs</groupId>
> <artifactId>standard</artifactId>
> <version>1.1.2</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>commons-httpclient</groupId>
> <artifactId>commons-httpclient</artifactId>
> <version>3.1</version>
> </dependency>
> <dependency>
> <groupId>net.sf.ehcache</groupId>
> <artifactId>ehcache</artifactId>
> <version>1.6.1</version>
> </dependency>
> <dependency>
> <groupId>org.springmodules</groupId>
> <artifactId>spring-modules-cache</artifactId>
> <version>0.8a</version>
> <!-- Unfortunately design of spring cache module is not the best - we
> need to exclude not necessary dependencies -->
> <exclusions>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring</artifactId>
> </exclusion>
> <exclusion>
> <groupId>gigaspaces</groupId>
> <artifactId>gigaspaces-ce</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jini</groupId>
> <artifactId>jsk-lib</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jini</groupId>
> <artifactId>jsk-platform</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jini</groupId>
> <artifactId>mahalo</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jini</groupId>
> <artifactId>reggie</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jini</groupId>
> <artifactId>start</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jini</groupId>
> <artifactId>boot</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jini</groupId>
> <artifactId>webster</artifactId>
> </exclusion>
> <exclusion>
> <groupId>commons-attributes</groupId>
> <artifactId>commons-attributes-api</artifactId>
> </exclusion>
> <exclusion>
> <groupId>commons-attributes</groupId>
> <artifactId>commons-attributes-compiler</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jboss</groupId>
> <artifactId>javassist</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jboss</groupId>
> <artifactId>jboss-cache</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jboss</groupId>
> <artifactId>jboss-common</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jboss</groupId>
> <artifactId>jboss-jmx</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jboss</groupId>
> <artifactId>jboss-minimal</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jboss</groupId>
> <artifactId>jboss-system</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jcs</groupId>
> <artifactId>jcs</artifactId>
> </exclusion>
> <exclusion>
> <groupId>jgroups</groupId>
> <artifactId>jgroups-all</artifactId>
> </exclusion>
> <exclusion>
> <groupId>geronimo-spec</groupId>
> <artifactId>geronimo-spec-jta</artifactId>
> </exclusion>
> <exclusion>
> <groupId>xpp3</groupId>
> <artifactId>xpp3_min</artifactId>
> </exclusion>
> <exclusion>
> <groupId>xjavadoc</groupId>
> <artifactId>xjavadoc</artifactId>
> </exclusion>
> <exclusion>
> <groupId>opensymphony</groupId>
> <artifactId>oscache</artifactId>
> </exclusion>
> <exclusion>
> <groupId>ehcache</groupId>
> <artifactId>ehcache</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <dependency>
> <groupId>org.quartz-scheduler</groupId>
> <artifactId>quartz</artifactId>
> <version>${version.quartz}</version>
> </dependency>
> <dependency>
> <groupId>javax.mail</groupId>
> <artifactId>mail</artifactId>
> <version>1.4.5</version>
> </dependency>
> <dependency>
> <groupId>org.apache.commons</groupId>
> <artifactId>commons-lang3</artifactId>
> <version>3.1</version>
> </dependency>
> <!--mockito for test-->
> <dependency>
> <groupId>org.mockito</groupId>
> <artifactId>mockito-all</artifactId>
> <version>1.9.5</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.kubek2k</groupId>
> <artifactId>springockito</artifactId>
> <version>1.0.4</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.kubek2k</groupId>
> <artifactId>springockito-annotations</artifactId>
> <version>1.0.5</version>
> <scope>test</scope>
> </dependency>
> <!--testing MVC controllers-->
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-test-mvc</artifactId>
> <version>1.0.0.M2</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-context</artifactId>
> <version>3.1.0.RELEASE</version>
> </dependency>
> </dependencies>
> <build>
> <finalName>mobile-server</finalName>
> <plugins>
> <plugin>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>maven-jetty-plugin</artifactId>
> <version>6.1.10</version>
> <configuration>
>
> <jettyEnvXml>${basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
> <!-- Solves locked problem for JSP while jetty is running -->
>
> <webDefaultXml>src/test/resources/webdefault.xml</webDefaultXml>
> <stopKey>0</stopKey>
> <stopPort>8001</stopPort>
> <scanIntervalSeconds>5</scanIntervalSeconds>
> <systemProperties>
> <systemProperty>
> <name>org.apache.commons.logging.Log</name>
>
> <value>org.apache.commons.logging.impl.SimpleLog</value>
> </systemProperty>
> <systemProperty>
> <name>log4j.configurationFile</name>
>
> <value>file:${project.basedir}/src/main/resources/log4j.xml</value>
> </systemProperty>
> </systemProperties>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>mysql</groupId>
> <artifactId>mysql-connector-java</artifactId>
> <version>5.1.9</version>
> </dependency>
> </dependencies>
> </plugin>
> <!-- Surefire plugin before 2.9 version is buggy -->
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.10</version>
> <configuration>
> <parallel>true</parallel>
> <threadCount>10</threadCount>
> <systemPropertyVariables>
> <java.awt.headless>true</java.awt.headless>
> </systemPropertyVariables>
> </configuration>
> </plugin>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.1.1</version>
> <!--to avoid maven error message-->
> <configuration>
> <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
> </configuration>
> </plugin>
> <!--import objects from schema generation-->
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>jaxb2-maven-plugin</artifactId>
> <version>1.5</version>
> <executions>
> <execution>
> <goals>
> <goal>xjc</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <encoding>UTF-8</encoding>
> <extension>true</extension>
>
> <packageName>eu.company.prj.pra.mobile.server.generated.place1</packageName>
>
> <schemaDirectory>src/main/resources/META-INF/schema</schemaDirectory>
> <outputDirectory>${basedir}/src/main/java/</outputDirectory>
> <failOnNoSchemas>true</failOnNoSchemas>
> <clearOutputDir>false</clearOutputDir>
> </configuration>
> </plugin>
> <!-- mvn tomcat plugin alternative - run -->
> <plugin>
> <groupId>org.apache.tomcat.maven</groupId>
> <artifactId>tomcat6-maven-plugin</artifactId>
> <version>2.0</version>
> <configuration>
>
> <systemProperties>-Dmaven.tomcat.uriEncoding=UTF-8</systemProperties>
> <url>${tomcat-maven-plugin.url}</url>
> <username>${tomcat-maven-plugin.username}</username>
> <password>${tomcat-maven-plugin.password}</password>
> </configuration>
> </plugin>
> <!-- mvn tomcat plugin alternative - run -->
> <!--<plugin>-->
> <!--<groupId>org.codehaus.mojo</groupId>-->
> <!--<artifactId>tomcat-maven-plugin</artifactId>-->
> <!--<configuration>-->
>
> <!--<contextFile>${basedir}/src/test/resources/tomcat-context.xml</contextFile>-->
> <!--<url>${tomcat-maven-plugin.url}</url>-->
> <!--<username>${tomcat-maven-plugin.username}</username>-->
> <!--<password>${tomcat-maven-plugin.password}</password>-->
> <!--</configuration>-->
> <!--<dependencies>-->
> <!--<dependency>-->
> <!--<groupId>mysql</groupId>-->
> <!--<artifactId>mysql-connector-java</artifactId>-->
> <!--<version>5.1.9</version>-->
> <!--</dependency>-->
> <!--</dependencies>-->
> <!--</plugin>-->
> </plugins>
> </build>
> {code}
> Parent pom:
> {code}
> <groupId>eu.company.prj.mobile</groupId>
> <artifactId>mobile-parent</artifactId>
> <version>1.0-SNAPSHOT</version>
> <packaging>pom</packaging>
> <name>mobile project parent</name>
> <properties>
> <version.spring>3.1.1.RELEASE</version.spring>
> <version.jackson>1.9.11</version.jackson>
> <version.commons.logging>1.1.1</version.commons.logging>
> <version.quartz>2.1.6</version.quartz>
> <slf4j.version>1.5.8</slf4j.version>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> </properties>
> <build>
> <plugins>
> <!-- Force Java 6 -->
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.3.1</version>
> <configuration>
> <encoding>${project.build.sourceEncoding}</encoding>
> <source>1.6</source>
> <target>1.6</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> just properties with u/p ...
> </profiles>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]