Skip to content

Commit b207616

Browse files
author
Mathieu Carbou
committed
Ability to start webapp directly from IDE + GWT plugin inplace
1 parent cb3134d commit b207616

File tree

9 files changed

+184
-175
lines changed

9 files changed

+184
-175
lines changed

core/pom.xml

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,10 @@
1919

2020
<dependencies>
2121
<dependency>
22-
<groupId>javax.servlet</groupId>
23-
<artifactId>servlet-api</artifactId>
24-
<scope>provided</scope>
25-
</dependency>
26-
<dependency>
27-
<groupId>org.eclipse.jetty</groupId>
28-
<artifactId>jetty-client</artifactId>
29-
<scope>provided</scope>
30-
</dependency>
31-
<dependency>
32-
<groupId>org.eclipse.jetty</groupId>
33-
<artifactId>jetty-continuation</artifactId>
34-
<scope>provided</scope>
35-
</dependency>
36-
<dependency>
37-
<groupId>org.eclipse.jetty</groupId>
38-
<artifactId>jetty-io</artifactId>
39-
<scope>provided</scope>
40-
</dependency>
41-
<dependency>
42-
<groupId>org.eclipse.jetty</groupId>
43-
<artifactId>jetty-server</artifactId>
44-
<scope>provided</scope>
45-
</dependency>
46-
<dependency>
47-
<groupId>org.eclipse.jetty</groupId>
48-
<artifactId>jetty-util</artifactId>
49-
<scope>provided</scope>
50-
</dependency>
51-
<dependency>
52-
<groupId>org.eclipse.jetty</groupId>
53-
<artifactId>jetty-websocket</artifactId>
22+
<groupId>org.testatoo.container</groupId>
23+
<artifactId>testatoo-container-jetty</artifactId>
5424
<scope>provided</scope>
5525
</dependency>
5626
</dependencies>
27+
5728
</project>

samples/broadcast/pom.xml

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,11 @@
2222
<groupId>com.glines.socketio</groupId>
2323
<artifactId>socketio-core</artifactId>
2424
</dependency>
25+
<dependency>
26+
<groupId>org.testatoo.container</groupId>
27+
<artifactId>testatoo-container-jetty</artifactId>
28+
<scope>provided</scope>
29+
</dependency>
2530
</dependencies>
2631

27-
<build>
28-
<plugins>
29-
<plugin>
30-
<artifactId>maven-war-plugin</artifactId>
31-
<version>2.1.1</version>
32-
<configuration>
33-
<!-- Exclude the jetty-util jar that gets included because the scope has to be "compile"-->
34-
<packagingExcludes>WEB-INF/lib/jetty-util*.jar</packagingExcludes>
35-
</configuration>
36-
</plugin>
37-
<plugin>
38-
<groupId>org.mortbay.jetty</groupId>
39-
<artifactId>jetty-maven-plugin</artifactId>
40-
<version>7.1.6.v20100715</version>
41-
<configuration>
42-
<systemProperties>
43-
<systemProperty>
44-
<name>org.eclipse.jetty.util.log.DEBUG</name>
45-
<value>true</value>
46-
</systemProperty>
47-
</systemProperties>
48-
</configuration>
49-
<dependencies>
50-
<dependency>
51-
<groupId>org.eclipse.jetty</groupId>
52-
<artifactId>jetty-util</artifactId>
53-
<version>7.1.6.v20100715</version>
54-
<scope>runtime</scope>
55-
</dependency>
56-
</dependencies>
57-
</plugin>
58-
</plugins>
59-
</build>
6032
</project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* The MIT License
3+
* Copyright (c) 2010 Tad Glines
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
22+
*/
23+
import org.testatoo.container.ContainerRunner;
24+
25+
/**
26+
* Just run this class and go to http://127.0.0.1:8080/
27+
*
28+
* @author Mathieu Carbou
29+
*/
30+
public final class StartSampleBroadcast {
31+
public static void main(String... args) throws Exception {
32+
// ContainerRunner could be directly run from a launcher with argument.
33+
// See ContainerRunner --help foe help
34+
ContainerRunner.main("-container", "jetty");
35+
}
36+
}

