EclipseにはGradleプラグインと日本語プラグイン(Pleiades)がインストールされているものとします。
メニューの"新規プロジェクト"で、"Gradleプロジェクト"を選択し、プロジェクトを作成します。
すると、プロジェクトの下にbuild.gradleというファイルができます。
build.gradleには既にdependenciesという項目がありますので、
その中にcompile 'com.fasterxml.jackson.core:jackson-databind:2.3.4'を追加してください。
順番はどこでも良いです。
lang
1(前半略)
2
3// In this section you declare the dependencies for your production and test code
4dependencies {
5 compile 'com.fasterxml.jackson.core:jackson-databind:2.3.4'
6
7 // The production code uses the SLF4J logging API at compile time
8 compile 'org.slf4j:slf4j-api:1.7.12'
9
10 // Declare the dependency for your favourite test framework you want to use in your tests.
11 // TestNG is also supported by the Gradle Test task. Just change the
12 // testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
13 // 'test.useTestNG()' to your build script.
14 testCompile 'junit:junit:4.12'
15}
最後に、プロジェクトを右クリックして、"Gradle"→"Gradleプロジェクトのリフレッシュ"を選択すると、「プロジェクトと外部の依存関係」にjacksonライブラリーが追加されているのが分かります。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/07/16 05:05