Skip to content

Commit

Permalink
Merge pull request opensearch-project#7 from sothawo/github_packages_…
Browse files Browse the repository at this point in the history
…with_maven

Add information for setup with maven
  • Loading branch information
swallez authored Jun 17, 2021
2 parents 99e191d + 6984b5c commit 2a66f6b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,51 @@ dependencies {
}
```

If you are using Maven, you need to add the credentials in your `~/.m2/settings.xml`:

```xml
<settings>
<servers>
<server>
<id>ESJavaGithubPackages</id>
<username>YOUR_GITHUB_USERNAME</username>
<password>YOUR_GITHUB_TOKEN</password>
</server>
</servers>
</settings>
```

In the `pom.xml` for your project add the following repository definition and dependencies:

```xml
<project>

<repositories>
<repository>
<id>ESJavaGithubPackages</id>
<url>https://maven.pkg.github.com/elastic/elasticsearch-java</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
<version>8.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.3</version>
</dependency>
</dependencies>

</project>
```

### Your first request

```java
Expand Down

0 comments on commit 2a66f6b

Please sign in to comment.