samples/chat-gwt/pom.xml

Lines changed: 22 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,13 @@
1717
<name>Socket.IO Sample Chat GWT</name>
1818
<description>${project.name}</description>
1919

20-
<dependencies>
21-
<dependency>
22-
<groupId>com.glines.socketio</groupId>
23-
<artifactId>socketio-core</artifactId>
24-
</dependency>
25-
<dependency>
26-
<groupId>com.glines.socketio.extension</groupId>
27-
<artifactId>socketio-gwt</artifactId>
28-
</dependency>
29-
<dependency>
30-
<groupId>com.google.gwt</groupId>
31-
<artifactId>gwt-user</artifactId>
32-
<version>2.1.1</version>
33-
<scope>provided</scope>
34-
</dependency>
35-
</dependencies>
36-
3720
<build>
38-
<resources>
39-
<resource>
40-
<directory>src/main/resources</directory>
41-
</resource>
42-
<resource>
43-
<targetPath>com/glines/socketio/sample/gwtchat</targetPath>
44-
<directory>src/main/webapp</directory>
45-
<includes>
46-
<include>gwtchat.html</include>
47-
</includes>
48-
</resource>
49-
</resources>
5021
<plugins>
5122
<plugin>
5223
<groupId>org.codehaus.mojo</groupId>
5324
<artifactId>gwt-maven-plugin</artifactId>
5425
<configuration>
26+
<inplace>true</inplace>
5527
<logLevel>INFO</logLevel>
5628
<style>PRETTY</style>
5729
<enableAssertions>true</enableAssertions>
@@ -72,28 +44,28 @@
7244
</execution>
7345
</executions>
7446
</plugin>
75-
<plugin>
76-
<artifactId>maven-war-plugin</artifactId>
77-
<version>2.1.1</version>
78-
<configuration>
79-
<!-- Exclude the jetty-util jar that gets included because the scope has to be "compile"-->
80-
<packagingExcludes>WEB-INF/lib/jetty-util*.jar</packagingExcludes>
81-
</configuration>
82-
</plugin>
83-
<plugin>
84-
<groupId>org.mortbay.jetty</groupId>
85-
<artifactId>jetty-maven-plugin</artifactId>
86-
<version>7.1.6.v20100715</version>
87-
<configuration>
88-
<systemProperties>
89-
<systemProperty>
90-
<name>org.eclipse.jetty.util.log.DEBUG</name>
91-
<value>true</value>
92-
</systemProperty>
93-
</systemProperties>
94-
</configuration>
95-
</plugin>
9647
</plugins>
9748
</build>
9849

50+
<dependencies>
51+
<dependency>
52+
<groupId>com.glines.socketio</groupId>
53+
<artifactId>socketio-core</artifactId>
54+
</dependency>
55+
<dependency>
56+
<groupId>com.glines.socketio.extension</groupId>
57+
<artifactId>socketio-gwt</artifactId>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.testatoo.container</groupId>
61+
<artifactId>testatoo-container-jetty</artifactId>
62+
<scope>provided</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>com.google.gwt</groupId>
66+
<artifactId>gwt-user</artifactId>
67+
<scope>provided</scope>
68+
</dependency>
69+
</dependencies>
70+
9971
</project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* The MIT License
3+
* Copyright (c) 2010 Tad Glines
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
22+
*/
23+
import org.testatoo.container.ContainerRunner;
24+
25+
/**
26+
* Just run this class and go to http://127.0.0.1:8080/
27+
*
28+
* @author Mathieu Carbou
29+
*/
30+
public final class StartSampleChatGWT {
31+
public static void main(String... args) throws Exception {
32+
// ContainerRunner could be directly run from a launcher with argument.
33+
// See ContainerRunner --help foe help
34+
ContainerRunner.main("-container", "jetty");
35+
}
36+
}

