質問編集履歴

1

pom.xml、コードの追加をしました。

2021/09/19 23:31

投稿

taketake08
taketake08

スコア16

test CHANGED
@@ -1 +1 @@
1
- Visual Studio Codeでの依存性追加の方法
1
+ Visual Studio Codeでのpom.xmlへの依存性追加の方法
test CHANGED
@@ -12,6 +12,222 @@
12
12
 
13
13
 
14
14
 
15
+ mavenのquick-startでプロジェクトを作成しています。
16
+
17
+ 下記pom.xmlとコードです。
18
+
19
+
20
+
21
+ 【pom.xml】
22
+
23
+ ```
24
+
25
+ <?xml version="1.0" encoding="UTF-8"?>
26
+
27
+
28
+
29
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
30
+
31
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
32
+
33
+ <modelVersion>4.0.0</modelVersion>
34
+
35
+
36
+
37
+ <groupId>com.example</groupId>
38
+
39
+ <artifactId>jackson</artifactId>
40
+
41
+ <version>1.0.0</version>
42
+
43
+
44
+
45
+ <name>jackson</name>
46
+
47
+ <!-- FIXME change it to the project's website -->
48
+
49
+ <url>http://www.example.com</url>
50
+
51
+
52
+
53
+ <properties>
54
+
55
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
56
+
57
+ <maven.compiler.source>1.7</maven.compiler.source>
58
+
59
+ <maven.compiler.target>1.7</maven.compiler.target>
60
+
61
+ </properties>
62
+
63
+
64
+
65
+ <dependencies>
66
+
67
+ <dependency>
68
+
69
+ <groupId>junit</groupId>
70
+
71
+ <artifactId>junit</artifactId>
72
+
73
+ <version>4.11</version>
74
+
75
+ <scope>test</scope>
76
+
77
+ </dependency>
78
+
79
+ <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
80
+
81
+ <dependency>
82
+
83
+ <groupId>com.fasterxml.jackson.core</groupId>
84
+
85
+ <artifactId>jackson-core</artifactId>
86
+
87
+ <version>2.12.5</version>
88
+
89
+ </dependency>
90
+
91
+ </dependencies>
92
+
93
+
94
+
95
+ <build>
96
+
97
+ <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
98
+
99
+ <plugins>
100
+
101
+ <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
102
+
103
+ <plugin>
104
+
105
+ <artifactId>maven-clean-plugin</artifactId>
106
+
107
+ <version>3.1.0</version>
108
+
109
+ </plugin>
110
+
111
+ <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
112
+
113
+ <plugin>
114
+
115
+ <artifactId>maven-resources-plugin</artifactId>
116
+
117
+ <version>3.0.2</version>
118
+
119
+ </plugin>
120
+
121
+ <plugin>
122
+
123
+ <artifactId>maven-compiler-plugin</artifactId>
124
+
125
+ <version>3.8.0</version>
126
+
127
+ </plugin>
128
+
129
+ <plugin>
130
+
131
+ <artifactId>maven-surefire-plugin</artifactId>
132
+
133
+ <version>2.22.1</version>
134
+
135
+ </plugin>
136
+
137
+ <plugin>
138
+
139
+ <artifactId>maven-jar-plugin</artifactId>
140
+
141
+ <version>3.0.2</version>
142
+
143
+ </plugin>
144
+
145
+ <plugin>
146
+
147
+ <artifactId>maven-install-plugin</artifactId>
148
+
149
+ <version>2.5.2</version>
150
+
151
+ </plugin>
152
+
153
+ <plugin>
154
+
155
+ <artifactId>maven-deploy-plugin</artifactId>
156
+
157
+ <version>2.8.2</version>
158
+
159
+ </plugin>
160
+
161
+ <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
162
+
163
+ <plugin>
164
+
165
+ <artifactId>maven-site-plugin</artifactId>
166
+
167
+ <version>3.7.1</version>
168
+
169
+ </plugin>
170
+
171
+ <plugin>
172
+
173
+ <artifactId>maven-project-info-reports-plugin</artifactId>
174
+
175
+ <version>3.0.0</version>
176
+
177
+ </plugin>
178
+
179
+ </plugins>
180
+
181
+ </pluginManagement>
182
+
183
+ </build>
184
+
185
+ </project>
186
+
187
+
188
+
189
+ ```
190
+
191
+
192
+
193
+ 【コード】
194
+
195
+ ```Java
196
+
197
+ package com.example;
198
+
199
+
200
+
201
+ /**
202
+
203
+ * Hello world!
204
+
205
+ *
206
+
207
+ */
208
+
209
+ public class App
210
+
211
+ {
212
+
213
+ public static void main( String[] args )
214
+
215
+ {
216
+
217
+ System.out.println( "Hello World!" );
218
+
219
+ }
220
+
221
+ }
222
+
223
+
224
+
225
+ ```
226
+
227
+
228
+
229
+
230
+
15
231
  ### 発生している問題・エラーメッセージ
16
232
 
17
233