Description

GenRocket can be integrated with a Java Maven Project. This article describes how you can integrate GenRocket in your Java Maven project. Once these steps below have been completed, your pom.xml will be ready, and you can begin using GenRocket APIs in your project!


Step 1 - Request Private Read Token and Repository Name

Contact the GenRocket Team at support@genrocket.com to request a Repository ID, Private Read Token, and Repository Name.


Step 2 - Add the Repository to Your pom.xml

Add the following repository to your pom.xml by replacing the REPO_ID, READ_TOKEN, and REPO_NAME with the respective names shared by the GenRocket Team.

<repositories>
  <repository>
    <id>#{REPO_ID}</id>
    <url>https://packagecloud.io/priv/#{READ_TOKEN}/genrocket/#{REPO_NAME}/maven2</url>
    <releases>
      <enabled>true</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>


Step 3 - Add Dependencies in pom.xml for Downloading GenRocket Jars

After adding the repository in Step 2, you need to add the following dependencies in your pom.xml for downloading GenRocket related Jars.

<dependencies>
  <dependency>
    <groupId>com.genrocket</groupId>
    <artifactId>gr-receivers</artifactId>
    <version>#{latestVersion}</version>
  </dependency>
  <dependency>
    <groupId>com.genrocket</groupId>
    <artifactId>gr-generators</artifactId>
    <version>#{latestVersion}</version>
  </dependency>
  <dependency>
    <groupId>com.genrocket</groupId>
    <artifactId>gr-engine</artifactId>
    <version>#{latestVersion}</version>
  </dependency>
  <dependency>
    <groupId>com.genrocket</groupId>
    <artifactId>genrocket</artifactId>
    <version>#{latestVersion}</version>
  </dependency>
</dependencies>