回答編集履歴

2

参考追記

2017/09/06 12:19

投稿

tkmtmkt
tkmtmkt

スコア1800

test CHANGED
@@ -9,3 +9,75 @@
9
9
  [Tomcat/エラー:jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class | Tipi](http://tunes.sakura.ne.jp/tipi/?Tomcat%2F%A5%A8%A5%E9%A1%BC%A1%A7jar%20not%20loaded.%20See%20Servlet%20Spec%202.3%2C%20section%209.7.2.%20Offending%20class)
10
10
 
11
11
 
12
+
13
+
14
+
15
+ **【参考】**
16
+
17
+
18
+
19
+ 以下のスクリプトは、テスト環境にpayara-embeddedを使用しているビルドツリーのgradleのライブラリ依存関係設定です。javaee-apiはコンパイル時のみで使用する設定になっています。
20
+
21
+
22
+
23
+ ```groovy
24
+
25
+ dependencies {
26
+
27
+ //プロダクト用(コンパイル、実行、配布)
28
+
29
+ compile 'org.slf4j:slf4j-api:1.7.25'
30
+
31
+ compile 'com.google.guava:guava:22.0'
32
+
33
+ compile 'com.google.inject:guice:4.1.0'
34
+
35
+ compile 'com.ancientprogramming.fixedformat4j:fixedformat4j:1.2.2'
36
+
37
+
38
+
39
+ //プロダクト用(コンパイル)
40
+
41
+ compileOnly 'javax:javaee-api:7.0'
42
+
43
+ compileOnly 'org.projectlombok:lombok:1.16.16'
44
+
45
+
46
+
47
+ //プロダクト用(実行、配布)
48
+
49
+ runtime 'ch.qos.logback:logback-classic:1.2.3'
50
+
51
+
52
+
53
+ //テスト用(コンパイル、実行)
54
+
55
+ testCompile 'junit:junit:4.12'
56
+
57
+ testCompile 'org.assertj:assertj-core:3.8.0'
58
+
59
+ testCompile 'org.mockito:mockito-core:2.8.9'
60
+
61
+ testCompile 'org.jboss.arquillian.junit:arquillian-junit-container:1.1.13.Final'
62
+
63
+ testCompile 'org.jboss.arquillian.container:arquillian-glassfish-embedded-3.1:1.0.0.Final'
64
+
65
+
66
+
67
+ //テスト用(コンパイル)
68
+
69
+ testCompileOnly 'javax:javaee-api:7.0'
70
+
71
+
72
+
73
+ //テスト用(実行)
74
+
75
+ testRuntime 'fish.payara.api:payara-api:4.1.2.172'
76
+
77
+ testRuntime 'fish.payara.extras:payara-embedded-all:4.1.2.172'
78
+
79
+ }
80
+
81
+ ```
82
+
83
+

1

リンク修正

2017/09/06 12:19

投稿

tkmtmkt
tkmtmkt

スコア1800

test CHANGED
@@ -1,7 +1,11 @@
1
- http://tunes.sakura.ne.jp/tipi/?Tomcat%2F%A5%A8%A5%E9%A1%BC%A1%A7jar%20not%20loaded.%20See%20Servlet%20Spec%202.3%2C%20section%209.7.2.%20Offending%20class
1
+ servlet-api.jarはコンパイル時にするだけでwarファイルには含めないものです。
2
+
3
+ 実行時にはtomcatなどのAPサーバのライブラリを使用するようになっています。
2
4
 
3
5
 
4
6
 
5
- servlet-api.jarはコンパイル時にするだけでwarファイルには含めないものです。
6
7
 
7
- 実行時にはtomcatなどのAPサーバのライブラリを使用するようになっています。
8
+
9
+ [Tomcat/エラー:jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class | Tipi](http://tunes.sakura.ne.jp/tipi/?Tomcat%2F%A5%A8%A5%E9%A1%BC%A1%A7jar%20not%20loaded.%20See%20Servlet%20Spec%202.3%2C%20section%209.7.2.%20Offending%20class)
10
+
11
+