Skip to content

Add async-http-client-bom #1680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ test-output
MANIFEST.MF
work
atlassian-ide-plugin.xml
/bom/.flattened-pom.xml
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,37 @@ It's built on top of [Netty](https://github.com/netty/netty). It's currently com

## Installation

Binaries are deployed on Maven central:
Binaries are deployed on Maven Central.

Import the AsyncHttpClient Bill of Materials (BOM) to add dependency management for AsyncHttpClient artifacts to your project:

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-bom</artifactId>
<version>LATEST_VERSION</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```

Add a dependency on the main AsyncHttpClient artifact:

```xml
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>LATEST_VERSION</version>
</dependency>
<dependencies>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
</dependency>
</dependencies>
```

The `async-http-client-extras-*` and other modules can also be added without having to specify the version for each dependency, because they are all managed via the BOM.

## Version

AHC doesn't use SEMVER, and won't.
Expand Down
109 changes: 109 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-project</artifactId>
<version>2.10.5-SNAPSHOT</version>
</parent>

<artifactId>async-http-client-bom</artifactId>
<packaging>pom</packaging>
<name>Asynchronous Http Client Bill of Materials (BOM)</name>
<description>Importing this BOM will provide dependency management for all AsyncHttpClient artifacts.</description>
<url>http://github.com/AsyncHttpClient/async-http-client/bom</url>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-example</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-extras-guava</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-extras-jdeferred</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-extras-registry</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-extras-retrofit2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-extras-rxjava</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-extras-rxjava2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-extras-simple</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-extras-typesafe-config</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client-netty-utils</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<!-- This plugins allows using a parent for this file, so project.version can be resolved.
A clean BOM without a reference to a parent is generated, so that transitive dependencies will
not be included and cannot interfere with projects that use this BOM. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
<inherited>false</inherited>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
<configuration>
<flattenMode>bom</flattenMode>
<pomElements>
<properties>remove</properties>
<dependencies>remove</dependencies>
<build>remove</build>
<scm>remove</scm>
</pomElements>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
</repository>
</distributionManagement>
<modules>
<module>bom</module>
<module>netty-utils</module>
<module>client</module>
<module>extras</module>
Expand Down