What is the usage of aspose-words-25.4.pom

In my project, I just use aspose by adding something like

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

Now I want to upgrade to latest version (aspose-words 25.4), but in https://releases.aspose.com/words/java/25-4/#package-explorer, click the link aspose-words-25.4.pom, it show a file with packaging pom with a long content, like following:

<?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>aspose-words</artifactId>
    <version>25.4</version>
    <packaging>pom</packaging>

    <name>Aspose.Words for Java</name>
    <description>
        Aspose.Words for Java is a full-featured Word Processing API.
        It allows to read, modify, convert, generate, format, render
        and print human-readable documents. Aspose.Words for Java
        supports all the popular Word Processing file formats.
    </description>
    <url>https://products.aspose.com/words/java</url>
    <issueManagement>
        <url>https://forum.aspose.com/c/words</url>
    </issueManagement>
    <licenses>
        <license>
            <name>Aspose EULA</name>
            <url>https://company.aspose.com/legal/eula</url>
        </license>
    </licenses>
    <properties>
        <jogl.version>2.3.2</jogl.version>
    </properties>

    <organization>
        <name>Aspose Pty Ltd</name>
        <url>https://www.aspose.com/</url>
    </organization>

    <dependencies>

        <!-- ImageIO plugin library is used for reading WebP images. -->
        <!-- see https://github.com/haraldk/TwelveMonkeys/tree/master -->
        <dependency>
            <groupId>com.twelvemonkeys.imageio</groupId>
            <artifactId>imageio-webp</artifactId>
            <version>3.10.1</version>
        </dependency>

        <!-- ImageIO plugin library is used for writing WebP images. -->
        <!-- see https://github.com/sejda-pdf/webp-imageio -->
        <dependency>
            <groupId>org.sejda.imageio</groupId>
            <artifactId>webp-imageio</artifactId>
            <version>0.1.6</version>
        </dependency>
        
        <!-- ImageIO plugin library is used for encoding PNG images. -->
        <!-- see https://github.com/pngencoder/pngencoder -->
        <dependency>
            <groupId>com.pngencoder</groupId>
            <artifactId>pngencoder</artifactId>
            <version>0.15.0</version>
        </dependency>


        <!-- JogAmp JOGL library is used for hardware-accelerated OpenGL rendering. -->
        <!-- JogAmp's .pom configured for "portability": it just loads all native jar files for all supported platforms. -->
        <!-- See https://jogamp.org/wiki/index.php/Maven -->
        <!-- If you don't like these spare jars on your disk, you have 2 options: -->
        <!-- 1. Remove both org.jogamp.jogl and org.jogamp.gluegen dependencies if you don't need OpenGL. -->
        <!-- 2. OR Edit the full list of JoGL dependencies to preserve only needed jars. (the full commented-out list is below) -->
        
        <dependency>
            <groupId>org.jogamp.jogl</groupId>
            <artifactId>jogl-all-main</artifactId>
            <version>${jogl.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jogamp.gluegen</groupId>
            <artifactId>gluegen-rt-main</artifactId>
            <version>${jogl.version}</version>
        </dependency>

<!--
        <dependency>
            <groupId>org.jogamp.jogl</groupId>
            <artifactId>jogl-all</artifactId>
            <version>${jogl.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jogamp.jogl</groupId>
            <artifactId>jogl-all</artifactId>
            <version>${jogl.version}</version>
            <classifier>natives-windows-i586</classifier>
        </dependency>

        <dependency>
            <groupId>org.jogamp.jogl</groupId>
            <artifactId>jogl-all</artifactId>
            <version>${jogl.version}</version>
            <classifier>natives-windows-amd64</classifier>
        </dependency>
        
        <dependency>
            <groupId>org.jogamp.jogl</groupId>
            <artifactId>jogl-all</artifactId>
            <version>${jogl.version}</version>
            <classifier>natives-linux-i586</classifier>
        </dependency>

        <dependency>
            <groupId>org.jogamp.jogl</groupId>
            <artifactId>jogl-all</artifactId>
            <version>${jogl.version}</version>
            <classifier>natives-linux-amd64</classifier>
        </dependency>
        
        <dependency>
            <groupId>org.jogamp.gluegen</groupId>
            <artifactId>gluegen-rt</artifactId>
            <version>${jogl.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jogamp.gluegen</groupId>
            <artifactId>gluegen-rt</artifactId>
            <version>${jogl.version}</version>
            <classifier>natives-windows-i586</classifier>
        </dependency>
        
        <dependency>
            <groupId>org.jogamp.gluegen</groupId>
            <artifactId>gluegen-rt</artifactId>
            <version>${jogl.version}</version>
            <classifier>natives-windows-amd64</classifier>
        </dependency>
        
        <dependency>
            <groupId>org.jogamp.gluegen</groupId>
            <artifactId>gluegen-rt</artifactId>
            <version>${jogl.version}</version>
            <classifier>natives-linux-i586</classifier>
        </dependency>
        
        <dependency>
            <groupId>org.jogamp.gluegen</groupId>
            <artifactId>gluegen-rt</artifactId>
            <version>${jogl.version}</version>
            <classifier>natives-linux-amd64</classifier>
        </dependency>
-->

    </dependencies>
</project>
  1. what is the usage of this <packaging>pom</packaging> .pom file?
  2. Do I need to add it in my project pom.xml? but in past, I just need to add something like
 <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-words</artifactId>
            <version>21.5</version>
            <classifier>jdk16</classifier>
        </dependency>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-words</artifactId>
            <version>21.5</version>
            <classifier>javadoc</classifier>
        </dependency>

@tong123123 You should simply update version of Aspose.Words in your pom.xml, like this:

<dependency>
     <groupId>com.aspose</groupId>
     <artifactId>aspose-words</artifactId>
     <version>25.4</version>
     <classifier>jdk17</classifier>
</dependency>
1 Like

but then what is the usage of aspose-words-25.4.pom

@tong123123 POM file is used when you reference Aspose.Words in your pom.xml.

1 Like

this mean when I add

<dependency>
     <groupId>com.aspose</groupId>
     <artifactId>aspose-words</artifactId>
     <version>25.4</version>
     <classifier>jdk17</classifier>
</dependency>

im my project pom.xml, it will implicitly reference aspose-words-25.4.pom, but I do not need to explicitly add aspose-words-25.4.pom in my project?

@tong123123 Yes, exactly.

1 Like

Sorry but I want to know more, as I see in aspose-words-25.4.pom, it has a section like following:

<!-- If you don't like these spare jars on your disk, you have 2 options: -->
		<!-- 1. Remove both org.jogamp.jogl and org.jogamp.gluegen dependencies if you don't need OpenGL. -->
		<!-- 2. OR Edit the full list of JoGL dependencies to preserve only needed jars. (the full commented-out list is below) -->

if this aspose-words-25.4.pom is added implicitly, how can I modify it?
I know this related to maven knowledge, but I want to know more.

@tong123123 I will consult with our Java developers and provide you more information.

Hi @tong123123

Our Web package-explorer in download page time to time not explore full information.
You can find all maven artifacts on this page:
https://releases.aspose.com/java/repo/com/aspose/aspose-words/25.4/

Like before you can modify dependency with new version:

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

In aspose-words-25.4.pom file we have dependency for image rendering. And they downloaded automatically with jdk16.jar and jdk17.jar

Some customers don’t use this functionality and they can manually download aspose-words-25.4-jdk17.jar from maven repository and add this jar to their pom.xml. At that moment they can copy dependency from aspose-words-25.4.pom and modify them.

1 Like

what happens behind so that when I add

<dependency>
     <groupId>com.aspose</groupId>
     <artifactId>aspose-words</artifactId>
     <version>25.4</version>
     <classifier>jdk17</classifier>
</dependency>

in my project pom.xml, it can implicitly reference aspose-words-25.4.pom?

Hi @tong123123

This is normal behavior of Maven.
When you add some dependency in your pom.xml , Maven download pom files for this dependency and add dependency from this file.

Also you can exclude same dependency in your pom.xml like in this article:
https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

In our case you can Exclude all Image rendering and OpenGL dependency manually.

1 Like

this mean when I add some dependency in my pom.xml, Maven download the corresponding pom files for this dependency (mean the file with <packaging>pom</packaging>) and add dependency from this file?

if yes, this make me understand more now, just cannot found related information in maven documentation, in maven documentation, it always related <packaging>pom</packaging> with Project Aggregation.

Thanks.

1 Like

Yes you understand right

1 Like

Thanks, then where is the <classifier>jdk16</classifier>, <classifier>javadoc</classifier> now?
from the link
https://releases.aspose.com/java/repo/com/aspose/aspose-words/25.4/aspose-words-25.4.pom
the only classifier are

<classifier>natives-windows-i586</classifier>
<classifier>natives-windows-amd64</classifier>

@tong123123 Our Java developers have days off, they will get back to you as soon as possible.

1 Like

Hi @tong123123

You can find all classifier that you can use in this link: https://releases.aspose.com/java/repo/com/aspose/aspose-words/25.4/

1 Like

so we can use the following classifier
javadoc
jdk16
jdk17
shaping-harfbuzz-legacy-plugin
shaping-harfbuzz-plugin
?

@tong123123

Yes.

1 Like