781227
781227

Reputation: 23

Adding local jar file/plug-in as maven dependency

I am developing an eclipse project and I have created a plug-in for myself in order to handle some protocol operations. I want to add this plug-in as a maven dependency to my my project.

How is this possible?

Upvotes: 0

Views: 823

Answers (2)

ertenfth
ertenfth

Reputation: 51

I assume you mean ".jar" type plug-in data. One of the ways is doing it via cmd prompt.

these code fragments add your .JAR into your local Maven repository

cd <path that includes your .jar file>
mvn install:install-file -Dfile=<jarfile.jar> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<jar>

Then you can add the following in your pom.xml file

<dependency>
    <groupId>your.groupID</groupId>
    <artifactId>your.artifactId</artifactId>
    <version>your.version</version>
</dependency>

Upvotes: 1

mrkernelpanic
mrkernelpanic

Reputation: 4451

In your pom.xml add following:

<build>
    <plugins>
       <plugin>
          <groupId>your.groupId</groupId>
          <artifactId>your.artifactId</artifactId>
          <version>your.version</version>
       </plugin>
    </plugins>
</build>

Upvotes: 0

Related Questions