Problem with the Maven repository

Hi Aspose-support,

It seems like I have a problem with the Maven repository for Aspose Words.

I am using the following in my pom.xml:

<repositories>
	<repository>
		<id>AsposeJavaAPI</id>
		<name>Aspose Java API</name>
		<url>http://maven.aspose.com/artifactory/simple/ext-release-local/</url>
	</repository>
</repositories>
<dependencies>
	<dependency>
		<groupId>com.aspose</groupId>
		<artifactId>aspose-words</artifactId>
		<version>18.10</version>
		<classifier>jdk16</classifier>
	</dependency>
</dependencies>

Eclipse can find the library and is “successfully downloading” it.
But the size of the aspose-words-18.10-jdk16.jar is only 3KB and therefore my project of course does not work.

Is there anything I am doing wrong here?
Is the maven repository maybe wrong?

Btw I tried to download any other library from the normal maven repository like log4j which is working fine.

Thank you

@kai20511,

Please try again the following POM file. Hope, this helps:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.aspose</groupId>
    <artifactId>AsposeWordsMavenTest</artifactId>
    <version>1.0-SNAPSHOT</version>

    <repositories>
        <repository>
            <id>AsposeJavaAPI</id>
            <name>Aspose Java API</name>
            <url>http://artifact.aspose.com/repo/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-words</artifactId>
            <version>18.10</version>
            <classifier>jdk16</classifier>
        </dependency>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-words</artifactId>
            <version>18.10</version>
            <classifier>javadoc</classifier>
        </dependency>
    </dependencies>
</project>

Thanks @awais.hafeez

Working fine now!

Hi THere, I’m having issues with setting up maven repo. I’ve checked this document
Aspose for Maven - Aspose Maven Repository for Java File Format APIs, added repo and dependency to the pom.xml

<dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-words</artifactId>
        <version>21.0.0</version>
        <type>pom</type>
    </dependency>
        
     <!--https://mvnrepository.com/artifact/com.aspose/aspose-pdf--> 
     <dependency>
         <groupId>com.aspose</groupId>
         <artifactId>aspose-pdf</artifactId>
         <version>21.6</version>
         <type>jar</type>
    </dependency>
 </dependencies>
 <repositories>
    <repository>
        <id>AsposeJavaAPI</id>
        <name>Aspose Java API</name>
        <url>http://repository.aspose.com/repo</url>
        </repository>
 </repositories>

But i’m still getting

 Failed to execute goal on project simploud-app: Could not resolve dependencies for project com.simploud:simploud-app:war:2.0: Failed to collect dependencies at com.aspose:aspose-words:pom:21.0.0: Failed to read artifact descriptor for com.aspose:aspose-words:pom:21.0.0: Could not transfer artifact com.aspose:aspose-words:pom:21.0.0 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [AsposeJavaAPI (http://repository.aspose.com/repo, default, releases+snapshots)] -> [Help 1]

Did I missed some step?

Before I had these two repos defiend

 <repositories>
    <repository>
        <id>aspose-maven-repository</id>
        <url>http://maven.aspose.com/repository/repo/</url>
    </repository>
    
    <repository>
        <id>AsposeJavaAPI</id>
        <name>Aspose Java API</name>
        <url>http://artifact.aspose.com/repo/</url>
     </repository>
 </repositories>

Found the answer here https://stackoverflow.com/questions/67001968/how-to-disable-maven-blocking-external-http-repositories.

@velicko91 It is perfect that you managed to resolve the problem and thank you for sharing the solution.

Hey @alexey.noskov i have a new issue… I have total Lincese, and i’m now trying to add cells and slides into pom.xml. But they are not downloading, and i’m getting new maven exception. This is my pom.xml

<?xml version="1.0" encoding="utf-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xmlns="http://maven.apache.org/POM/4.0.0"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.simploud</groupId>
	<artifactId>simploud-app</artifactId>
	<name>simploud-app</name>
	<version>2.0</version>
	<packaging>war</packaging>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.1.RELEASE</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<version>2.0.1.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<version>2.0.1.RELEASE</version>
			<scope>test</scope>
		</dependency>


		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.5</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.7</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-words</artifactId>
			<version>22.3</version>
			<type>jar</type>
		</dependency>

		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-pdf</artifactId>
			<version>22.3</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-slides</artifactId>
			<version>22.3</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-cells</artifactId>
			<version>22.3</version>
			<type>jar</type>
		</dependency>

	</dependencies>
	<repositories>
		<repository>
			<id>AsposeJavaAPI</id>
			<name>Aspose Java API</name>
			<url>http://repository.aspose.com/repo/</url>
		</repository>
	</repositories>
	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>
</project>

When i run mvn clean build command, i get these logs:

[INFO] Building simploud-app 2.0
[INFO] --------------------------------[ war ]---------------------------------
Downloading from AsposeJavaAPI: http://repository.aspose.com/repo/com/aspose/aspose-words/22.3/aspose-words-22.3.jar
Downloading from central: https://repo.maven.apache.org/maven2/com/aspose/aspose-words/22.3/aspose-words-22.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.007 s
[INFO] Finished at: 2022-04-15T10:22:09+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project simploud-app: Could not resolve dependencies for project com.simploud:simploud-app:war:2.0: Could not find artifact com.aspose:aspose-words:jar:22.3 in AsposeJavaAPI (http://repository.aspose.com/repo/) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Any help would be appreciated, Thanks!

@velicko91 As I can see you you insecure http url to Aspose reporsitory. Please try using https address:

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

@alexey.noskov i tried changing to https. And i’m getting this error:

[ERROR] Failed to execute goal on project simploud-app: Could not resolve dependencies for project com.simploud:simploud-app:war:2.0: The following artifacts could not be resolved: com.aspose:aspose-words:jar:22.3, com.aspose:aspose-slides:jar:22.3: Could not find artifact com.aspose:aspose-words:jar:22.3 in AsposeJavaAPI (Aspose Repository Browser /java/repo/)

@velicko91 Please replace the following:

<dependency>
	<groupId>com.aspose</groupId>
	<artifactId>aspose-words</artifactId>
	<version>22.3</version>
	<type>jar</type>
</dependency>

with

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>22.3</version>
    <classifier>jdk16</classifier>
</dependency>

Here is updated pom file.pom.zip (797 Bytes)