How to add a locally hosted jar in maven for Jira software plugin sdk

Karthik dharmalingam November 29, 2018

Hi, I am developing a plugin for Jira Software Server. I have a personal dependent jar which has to be added within the plugin to work. So I have locally hosted a jar file and downloaded it in the maven. The jar is available in the url, https://maven.zohodl.com/com/zoho/jiraplugin/accounts-proto/accounts-proto-1.0.jar and added the dependency in pom.xml as,

<dependency>

          <groupId>com.zoho.jiraplugin</groupId>

          <artifactId>accounts-proto</artifactId>

          <version>1.0</version>

</dependency>

I have also added the repository entry as,

<repositories>

      <repository>

            <id>maven-zoho-repo<id>

            <url>https://maven.zohodl.com</url>

      </repository>

</repositories>

Now the jar is downloading properly in maven and appears in the external Libraries of my IDE, but while restarting plugin using 'atlas-mvn package' command, I got the exception as below,

[WARNING] Could not transfer metadata org.apache.velocity:velocity/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Permission denied: connect
Downloading: http://repo.maven.apache.org/maven2/com/zoho/jiraplugin/accounts-proto/1.0/accounts-proto-1.0.pom

The plugin tries to download the jar from maven central, so it doesn't get the required jar. Please explain where did I go wrong here? How to download the jar from the local repository in maven.

 

Thanks. 

karthik.

0 answers

Suggest an answer

Log in or Sign up to answer