|
|
@@ -28,3 +28,85 @@ Run the following commands in your terminal:
|
|
|
```
|
|
|
$ mvn package
|
|
|
```
|
|
|
+
|
|
|
+# Installing a JAR into a Private Maven Repository
|
|
|
+
|
|
|
+This guide provides step-by-step instructions on how to install a JAR file into a private Maven repository.
|
|
|
+
|
|
|
+## Prerequisites
|
|
|
+
|
|
|
+Before proceeding, ensure you have the following:
|
|
|
+- Apache Maven installed ([Download & Install](https://maven.apache.org/install.html))
|
|
|
+- A private Maven repository (e.g., Nexus, Artifactory, or a simple file-based repository)
|
|
|
+- The JAR file you want to install
|
|
|
+
|
|
|
+## Step 1: Set server in setting xml
|
|
|
+Example path
|
|
|
+
|
|
|
+```
|
|
|
+C:\dev\apache-maven-3.9.4\conf\setting.xml"
|
|
|
+```
|
|
|
+
|
|
|
+Set server value :
|
|
|
+
|
|
|
+```
|
|
|
+ <server>
|
|
|
+ <id>reposilite-repository-private</id>
|
|
|
+ <username>hanoman</username>
|
|
|
+ <password>fj7uZSLx3w3jCwJNoT0ez1/FbMI+Y30wT5CJIa0vqBE9+5sYdzskTKdq7JEfsE84</password>
|
|
|
+ </server>
|
|
|
+```
|
|
|
+
|
|
|
+## Step 2: Deploy JAR to Private Maven Repository
|
|
|
+
|
|
|
+If you are using a private Maven repository like Nexus or Artifactory, deploy the JAR using the following command:
|
|
|
+
|
|
|
+```sh
|
|
|
+mvn deploy:deploy-file -Dfile=your-library.jar \
|
|
|
+ -DgroupId=com.yourcompany \
|
|
|
+ -DartifactId=your-artifact-id \
|
|
|
+ -Dversion=1.0.0 \
|
|
|
+ -Dpackaging=jar \
|
|
|
+ -DrepositoryId=your-repo-id \
|
|
|
+ -Durl=http://your-maven-repository/repository/maven-releases/
|
|
|
+```
|
|
|
+
|
|
|
+Replace:
|
|
|
+- `your-repo-id` with the ID of your repository defined in `~/.m2/settings.xml`.
|
|
|
+- `http://your-maven-repository/repository/maven-releases/` with the actual URL of your private Maven repository.
|
|
|
+
|
|
|
+Example of a command that has been executed to update the private repository
|
|
|
+
|
|
|
+For the -Dfile parameter, adjust it according to the file location in the local folder
|
|
|
+
|
|
|
+```
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\com.ibm.websphere.appserver.api.basics-1.2.15.jar" -DgroupId="com.ibm.websphere" -DartifactId="appserver.api.basics" -Dversion="1.2.15" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\commonj-sdo-2.1.0.jar" -DgroupId=commonj -DartifactId=commonj-sdo -Dversion="2.1.0" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\config.jar" -DgroupId="id.co.hanoman" -DartifactId=config -Dversion="1.0" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\hanoman-util-1.0.jar" -DgroupId="id.co.hanoman" -DartifactId=hanoman-util -Dversion="1.0" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\hcx.jar" -DgroupId="id.co.hanoman" -DartifactId=hcx -Dversion="1.0" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\scutils.jar" -DgroupId="com.scupid" -DartifactId=scutils -Dversion="1.0" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\SppSynchronizerLibrary.jar" -DgroupId="com.ztdev" -DartifactId=SppSynchronizerLibrary -Dversion="1.0" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\id.co.hanoman.btnmw.license" -DgroupId="id.co.hanoman" -DartifactId=btnmw -Dversion="1.0.0" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\id.co.hanoman.btnmw.license" -DgroupId="id.co.hanoman" -DartifactId=btnmw -Dversion="1.0.0" -Dpackaging=license -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+mvn -X -e deploy:deploy-file -Dfile="C:\dev\hci\btnmw-was\SharedLib\jplugin2.jar" -DgroupId="id.co.hanoman" -DartifactId=jplugin2 -Dversion="1.0" -Dpackaging=jar -Durl=https://maven.senomas.com/private -DrepositoryId=reposilite-repository-private
|
|
|
+```
|
|
|
+
|
|
|
+## Step 3: Configure Your Project to Use the Private Repository
|
|
|
+
|
|
|
+In your project's `pom.xml`, add the repository reference:
|
|
|
+
|
|
|
+```xml
|
|
|
+ <repositories>
|
|
|
+ <repository>
|
|
|
+ <id>reposilite-repository-private</id>
|
|
|
+ <url>https://maven.senomas.com/private</url>
|
|
|
+ </repository>
|
|
|
+
|
|
|
+ </repositories>
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+## Step 4: Verify Installation
|
|
|
+
|
|
|
+Run mvn install from MWUI directory
|