samples/chat/pom.xml

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,11 @@
2222
<groupId>com.glines.socketio</groupId>
2323
<artifactId>socketio-core</artifactId>
2424
</dependency>
25+
<dependency>
26+
<groupId>org.testatoo.container</groupId>
27+
<artifactId>testatoo-container-jetty</artifactId>
28+
<scope>provided</scope>
29+
</dependency>
2530
</dependencies>
2631

27-
<build>
28-
<resources>
29-
<resource>
30-
<targetPath>com/glines/socketio/sample/chat</targetPath>
31-
<directory>src/main/webapp</directory>
32-
<includes>
33-
<include>chat.html</include>
34-
<include>json.js</include>
35-
</includes>
36-
</resource>
37-
</resources>
38-
<plugins>
39-
<plugin>
40-
<artifactId>maven-war-plugin</artifactId>
41-
<version>2.1.1</version>
42-
<configuration>
43-
<!-- Exclude the jetty-util jar that gets included because the scope has to be "compile"-->
44-
<packagingExcludes>WEB-INF/lib/jetty-util*.jar</packagingExcludes>
45-
</configuration>
46-
</plugin>
47-
<plugin>
48-
<groupId>org.mortbay.jetty</groupId>
49-
<artifactId>jetty-maven-plugin</artifactId>
50-
<version>7.1.6.v20100715</version>
51-
<configuration>
52-
<systemProperties>
53-
<systemProperty>
54-
<name>org.eclipse.jetty.util.log.DEBUG</name>
55-
<value>true</value>
56-
</systemProperty>
57-
</systemProperties>
58-
</configuration>
59-
</plugin>
60-
</plugins>
61-
</build>
6232
</project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* The MIT License
3+
* Copyright (c) 2010 Tad Glines
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
22+
*/
23+
import org.testatoo.container.ContainerRunner;
24+
25+
/**
26+
* Just run this class and go to http://127.0.0.1:8080/
27+
*
28+
* @author Mathieu Carbou
29+
*/
30+
public final class StartSampleChat {
31+
public static void main(String... args) throws Exception {
32+
// ContainerRunner could be directly run from a launcher with argument.
33+
// See ContainerRunner --help foe help
34+
ContainerRunner.main("-container", "jetty");
35+
}
36+
}

samples/echo/pom.xml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,11 @@
2222
<groupId>com.glines.socketio</groupId>
2323
<artifactId>socketio-core</artifactId>
2424
</dependency>
25+
<dependency>
26+
<groupId>org.testatoo.container</groupId>
27+
<artifactId>testatoo-container-jetty</artifactId>
28+
<scope>provided</scope>
29+
</dependency>
2530
</dependencies>
2631

27-
<build>
28-
<plugins>
29-
<plugin>
30-
<artifactId>maven-war-plugin</artifactId>
31-
<version>2.1.1</version>
32-
<configuration>
33-
<!-- Exclude the jetty-util jar that gets included because the scope has to be "compile"-->
34-
<packagingExcludes>WEB-INF/lib/jetty-util*.jar</packagingExcludes>
35-
</configuration>
36-
</plugin>
37-
<plugin>
38-
<groupId>org.mortbay.jetty</groupId>
39-
<artifactId>jetty-maven-plugin</artifactId>
40-
<version>7.1.6.v20100715</version>
41-
<configuration>
42-
<systemProperties>
43-
<systemProperty>
44-
<name>org.eclipse.jetty.util.log.DEBUG</name>
45-
<value>true</value>
46-
</systemProperty>
47-
</systemProperties>
48-
</configuration>
49-
</plugin>
50-
</plugins>
51-
</build>
5232
</project>

0 commit comments

Comments
 (0)