Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Include third party repository in pom.xml

Avatar

Level 4

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!

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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 

Avatar

Community Advisor

@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.

Avatar

Community Advisor

@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.