Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
14
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

よく利用しそうなMavenのdependency

よく使いそうなやつを随時メモしていく。

  • Maven2 用と Gradle 用の記述をメモ。
  • バージョンは、基本的に調べたときの最新版。
  • 陳腐化する可能性あり。

Java EE

API

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>7.0</version>
</dependency>
dependencies {
    providedCompile 'javax:javaee-api:7.0'
}

Servlet

http://search.maven.org/#search|gav|1|g%3A%22javax.servlet%22%20AND%20a%3A%22servlet-api%22
http://mvnrepository.com/artifact/javax.servlet/javax.servlet-api

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>3.1.0</version>
</dependency>
dependencies {
    providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
}

JSTL

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>
dependencies {
    providedCompile 'javax.servlet:jstl:1.2'
}

Jersey

containers

<dependency>
    <groupId>org.glassfish.jersey.containers</groupId>
    <artifactId>jersey-container-servlet</artifactId>
    <version>2.5.1</version>
</dependency>
dependencies {
    compile'org.glassfish.jersey.containers:jersey-container-servlet:2.5.1'
}

client

<dependency>
    <groupId>org.glassfish.jersey.core</groupId>
    <artifactId>jersey-client</artifactId>
    <version>2.5.1</version>
</dependency>
dependencies {
    compile'org.glassfish.jersey.core:jersey-client:2.5.1'
}

ext

mvc-jsp

<dependency>
    <groupId>org.glassfish.jersey.ext</groupId>
    <artifactId>jersey-mvc-jsp</artifactId>
    <version>2.5.1</version>
</dependency>
dependencies {
    compile'org.glassfish.jersey.ext:jersey-mvc-jsp:2.5.1'
}

mvc-mustache

<dependency>
    <groupId>org.glassfish.jersey.ext</groupId>
    <artifactId>jersey-mvc-mustache</artifactId>
    <version>2.5.1</version>
</dependency>
dependencies {
    compile'org.glassfish.jersey.ext:jersey-mvc-mustache:2.5.1'
}

Tomcat

Servlet API

<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-servlet-api</artifactId>
    <version>7.0.50</version>
</dependency>
dependencies {
    providedCompile 'org.apache.tomcat:tomcat-servlet-api:7.0.50'
}

JUnit

JUnit

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
</dependency>
dependencies {
    testCompile 'junit:junit:4.11'
}
hamcrest明示用
dependencies {
    testCompile 'junit:junit:4.11', {
        transitive = false
    }
}

Hamcrest

<dependency>
    <groupId>org.hamcrest</groupId>
    <artifactId>hamcrest-all</artifactId>
    <version>1.3</version>
</dependency>
dependencies {
    testCompile 'org.hamcrest:hamcrest-all:1.3'
}

JMockit

1.8 以上

<dependency>
    <groupId>org.jmockit</groupId>
    <artifactId>jmockit</artifactId>
    <version>1.9</version>
</dependency>
dependencies {
    testCompile 'org.jmockit:jmockit:1.9'
}

1.7 以前

<dependency>
    <groupId>com.googlecode.jmockit</groupId>
    <artifactId>jmockit</artifactId>
    <version>1.6</version>
</dependency>
dependencies {
    testCompile 'com.googlecode.jmockit:jmockit:1.6'
}

DBUnit

<dependency>
    <groupId>org.dbunit</groupId>
    <artifactId>dbunit</artifactId>
    <version>2.4.9</version>
</dependency>
dependencies {
    testCompile 'org.dbunit:dbunit:2.4.9'
}

Apache Commons

Lang

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.2.1</version>
</dependency>
dependencies {
    compile 'org.apache.commons:commons-lang3:3.2.1'
}

IO

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-io</artifactId>
    <version>1.3.2</version>
</dependency>
dependencies {
    compile 'org.apache.commons:commons-io:1.3.2'
}

Collections

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-collections4</artifactId>
    <version>4.0</version>
</dependency>
dependencies {
    compile 'org.apache.commons:commons-collections4:4.0'
}

CLI

<dependency>
    <groupId>commons-cli</groupId>
    <artifactId>commons-cli</artifactId>
    <version>1.2</version>
</dependency>
dependencies {
    compile 'commons-cli:commons-cli:1.2'
}

Codec

<dependency>
    <groupId>commons-codec</groupId>
    <artifactId>commons-codec</artifactId>
    <version>1.9</version>
</dependency>
dependencies {
    compile 'commons-codec:commons-codec:1.9'
}

Log4j

<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>
dependencies {
    compile 'log4j:log4j:1.2.17'
}

SLF4J

slf4j-log4j12

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.7.6</version>
</dependency>
dependencies {
    compile 'org.slf4j:slf4j-log4j12:1.7.6'
}

Groovy

<dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy</artifactId>
    <version>2.2.1</version>
</dependency>
dependencies {
    compile 'org.codehaus.groovy:groovy:2.2.1'
}

JSONIC

<dependency>
    <groupId>net.arnx</groupId>
    <artifactId>jsonic</artifactId>
    <version>1.3.3</version>
</dependency>
dependencies {
    compile 'net.arnx:jsonic:1.3.3'
}

Jetty

<dependency>
    <groupId>org.eclipse.jetty.aggregate</groupId>
    <artifactId>jetty-all</artifactId>
    <version>9.2.1.v20140609</version>
</dependency>
dependencies {
    compile 'org.eclipse.jetty.aggregate:jetty-all:9.2.1.v20140609'
}
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
14
Help us understand the problem. What are the problem?