Setting up a project with MavenΒΆ

Armeria is distributed via Maven Central Repository. Add the following dependency to your pom.xml:

<project>
  ...
  <properties>
    <!-- Compiler options -->
    <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <!-- Dependency versions -->
    <armeria.version>0.51.0</armeria.version>
  </properties>

  <dependencies>
    ...
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-grpc</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-jetty</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-kafka</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-logback</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-retrofit2</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-thrift</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-tomcat</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-zipkin</artifactId>
      <version>${armeria.version}</version>
    </dependency>
    <dependency>
      <groupId>com.linecorp.armeria</groupId>
      <artifactId>armeria-zookeeper</artifactId>
      <version>${armeria.version}</version>
    </dependency>

    <!-- Logging -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.2.3</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>log4j-over-slf4j</artifactId>
      <version>1.7.25</version>
      <scope>runtime</scope>
    </dependency>
    ...
  </dependencies>
  ...
</project>

You may not need all Armeria modules depending on your use case. Please remove unused ones.

Armeria also provides its artifacts as a shaded JAR so that it can coexist with other components better. The following is the list of the shaded dependencies:

Please append the -shaded suffix to the artifact ID to use the shaded dependencies. e.g. armeria to armeria-shaded and armeria-thrift to armeria-thrift-shaded