Skip to main content

Must do

This guide shows you how to use Ibonia’s registry for npm or yarn and package repository for maven.

What you’ll need

To use Ib-Spring you need :

  1. Java 17 and you need to set JAVA_HOME variable.
  2. Node 18.19.0
  3. NPM 10.2.3
  4. Yarn (Only if you want to use yarn as your package manager instead of npm)
  5. Git
  6. Maven

npm

  1. Open your terminal and set the registry URL:

    npm set registry https://package-repository.ibonia.com/repository/ibonia-npm-group/
  2. Run the npm login command:

    npm login
  3. Provide your credentials when prompted (Credentials are available at IbSpring-accounts)

    • Username
    • Password
    • Email
  4. After a successful login, the credentials will be saved in the .npmrc file.

  5. Another way to check your identity is running the following command.

npm whoami

Yarn

  1. Open your terminal and run the following command:

    yarn config set registry https://package-repository.ibonia.com/repository/ibonia-npm-group/
    yarn login --registry https://package-repository.ibonia.com/repository/ibonia-npm-group/
  2. You will be prompted for your credentials (Credentials are available at IbSpring-accounts)

    • Username
    • Password
    • Email
  3. Once logged in, Yarn will store your credentials in the .yarnrc file, ensuring future requests to the registry are authenticated.

Maven

  1. Add the custom registry information to your settings.xml file, typically located in the .m2 directory (~/.m2/settings.xml).

  2. Adjust m2 to have this configurations (Go to IbSpring-accounts for the credentials)

    <settings>
    <mirrors>
    <mirror>
    <!--This sends everything else to /public -->
    <id>ibonia-repo-group</id>
    <mirrorOf>*</mirrorOf>
    <url>https://package-repository.ibonia.com/repository/ibonia-mvn-group/</url>
    </mirror>
    </mirrors>
    <profiles>
    <profile>
    <id>ibonia-repo-group</id>
    <!--Enable snapshots for the built in central repo to direct -->
    <!--all requests to ibonia-repo-group via the mirror -->
    <repositories>
    <repository>
    <id>central</id>
    <url>http://central</url>
    <releases><enabled>true</enabled></releases>
    <snapshots><enabled>true</enabled></snapshots>
    </repository>
    </repositories>
    <pluginRepositories>
    <pluginRepository>
    <id>central</id>
    <url>http://central</url>
    <releases><enabled>true</enabled></releases>
    <snapshots><enabled>true</enabled></snapshots>
    </pluginRepository>
    </pluginRepositories>
    </profile>
    </profiles>
    <activeProfiles>
    <!--make the profile active all the time -->
    <activeProfile>ibonia-repo-group</activeProfile>
    </activeProfiles>
    <servers>
    <server>
    <id>ibonia-repo-group</id>
    <username>{username}</username>
    <password>{password}</password>
    </server>
    </servers>
    </settings>

  3. ibonia-repo-group is the id of the repository in the pom.xml configuration of your project

  4. Save the file and Maven will automatically use these credentials when accessing the custom registry.