Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 92e98fe

Browse files
committed
Repro project for SPR-13498
1 parent 3607fae commit 92e98fe

File tree

11 files changed

+550
-0
lines changed

11 files changed

+550
-0
lines changed

SPR-13498/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Repro project for SPR-0000-war-java
2+
3+
The project will be available at: http://localhost:8080/SPR-0000-war-java/
4+
5+
## Deploying
6+
7+
It is possible to deploy your application directly from the command-line
8+
using maven. You can use either [cargo](http://cargo.codehaus.org/) or
9+
the [jetty plugin](http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html)
10+
to run on a wide range of containers.
11+
12+
### Cargo
13+
14+
By default Cargo is configured to start `Tomcat7` and can be invoked by
15+
running `mvn package cargo:run`. Cargo can also run a [wide range of other
16+
containers](http://cargo.codehaus.org/Containers) and you can easily add
17+
yours by editing the `pom.xml`. For instance, a `tomcat8` profile
18+
has been added and can be invoked via `mvn package cargo:run -Ptomcat8`.
19+
20+
You can remote debug the application, in your IDE, by using the following command:
21+
`mvn package cargo:run -Ptomcat8 -Pdebug`. Note that you can customize the debug
22+
port used with the `cargo.jvm.debug.port` maven property.
23+
24+
### Jetty
25+
26+
To deploy your application to jetty9, simply invoke `mvn jetty:run`. It
27+
is possible to tune the exact jetty9 version you want to use by specifying
28+
the version of the command line, e.g. `mvn jetty:run -Djetty.version=9.0.6.v20130930`
29+
30+
To run a different version of jetty, please fallback to cargo as the
31+
coordinates of the maven plugin have changed. A sample `jetty8` profile is
32+
created for reference and can be tuned to suit your needs. To deploy your
33+
sample application to jetty8 run `mvn cargo:run -Pjetty8`
34+
35+
## Logging
36+
37+
This project contains a `log4j.properties` file in `src/main/resources` that you
38+
may wish to configure to emit more detailed logging. The root logger is set to
39+
`INFO` and a custom `org.springframework.web` logger is set to `DEBUG`.
40+
41+

SPR-13498/pom.xml

Lines changed: 305 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,305 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.springframework.issues</groupId>
5+
<artifactId>SPR-13498</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<name>Spring MVC Issue Reproduction Project</name>
8+
<packaging>war</packaging>
9+
10+
<properties>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
13+
<java.version>1.8</java.version>
14+
<spring.version>4.2.2.BUILD-SNAPSHOT</spring.version>
15+
<slf4j.version>1.7.5</slf4j.version>
16+
17+
<jetty.version>9.3.3.v20150827</jetty.version>
18+
<cargo.container.id>tomcat7x</cargo.container.id>
19+
<cargo.container.url>
20+
http://www.eu.apache.org/dist/tomcat/tomcat-7/v7.0.57/bin/apache-tomcat-7.0.57.zip
21+
</cargo.container.url>
22+
<cargo.container.jvmargs>-Xms96m -Xmx512m -Djava.awt.headless=true</cargo.container.jvmargs>
23+
<cargo.jvm.debug.port>8000</cargo.jvm.debug.port>
24+
</properties>
25+
26+
<dependencies>
27+
<!-- Spring Framework -->
28+
<dependency>
29+
<groupId>org.springframework</groupId>
30+
<artifactId>spring-context</artifactId>
31+
<version>${spring.version}</version>
32+
<exclusions>
33+
<!-- Exclude Commons Logging in favor of SLF4j -->
34+
<exclusion>
35+
<groupId>commons-logging</groupId>
36+
<artifactId>commons-logging</artifactId>
37+
</exclusion>
38+
</exclusions>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.springframework</groupId>
42+
<artifactId>spring-webmvc</artifactId>
43+
<version>${spring.version}</version>
44+
</dependency>
45+
46+
<!-- Logging -->
47+
<dependency>
48+
<groupId>org.slf4j</groupId>
49+
<artifactId>slf4j-api</artifactId>
50+
<version>${slf4j.version}</version>
51+
</dependency>
52+
<dependency>
53+
<groupId>org.slf4j</groupId>
54+
<artifactId>jcl-over-slf4j</artifactId>
55+
<version>${slf4j.version}</version>
56+
<scope>runtime</scope>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.slf4j</groupId>
60+
<artifactId>slf4j-log4j12</artifactId>
61+
<version>${slf4j.version}</version>
62+
<scope>runtime</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>log4j</groupId>
66+
<artifactId>log4j</artifactId>
67+
<version>1.2.17</version>
68+
<scope>runtime</scope>
69+
</dependency>
70+
71+
<!-- Servlet API -->
72+
<dependency>
73+
<groupId>javax.servlet</groupId>
74+
<artifactId>javax.servlet-api</artifactId>
75+
<version>3.0.1</version>
76+
<scope>provided</scope>
77+
</dependency>
78+
79+
<!-- JSP API and JSTL
80+
<dependency>
81+
<groupId>javax.servlet.jsp</groupId>
82+
<artifactId>jsp-api</artifactId>
83+
<version>2.1</version>
84+
<scope>provided</scope>
85+
</dependency>
86+
<dependency>
87+
<groupId>javax.servlet</groupId>
88+
<artifactId>jstl</artifactId>
89+
<version>1.2</version>
90+
</dependency>
91+
-->
92+
93+
<!-- Apache Tiles
94+
<dependency>
95+
<groupId>org.apache.tiles</groupId>
96+
<artifactId>tiles-jsp</artifactId>
97+
<version>2.1.3</version>
98+
<exclusions>
99+
<exclusion>
100+
<groupId>commons-logging</groupId>
101+
<artifactId>commons-logging-api</artifactId>
102+
</exclusion>
103+
</exclusions>
104+
</dependency>
105+
-->
106+
107+
<!-- JSR 303 with Hibernate Validator
108+
<dependency>
109+
<groupId>javax.validation</groupId>
110+
<artifactId>validation-api</artifactId>
111+
<version>1.0.0.GA</version>
112+
</dependency>
113+
<dependency>
114+
<groupId>org.hibernate</groupId>
115+
<artifactId>hibernate-validator</artifactId>
116+
<version>4.1.0.Final</version>
117+
</dependency>
118+
-->
119+
120+
<!-- Joda Time Library
121+
<dependency>
122+
<groupId>joda-time</groupId>
123+
<artifactId>joda-time</artifactId>
124+
<version>1.6.2</version>
125+
</dependency>
126+
<dependency>
127+
<groupId>joda-time</groupId>
128+
<artifactId>joda-time-jsptags</artifactId>
129+
<version>1.0.2</version>
130+
<scope>runtime</scope>
131+
</dependency>
132+
-->
133+
134+
<!-- Apache Commons File Upload
135+
<dependency>
136+
<groupId>commons-fileupload</groupId>
137+
<artifactId>commons-fileupload</artifactId>
138+
<version>1.2.2</version>
139+
</dependency>
140+
<dependency>
141+
<groupId>commons-io</groupId>
142+
<artifactId>commons-io</artifactId>
143+
<version>2.0.1</version>
144+
</dependency>
145+
-->
146+
147+
<!-- Jackson JSON Processor
148+
<dependency>
149+
<groupId>com.fasterxml.jackson.core</groupId>
150+
<artifactId>jackson-databind</artifactId>
151+
<version>2.4.3</version>
152+
</dependency>
153+
-->
154+
155+
<!-- Rome Atom+RSS
156+
<dependency>
157+
<groupId>rome</groupId>
158+
<artifactId>rome</artifactId>
159+
<version>1.0</version>
160+
</dependency>
161+
-->
162+
163+
<!-- Test -->
164+
<dependency>
165+
<groupId>junit</groupId>
166+
<artifactId>junit</artifactId>
167+
<version>4.11</version>
168+
<scope>test</scope>
169+
</dependency>
170+
</dependencies>
171+
172+
<build>
173+
<plugins>
174+
<plugin>
175+
<groupId>org.apache.maven.plugins</groupId>
176+
<artifactId>maven-compiler-plugin</artifactId>
177+
<version>2.5.1</version>
178+
<configuration>
179+
<source>${java.version}</source>
180+
<target>${java.version}</target>
181+
</configuration>
182+
</plugin>
183+
<plugin>
184+
<groupId>org.apache.maven.plugins</groupId>
185+
<artifactId>maven-dependency-plugin</artifactId>
186+
<version>2.8</version>
187+
<executions>
188+
<execution>
189+
<id>install</id>
190+
<phase>install</phase>
191+
<goals>
192+
<goal>sources</goal>
193+
</goals>
194+
</execution>
195+
</executions>
196+
</plugin>
197+
<plugin>
198+
<groupId>org.apache.maven.plugins</groupId>
199+
<artifactId>maven-eclipse-plugin</artifactId>
200+
<version>2.8</version>
201+
<configuration>
202+
<downloadSources>true</downloadSources>
203+
<downloadJavadocs>false</downloadJavadocs>
204+
<wtpversion>2.0</wtpversion>
205+
</configuration>
206+
</plugin>
207+
<plugin>
208+
<groupId>org.apache.maven.plugins</groupId>
209+
<artifactId>maven-surefire-plugin</artifactId>
210+
<version>2.12.4</version>
211+
<configuration>
212+
<includes>
213+
<include>**/*Tests.java</include>
214+
<include>**/*Test.java</include>
215+
</includes>
216+
<excludes>
217+
<exclude>**/*Abstract*.java</exclude>
218+
</excludes>
219+
</configuration>
220+
</plugin>
221+
<plugin>
222+
<groupId>org.eclipse.jetty</groupId>
223+
<artifactId>jetty-maven-plugin</artifactId>
224+
<version>${jetty.version}</version>
225+
</plugin>
226+
<plugin>
227+
<groupId>org.codehaus.cargo</groupId>
228+
<artifactId>cargo-maven2-plugin</artifactId>
229+
<version>1.4.7</version>
230+
<configuration>
231+
<configuration>
232+
<properties>
233+
<cargo.servlet.port>8080</cargo.servlet.port>
234+
<cargo.jvmargs>${cargo.container.jvmargs}</cargo.jvmargs>
235+
</properties>
236+
</configuration>
237+
<container>
238+
<containerId>${cargo.container.id}</containerId>
239+
<zipUrlInstaller>
240+
<url>${cargo.container.url}</url>
241+
</zipUrlInstaller>
242+
</container>
243+
</configuration>
244+
</plugin>
245+
<plugin>
246+
<groupId>org.apache.tomcat.maven</groupId>
247+
<artifactId>tomcat7-maven-plugin</artifactId>
248+
<version>2.2</version>
249+
</plugin>
250+
</plugins>
251+
</build>
252+
253+
<profiles>
254+
<profile>
255+
<id>tomcat8</id>
256+
<properties>
257+
<cargo.container.id>tomcat8x</cargo.container.id>
258+
<cargo.container.url>
259+
http://www.eu.apache.org/dist/tomcat/tomcat-8/v8.0.26/bin/apache-tomcat-8.0.26.zip
260+
</cargo.container.url>
261+
</properties>
262+
</profile>
263+
<profile>
264+
<id>jetty8</id>
265+
<build>
266+
<plugins>
267+
<plugin>
268+
<groupId>org.codehaus.cargo</groupId>
269+
<artifactId>cargo-maven2-plugin</artifactId>
270+
<configuration>
271+
<container>
272+
<containerId>jetty8x</containerId>
273+
<type>embedded</type>
274+
</container>
275+
</configuration>
276+
</plugin>
277+
</plugins>
278+
</build>
279+
</profile>
280+
<profile>
281+
<id>debug</id>
282+
<properties>
283+
<cargo.container.jvmargs>
284+
-Xdebug
285+
-Xrunjdwp:transport=dt_socket,address=${cargo.jvm.debug.port},suspend=n,server=y
286+
-Xnoagent
287+
-Djava.compiler=NONE
288+
</cargo.container.jvmargs>
289+
</properties>
290+
</profile>
291+
</profiles>
292+
293+
<repositories>
294+
<repository>
295+
<id>spring-maven-snapshot</id>
296+
<name>Springframework Maven Snapshot Repository</name>
297+
<url>http://repo.spring.io/snapshot</url>
298+
<snapshots>
299+
<enabled>true</enabled>
300+
</snapshots>
301+
</repository>
302+
</repositories>
303+
304+
</project>
305+

SPR-13498/src/main/java/org/springframework/issues/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)