├── Dockerfile
├── README.md
├── pom.xml
├── server
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── example
│ │ └── Greeter.java
│ ├── site
│ └── apt
│ │ └── index.apt
│ └── test
│ └── java
│ └── com
│ └── example
│ └── TestGreeter.java
└── webapp
├── pom.xml
└── src
└── main
└── webapp
├── WEB-INF
└── web.xml
└── index.jsp
/Dockerfile:
--------------------------------------------------------------------------------
1 | # Pull base image
2 | From tomcat:8-jre8
3 |
4 | # Maintainer
5 | MAINTAINER "valaxytech@gmail.com"
6 | COPY ./webapp.war /usr/local/tomcat/webapps
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # maven-project
2 |
3 | Simple Maven Project
4 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 | 4.0.0
5 |
6 | com.example.maven-project
7 | maven-project
8 | pom
9 | 1.0-SNAPSHOT
10 | Maven Project
11 | Sample Maven project with a working, deployable site.
12 | http://www.example.com
13 |
14 |
15 | utf-8
16 | utf-8
17 |
18 |
19 |
20 | server
21 | webapp
22 |
23 |
24 |
25 |
26 | site-server
27 | Test Project Site
28 | file:///tmp/maven-project-site
29 |
30 |
31 |
32 |
33 |
34 |
35 | maven-compiler-plugin
36 |
37 | 1.6
38 | 1.6
39 |
40 |
41 |
42 |
43 | maven-release-plugin
44 |
45 | true
46 |
47 |
48 |
49 |
50 | maven-site-plugin
51 |
52 |
53 |
54 | maven-checkstyle-plugin
55 |
56 |
57 |
58 | maven-jxr-plugin
59 |
60 |
61 |
62 | maven-javadoc-plugin
63 |
64 |
65 |
66 | maven-pmd-plugin
67 |
68 |
69 |
70 | maven-surefire-report-plugin
71 |
72 |
73 |
74 | org.codehaus.mojo
75 | findbugs-maven-plugin
76 |
77 |
78 |
79 | org.codehaus.mojo
80 | taglist-maven-plugin
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | maven-checkstyle-plugin
91 | 2.8
92 |
93 |
94 |
95 | maven-compiler-plugin
96 | 2.3.2
97 |
98 |
99 |
100 | maven-javadoc-plugin
101 | 2.8
102 |
103 |
104 |
105 | maven-jxr-plugin
106 | 2.3
107 |
108 |
109 |
110 | maven-pmd-plugin
111 | 2.6
112 |
113 |
114 |
115 | maven-project-info-reports-plugin
116 | 2.4
117 |
118 |
119 |
120 | maven-release-plugin
121 | 2.2.1
122 |
123 |
124 |
125 | maven-resources-plugin
126 | 2.5
127 |
128 |
129 |
130 | maven-site-plugin
131 | 3.0
132 |
133 |
134 |
135 | maven-surefire-report-plugin
136 | 2.11
137 |
138 |
139 |
140 | maven-surefire-plugin
141 | 2.11
142 |
143 |
144 |
145 | org.codehaus.mojo
146 | findbugs-maven-plugin
147 | 2.3.3
148 |
149 |
150 |
151 | org.codehaus.mojo
152 | taglist-maven-plugin
153 | 2.4
154 |
155 |
156 |
157 | org.mortbay.jetty
158 | jetty-maven-plugin
159 | 8.0.0.M1
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | javax.servlet
169 | servlet-api
170 | 2.5
171 |
172 |
173 |
174 | javax.servlet.jsp
175 | jsp-api
176 | 2.2
177 |
178 |
179 |
180 | junit
181 | junit-dep
182 | 4.10
183 | test
184 |
185 |
186 |
187 | org.hamcrest
188 | hamcrest-core
189 | 1.2.1
190 | test
191 |
192 |
193 |
194 | org.hamcrest
195 | hamcrest-library
196 | 1.2.1
197 | test
198 |
199 |
200 |
201 | org.mockito
202 | mockito-core
203 | 1.8.5
204 | test
205 |
206 |
207 |
208 |
209 |
210 | scm:git:git@github.com:jleetutorial/maven-project.git
211 | scm:git:git@github.com:jleetutorial/maven-project.git
212 | HEAD
213 | http://github.com/jleetutorial/maven-project
214 |
215 |
216 |
217 | 3.0.3
218 |
219 |
220 |
221 |
--------------------------------------------------------------------------------
/server/pom.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 | 4.0.0
5 |
6 |
7 | com.example.maven-project
8 | maven-project
9 | 1.0-SNAPSHOT
10 | ../pom.xml
11 |
12 |
13 | server
14 | jar
15 | Server
16 | Logic.
17 |
18 |
19 | ${project.artifactId}
20 |
21 |
22 |
23 |
24 | junit
25 | junit-dep
26 | test
27 |
28 |
29 |
30 | org.hamcrest
31 | hamcrest-core
32 | test
33 |
34 |
35 |
36 | org.hamcrest
37 | hamcrest-library
38 | test
39 |
40 |
41 |
42 | org.mockito
43 | mockito-core
44 | test
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/server/src/main/java/com/example/Greeter.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | /**
4 | * This is a class.
5 | */
6 | public class Greeter {
7 |
8 | /**
9 | * This is a constructor.
10 | */
11 | public Greeter() {
12 |
13 | }
14 |
15 | //TODO: Add javadoc comment
16 | public String greet(String someone) {
17 | return String.format("Hello, %s!", someone);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/server/src/site/apt/index.apt:
--------------------------------------------------------------------------------
1 | Headline
2 |
3 | Content
4 |
--------------------------------------------------------------------------------
/server/src/test/java/com/example/TestGreeter.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import org.junit.Before;
4 | import org.junit.Test;
5 |
6 | import static org.hamcrest.CoreMatchers.is;
7 | import static org.hamcrest.Matchers.greaterThan;
8 | import static org.junit.Assert.assertThat;
9 | import static org.junit.matchers.JUnitMatchers.containsString;
10 |
11 | public class TestGreeter {
12 |
13 | private Greeter greeter;
14 |
15 | @Before
16 | public void setup() {
17 | greeter = new Greeter();
18 | }
19 |
20 | @Test
21 | public void greetShouldIncludeTheOneBeingGreeted() {
22 | String someone = "World";
23 |
24 | assertThat(greeter.greet(someone), containsString(someone));
25 | }
26 |
27 | @Test
28 | public void greetShouldIncludeGreetingPhrase() {
29 | String someone = "World";
30 |
31 | assertThat(greeter.greet(someone).length(), is(greaterThan(someone.length())));
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/webapp/pom.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 | 4.0.0
5 |
6 |
7 | com.example.maven-project
8 | maven-project
9 | 1.0-SNAPSHOT
10 | ../pom.xml
11 |
12 |
13 | webapp
14 | war
15 | Webapp
16 | Webapp.
17 |
18 |
19 | ${project.artifactId}
20 |
21 |
22 |
23 | org.mortbay.jetty
24 | jetty-maven-plugin
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | javax.servlet
33 | servlet-api
34 | provided
35 |
36 |
37 |
38 | javax.servlet.jsp
39 | jsp-api
40 | provided
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/webapp/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | Webapp
7 |
17 |
18 |
--------------------------------------------------------------------------------
/webapp/src/main/webapp/index.jsp:
--------------------------------------------------------------------------------
1 |
Hello, Welcome to Valaxy Technologies !!!
2 |
3 |
--------------------------------------------------------------------------------