Include third party repository in pom.xml | Community
Skip to main content
Uppari_Ramesh
Level 5
August 23, 2023
Solved

Include third party repository in pom.xml

  • August 23, 2023
  • 3 replies
  • 2498 views

Hi Team,

 

I am using Aspose.Pdf third party Java library. I declared the dependency as below 

 

<dependency>

<groupId>com.aspose</groupId>

<artifactId>aspose-pdf</artifactId>

<version>22.12</version>

</dependency>

 

Aspose is suggsting to include their own repository in pom.xml. as below 

 

<repositories>
   <repository>
     <id>AsposeJavaAPI</id>
     <name>Aspose Java API</name>
     <url>https://releases.aspose.com/java/repo/</url>
  </repository>
</repositories>

 

I have included above repository after <properties></properties>

 

Now maven was unable to download the jar files. When I ran mvn clean compile command it is giving me below

error

 

[ERROR] Failed to execute goal on project test.core:

Could not resolve dependencies for project com.test.core:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at com.aspose:aspose-pdf:jar:22.12: Failed to read artifact descriptor for com.aspose:aspose-pdf:jar:22.12:

Could not transfer artifact com.aspose:aspose-pdf:pom:22.12

 

I am also using Adobe public Repository as well. 

 

How can I make com.aspose dependency get downloaded from their own repository(AsposeJavaAPI) instead of maven or adobe repository? What is the configuration that I need to use?

 

@lukasz-m @skmaem @vijayalakshmi_s @asutosh_jena_ 

 

Thanks in advance!

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mahedi_Sabuj

Hi @uppari_ramesh

If you haven't already check, please check this example repository of Aspose.PDF for Java.

https://github.com/aspose-pdf/Aspose.PDF-for-Java/blob/master/Examples/pom.xml 

3 replies

Mahedi_Sabuj
Community Advisor
Mahedi_SabujCommunity AdvisorAccepted solution
Community Advisor
August 23, 2023

Hi @uppari_ramesh

If you haven't already check, please check this example repository of Aspose.PDF for Java.

https://github.com/aspose-pdf/Aspose.PDF-for-Java/blob/master/Examples/pom.xml 

Mahedi Sabuj
Preetpal_Bindra
Community Advisor
Community Advisor
August 23, 2023

@uppari_ramesh 

Do you have settings.xml file for your build?

You might want to add the Apose repository in settings.xml.

In the xml file you might already see Adobe repository details.

Sudheer_Sundalam
Community Advisor
Community Advisor
August 23, 2023

@uppari_ramesh ,

 

Adding repository definition in the pom.xml should work. try to use "mvn -e -U clean install" maven command from the main pom.xml and see if that makes any difference.