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 :
- Java 17 and you need to set JAVA_HOME variable.
- Node 18.19.0
- NPM 10.2.3
- Yarn (Only if you want to use yarn as your package manager instead of npm)
- Git
- Maven
npm
-
Open your terminal and set the registry URL:
npm set registry https://package-repository.ibonia.com/repository/ibonia-npm-group/ -
Run the
npm logincommand:npm login -
Provide your credentials when prompted (Credentials are available at IbSpring-accounts)
- Username
- Password
-
After a successful login, the credentials will be saved in the
.npmrcfile. -
Another way to check your identity is running the following command.
npm whoami
Yarn
-
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/ -
You will be prompted for your credentials (Credentials are available at IbSpring-accounts)
- Username
- Password
-
Once logged in, Yarn will store your credentials in the
.yarnrcfile, ensuring future requests to the registry are authenticated.
Maven
-
Add the custom registry information to your
settings.xmlfile, typically located in the.m2directory (~/.m2/settings.xml). -
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> -
ibonia-repo-group is the id of the repository in the pom.xml configuration of your project
-
Save the file and Maven will automatically use these credentials when accessing the custom registry.