Pārlūkot izejas kodu

Port build to SBT

Johan Östling 10 gadus atpakaļ
vecāks
revīzija
cd7329eae3
6 mainītis faili ar 127 papildinājumiem un 365 dzēšanām
  1. 3
    1
      .travis.yml
  2. 13
    3
      README.md
  3. 52
    0
      build.sbt
  4. 0
    361
      pom.xml
  5. 56
    0
      project/Dependencies.scala
  6. 3
    0
      project/plugins.sbt

+ 3
- 1
.travis.yml Parādīt failu

@@ -1,3 +1,5 @@
1
-language: java
1
+language: scala
2
+scala:
3
+  - 2.11.8
2 4
 jdk:
3 5
   - oraclejdk8

+ 13
- 3
README.md Parādīt failu

@@ -1,7 +1,17 @@
1
-# DDDSample
2
-This is the new home of the original DDD Sample app hosted at SourceForge. 
1
+# DDDSample (scala port)
3 2
 
4
-Our intention is to move everything from SourceForge to GitHub in due time while starting upgrading both the technical aspects as well as the DDD aspects of the DDD Sample.
3
+This is an ongoing project to port the original DDD Sample app to Scala.
4
+
5
+Build with [SBT](http://www.scala-sbt.org/)
6
+
7
+## Automatic code reloading
8
+
9
+SBT allows for compilation and server restart when source files change:
10
+
11
+```bash
12
+$ sbt
13
+> ~;jetty:stop;jetty:start
14
+```
5 15
 
6 16
 Discussion group: https://groups.google.com/forum/#!forum/dddsample
7 17
 

+ 52
- 0
build.sbt Parādīt failu

@@ -0,0 +1,52 @@
1
+
2
+import Libraries._
3
+
4
+scalaVersion := "2.11.8"
5
+
6
+enablePlugins(JettyPlugin)
7
+
8
+libraryDependencies ++= Seq(
9
+  junit,
10
+
11
+  springWebmvc,
12
+  springTx,
13
+  springJdbc,
14
+  springJms,
15
+  springOrm,
16
+  springWeb,
17
+  springTest,
18
+
19
+  thymeleaf,
20
+
21
+  hibernate,
22
+
23
+  commonsCollections,
24
+  commonsLang,
25
+  commonsIo,
26
+  commonsDbcp,
27
+
28
+  slf4jlog4j,
29
+  slf4jjcl,
30
+  slf4japi,
31
+
32
+  javassist,
33
+
34
+  hsqldb,
35
+
36
+  servletApi,
37
+
38
+  taglibs,
39
+
40
+  jstl,
41
+
42
+  sitemesh,
43
+
44
+  activeMQ,
45
+
46
+  xbeanSpring,
47
+
48
+  easyMock,
49
+
50
+  cxfFrontend,
51
+  cxfHttp
52
+)

+ 0
- 361
pom.xml Parādīt failu

@@ -1,361 +0,0 @@
1
-<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">
2
-  <modelVersion>4.0.0</modelVersion>
3
-  <groupId>se.citerus</groupId>
4
-  <artifactId>dddsample</artifactId>
5
-  <packaging>war</packaging>
6
-  <name>DDDSample</name>
7
-  <version>2.0-SNAPSHOT</version>
8
-  <description>This application shows a few key concepts of
9
-    Domain Driven Design implemented in Enterprise Java.
10
-  </description>
11
-  <url>http://dddsample.sourceforge.net</url>
12
-  <distributionManagement>
13
-    <site>
14
-      <id>sf</id>
15
-      <url>scp://shell.sf.net/home/groups/d/dd/dddsample/htdocs/preview</url>
16
-    </site>
17
-  </distributionManagement>
18
-  <ciManagement />
19
-  <developers>
20
-    <developer>
21
-      <id>eric_evans</id>
22
-      <name>Eric Evans</name>
23
-      <organization>Domain Language, Inc.</organization>
24
-      <organizationUrl>http://www.domainlanguage.com</organizationUrl>
25
-      <timezone>-8</timezone>
26
-    </developer>
27
-    <developer>
28
-      <id>peba</id>
29
-      <name>Peter Backlund</name>
30
-      <organization>Citerus</organization>
31
-      <organizationUrl>http://www.citerus.se</organizationUrl>
32
-      <timezone>+1</timezone>
33
-    </developer>
34
-    <developer>
35
-      <id>patrikfr</id>
36
-      <name>Patrik Fredriksson</name>
37
-      <organization>Citerus</organization>
38
-      <organizationUrl>http://www.citerus.se</organizationUrl>
39
-      <timezone>+1</timezone>
40
-    </developer>
41
-    <developer>
42
-      <id>jeham</id>
43
-      <name>Jesper Hammarback</name>
44
-      <organization>Citerus</organization>
45
-      <organizationUrl>http://www.citerus.se</organizationUrl>
46
-      <timezone>+1</timezone>
47
-    </developer>
48
-    <developer>
49
-      <id>jorgen_falk</id>
50
-      <name>Jorgen Falk</name>
51
-      <organization>Citerus</organization>
52
-      <organizationUrl>http://www.citerus.se</organizationUrl>
53
-      <timezone>+1</timezone>
54
-    </developer>
55
-  </developers>
56
-  <licenses>
57
-    <license>
58
-      <name>MIT</name>
59
-      <url>http://www.opensource.org/licenses/mit-license.php</url>
60
-      <distribution>repo</distribution>
61
-    </license>
62
-  </licenses>
63
-  <scm>
64
-    <developerConnection>scm:git:https://github.com/citerus/dddsample-core</developerConnection>
65
-    <url>https://github.com/citerus/dddsample-core</url>
66
-  </scm>
67
-  <properties>
68
-    <java.version>1.8</java.version>
69
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
70
-    <!-- Dependencies -->
71
-    <spring.version>4.2.1.RELEASE</spring.version>
72
-    <cxf.version>3.0.3</cxf.version>
73
-    <!-- Plugin versions -->
74
-    <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
75
-    <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
76
-    <maven-assembly-plugin.version>2.5.5</maven-assembly-plugin.version>
77
-  </properties>
78
-  <build>
79
-    <plugins>
80
-      <!-- Compiler -->
81
-      <plugin>
82
-        <groupId>net.alchim31.maven</groupId>
83
-        <artifactId>scala-maven-plugin</artifactId>
84
-        <version>3.2.1</version>
85
-        <executions>
86
-          <execution>
87
-            <id>scala-compile-first</id>
88
-            <phase>process-resources</phase>
89
-            <goals>
90
-              <goal>add-source</goal>
91
-              <goal>compile</goal>
92
-            </goals>
93
-          </execution>
94
-          <execution>
95
-            <id>scala-test-compile</id>
96
-            <phase>process-test-resources</phase>
97
-            <goals>
98
-              <goal>testCompile</goal>
99
-            </goals>
100
-          </execution>
101
-        </executions>
102
-      </plugin>
103
-      <plugin>
104
-        <artifactId>maven-compiler-plugin</artifactId>
105
-        <version>${maven-compiler-plugin.version}</version>
106
-        <configuration>
107
-          <source>${java.version}</source>
108
-          <target>${java.version}</target>
109
-          <encoding>${project.build.sourceEncoding}</encoding>
110
-        </configuration>
111
-        <executions>
112
-          <execution>
113
-            <phase>compile</phase>
114
-            <goals>
115
-              <goal>compile</goal>
116
-            </goals>
117
-          </execution>
118
-        </executions>
119
-      </plugin>
120
-      <!-- Jetty plugin -->
121
-      <plugin>
122
-        <groupId>org.mortbay.jetty</groupId>
123
-        <artifactId>maven-jetty-plugin</artifactId>
124
-      </plugin>
125
-
126
-      <plugin>
127
-        <artifactId>maven-jar-plugin</artifactId>
128
-        <version>${maven-jar-plugin.version}</version>
129
-        <executions>
130
-
131
-          <!-- Package booking service facade classes in separate jar -->
132
-          <execution>
133
-            <id>package-booking-facade</id>
134
-            <phase>package</phase>
135
-            <goals>
136
-              <goal>jar</goal>
137
-            </goals>
138
-            <configuration>
139
-              <classifier>booking-facade</classifier>
140
-              <includes>
141
-                <include>**/se/citerus/dddsample/interfaces/booking/facade/*.class</include>
142
-                <include>**/se/citerus/dddsample/interfaces/booking/facade/dto/*.class</include>
143
-              </includes>
144
-              <archive>
145
-                <addMavenDescriptor>false</addMavenDescriptor>
146
-              </archive>
147
-            </configuration>
148
-          </execution>
149
-        </executions>
150
-      </plugin>
151
-
152
-      <!-- Assembly -->
153
-      <plugin>
154
-        <artifactId>maven-assembly-plugin</artifactId>
155
-        <version>${maven-assembly-plugin.version}</version>
156
-        <configuration>
157
-          <descriptorRefs>
158
-            <descriptorRef>src</descriptorRef>
159
-          </descriptorRefs>
160
-        </configuration>
161
-      </plugin>
162
-
163
-    </plugins>
164
-  </build>
165
-  <dependencies>
166
-    <dependency>
167
-      <groupId>org.scala-lang</groupId>
168
-      <artifactId>scala-library</artifactId>
169
-      <version>2.11.8</version>
170
-    </dependency>
171
-    <dependency>
172
-      <groupId>junit</groupId>
173
-      <artifactId>junit</artifactId>
174
-      <version>4.12</version>
175
-      <scope>test</scope>
176
-    </dependency>
177
-    <dependency>
178
-      <groupId>org.springframework</groupId>
179
-      <artifactId>spring-webmvc</artifactId>
180
-      <version>${spring.version}</version>
181
-    </dependency>
182
-    <dependency>
183
-      <groupId>org.springframework</groupId>
184
-      <artifactId>spring-tx</artifactId>
185
-      <version>${spring.version}</version>
186
-    </dependency>
187
-    <dependency>
188
-      <groupId>org.springframework</groupId>
189
-      <artifactId>spring-jdbc</artifactId>
190
-      <version>${spring.version}</version>
191
-    </dependency>
192
-    <dependency>
193
-      <groupId>org.springframework</groupId>
194
-      <artifactId>spring-jms</artifactId>
195
-      <version>${spring.version}</version>
196
-    </dependency>
197
-    <dependency>
198
-      <groupId>org.springframework</groupId>
199
-      <artifactId>spring-orm</artifactId>
200
-      <version>${spring.version}</version>
201
-    </dependency>
202
-    <dependency>
203
-      <groupId>org.springframework</groupId>
204
-      <artifactId>spring-web</artifactId>
205
-      <version>${spring.version}</version>
206
-    </dependency>
207
-    <dependency>
208
-      <groupId>org.springframework</groupId>
209
-      <artifactId>spring-test</artifactId>
210
-      <version>${spring.version}</version>
211
-      <scope>test</scope>
212
-    </dependency>
213
-      <dependency>
214
-          <groupId>org.thymeleaf</groupId>
215
-          <artifactId>thymeleaf-spring4</artifactId>
216
-          <version>2.1.4.RELEASE</version>
217
-      </dependency>
218
-      <dependency>
219
-      <groupId>org.hibernate</groupId>
220
-      <artifactId>hibernate-core</artifactId>
221
-      <version>4.3.5.Final</version>
222
-      <!-- God, what is it with Java and logging frameworks... http://forum.hibernate.org/viewtopic.php?p=2401380 -->
223
-      <exclusions>
224
-        <exclusion>
225
-          <groupId>org.slf4j</groupId>
226
-          <artifactId>slf4j-api</artifactId>
227
-        </exclusion>
228
-      </exclusions>
229
-    </dependency>
230
-      <dependency>
231
-          <groupId>commons-collections</groupId>
232
-          <artifactId>commons-collections</artifactId>
233
-          <version>3.2.1</version>
234
-      </dependency>
235
-      <dependency>
236
-      <groupId>org.slf4j</groupId>
237
-      <artifactId>slf4j-log4j12</artifactId>
238
-      <version>1.5.6</version>
239
-    </dependency>
240
-    <dependency>
241
-      <groupId>org.slf4j</groupId>
242
-      <artifactId>jcl-over-slf4j</artifactId>
243
-      <version>1.5.6</version>
244
-    </dependency>
245
-    <dependency>
246
-      <groupId>org.slf4j</groupId>
247
-      <artifactId>slf4j-api</artifactId>
248
-      <version>1.5.6</version>
249
-    </dependency>
250
-    <dependency>
251
-      <groupId>javassist</groupId>
252
-      <artifactId>javassist</artifactId>
253
-      <version>3.8.0.GA</version>
254
-    </dependency>
255
-    <dependency>
256
-      <groupId>commons-lang</groupId>
257
-      <artifactId>commons-lang</artifactId>
258
-      <version>2.3</version>
259
-    </dependency>
260
-    <dependency>
261
-      <groupId>commons-io</groupId>
262
-      <artifactId>commons-io</artifactId>
263
-      <version>1.3.1</version>
264
-    </dependency>
265
-    <dependency>
266
-      <groupId>commons-dbcp</groupId>
267
-      <artifactId>commons-dbcp</artifactId>
268
-      <version>1.2.2</version>
269
-    </dependency>
270
-    <dependency>
271
-      <groupId>org.hsqldb</groupId>
272
-      <artifactId>hsqldb</artifactId>
273
-      <version>2.3.3</version>
274
-    </dependency>
275
-      <dependency>
276
-          <groupId>javax.servlet</groupId>
277
-          <artifactId>javax.servlet-api</artifactId>
278
-          <version>3.1.0</version>
279
-          <scope>provided</scope>
280
-      </dependency>
281
-      <dependency>
282
-      <groupId>taglibs</groupId>
283
-      <artifactId>standard</artifactId>
284
-      <version>1.1.2</version>
285
-    </dependency>
286
-    <dependency>
287
-      <groupId>javax.servlet</groupId>
288
-      <artifactId>jstl</artifactId>
289
-      <version>1.1.2</version>
290
-    </dependency>
291
-    <dependency>
292
-      <groupId>opensymphony</groupId>
293
-      <artifactId>sitemesh</artifactId>
294
-      <version>2.3</version>
295
-      <scope>runtime</scope>
296
-    </dependency>
297
-    <dependency>
298
-      <groupId>org.apache.activemq</groupId>
299
-      <artifactId>activemq-core</artifactId>
300
-      <version>5.2.0</version>
301
-      <exclusions>
302
-        <exclusion>
303
-          <groupId>commons-logging</groupId>
304
-          <artifactId>commons-logging-api</artifactId>
305
-        </exclusion>
306
-      </exclusions>
307
-    </dependency>
308
-    <dependency>
309
-      <groupId>org.apache.xbean</groupId>
310
-      <artifactId>xbean-spring</artifactId>
311
-      <version>3.4.3</version>
312
-    </dependency>
313
-    <dependency>
314
-      <groupId>org.easymock</groupId>
315
-      <artifactId>easymock</artifactId>
316
-      <version>2.3</version>
317
-      <scope>test</scope>
318
-    </dependency>
319
-    <dependency>
320
-      <groupId>org.apache.cxf</groupId>
321
-      <artifactId>cxf-rt-frontend-jaxws</artifactId>
322
-      <version>${cxf.version}</version>
323
-    </dependency>
324
-    <dependency>
325
-      <groupId>org.apache.cxf</groupId>
326
-      <artifactId>cxf-rt-transports-http</artifactId>
327
-      <version>${cxf.version}</version>
328
-    </dependency>
329
-  </dependencies>
330
-
331
-  <reporting>
332
-    <plugins>
333
-      <!-- Javadoc -->
334
-      <plugin>
335
-        <artifactId>maven-javadoc-plugin</artifactId>
336
-      </plugin>
337
-      <!-- Source code cross reference -->
338
-      <plugin>
339
-        <artifactId>maven-jxr-plugin</artifactId>
340
-      </plugin>
341
-      <!-- Test report -->
342
-      <plugin>
343
-        <artifactId>maven-surefire-report-plugin</artifactId>
344
-      </plugin>
345
-      <!-- Test coverage -->
346
-      <plugin>
347
-        <groupId>org.codehaus.mojo</groupId>
348
-        <artifactId>cobertura-maven-plugin</artifactId>
349
-      </plugin>
350
-      <!-- CheckStyle report -->
351
-      <plugin>
352
-        <artifactId>maven-checkstyle-plugin</artifactId>
353
-        <configuration>
354
-          <configLocation>src/main/config/checkstyle.xml</configLocation>
355
-          <!-- Java source code generated from WSDL -->
356
-          <excludes>**/com/aggregator/**/*</excludes>
357
-        </configuration>
358
-      </plugin>
359
-    </plugins>
360
-  </reporting>
361
-</project>

+ 56
- 0
project/Dependencies.scala Parādīt failu

@@ -0,0 +1,56 @@
1
+import sbt._
2
+
3
+object Versions {
4
+  val spring = "4.2.1.RELEASE"
5
+  val cxf = "3.0.3"
6
+  val thymeleaf = "2.1.4.RELEASE"
7
+  val hibernate = "4.3.5.Final"
8
+  val slf4j = "1.7.21"
9
+}
10
+
11
+object Libraries {
12
+  val junit = "com.novocode" % "junit-interface" % "0.11" % "test" // JUnit runner for SBT, includes JUnit dependency
13
+
14
+  val springWebmvc = "org.springframework" % "spring-webmvc" % Versions.spring
15
+  val springTx = "org.springframework" % "spring-tx" % Versions.spring
16
+  val springJdbc = "org.springframework" % "spring-jdbc" % Versions.spring
17
+  val springJms = "org.springframework" % "spring-jms" % Versions.spring
18
+  val springOrm = "org.springframework" % "spring-orm" % Versions.spring
19
+  val springWeb = "org.springframework" % "spring-web" % Versions.spring
20
+  val springTest = "org.springframework" % "spring-test" % Versions.spring % "test"
21
+
22
+  val thymeleaf = "org.thymeleaf" % "thymeleaf-spring4" % Versions.thymeleaf
23
+
24
+  val hibernate = "org.hibernate" % "hibernate-core" % Versions.hibernate exclude("org.slf4j", "slf4j-api")
25
+
26
+  val commonsCollections = "commons-collections" % "commons-collections" % "3.2.1"
27
+  val commonsLang = "commons-lang" % "commons-lang" % "2.3"
28
+  val commonsIo = "commons-io" % "commons-io" % "1.3.1"
29
+  val commonsDbcp = "commons-dbcp" % "commons-dbcp" % "1.2.2"
30
+
31
+  val slf4jlog4j = "org.slf4j" % "slf4j-log4j12" % Versions.slf4j
32
+  val slf4jjcl = "org.slf4j" % "jcl-over-slf4j" % Versions.slf4j
33
+  val slf4japi = "org.slf4j" % "slf4j-api" % Versions.slf4j
34
+
35
+  val javassist = "javassist" % "javassist" % "3.8.0.GA"
36
+
37
+  val hsqldb = "org.hsqldb" % "hsqldb" % "2.3.3"
38
+
39
+  val servletApi = "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided"
40
+
41
+  val taglibs = "taglibs" % "standard" % "1.1.2"
42
+
43
+  val jstl = "javax.servlet" % "jstl" % "1.1.2"
44
+
45
+  val sitemesh = "opensymphony" % "sitemesh" % "2.3" % "runtime"
46
+
47
+  val activeMQ = "org.apache.activemq" % "activemq-core" % "5.2.0" exclude("commons-logging", "commons-logging-api")
48
+
49
+  val xbeanSpring = "org.apache.xbean" % "xbean-spring" % "3.4.3"
50
+
51
+  val easyMock = "org.easymock" % "easymock" % "2.3" % "test"
52
+
53
+  val cxfFrontend = "org.apache.cxf" % "cxf-rt-frontend-jaxws" % Versions.cxf
54
+  val cxfHttp = "org.apache.cxf" % "cxf-rt-transports-http" % Versions.cxf
55
+
56
+}

+ 3
- 0
project/plugins.sbt Parādīt failu

@@ -0,0 +1,3 @@
1
+
2
+addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "2.0.5")
3
+