ismael
ismael

Reputation: 474

Add jar file to local repository (linux server)

I created a "lib" folder in my project

~\test2000\lib\ls-client.jar

enter image description here

Then, I added a jar file to this folder

Now I want to call him in the project, I did this with the following code, In my system right.

<dependency>
        <groupId>com.lightstreamer</groupId>
        <artifactId>ls-client</artifactId>
        <version>2.5.2</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/lib/ls-client.jar</systemPath>
    </dependency>

But when I transfer the program to the Linux server

There's an error saying that it can not read jarFile

I think I do not enter groupId and artifactId!!!

Can anyone help me?

Upvotes: 3

Views: 464

Answers (1)

ismael
ismael

Reputation: 474

step 1: Download the "ls-client", extract it and copy the ls-client.jar to somewhere else, for example, c drive. Issue following command :

mvn install:install-file -Dfile=c:\\test2000\lib\ls-client.jar -DgroupId=com.lightstreamer 
-DartifactId=ls-client -Dversion=2.5.2 -Dpackaging=jar

step 2:

<dependency>
        <groupId>com.lightstreamer</groupId>
        <artifactId>ls-client</artifactId>
        <version>2.5.2</version>
</dependency>

Upvotes: 1

Related Questions