AMI Java backend > Essentials > Getting Started with AMICoreLib


Getting Started with AMICoreLib

This guide will help you set up your development environment to create new Java class (especially AMI commands) using the AMICoreLib library, which is available from the AMI Maven repository.

Prerequisites

Make sure you have the following installed on your machine:

  • Java JDK 11 or newer
  • Apache Maven
  • A Java IDE (e.g. IntelliJ IDEA, Eclipse, or VS Code with Java extensions)

Adding AMICoreLib to Your Project

You can integrate AMICoreLib-1.0.0 into your project in two ways:

Option 1: Use Maven

Add the AMI repository and dependency in your pom.xml:

<repositories>
  <repository>
    <id>ami-repo</id>
    <url>https://repo.ami-ecosystem.in2p3.fr/</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>net.hep.ami</groupId>
    <artifactId>AMICoreLib</artifactId>
    <version>1.0.0</version>
  </dependency>
</dependencies>

Option 2: Download the JAR manually

You can also download the JAR and add it manually to your classpath via your IDE or build tool.

Project structure

Here is a typical structure for a custom Java project using AMICoreLib:

my-project/
├── src/
│   └── main/
│       └── java/
│           └── net/
│               └── hep/
│                   └── ami/
│                       └── MyCustom.java
├── pom.xml

The net.hep.ami package is mandatory — the AMICoreLib uses this package path to discover and load some custom classes.

Next
MQL