Free Support Forum - groupdocs.com

GroupDocs Maven release question


#1

Hi,


A bundled jar release is a old-fashioned and out-dated way of releasing libraries. It can cause many classpath issues, especially that we use other Aspose libraries in our project already.

Can you release it as a maven project/light jar file with all the dependencies listed separately?
Long time ago I asked for the same thing, that time you send me a list of dependencies, but it would be good if you could release it with every new version:)

Thank you,
Mariusz

#2
Hi Mariusz, thank you for getting back in touch.

We continuously release our Java libraries in the Maven central repository. Please, check:
Dependencies you can find in the GroupDocs.Annotation slim sample on GitHub or download required ones from the Aspose website.


#3

Hi,


the mentioned Maven project (http://search.maven.org/#artifactdetails|com.groupdocs|groupdocs-annotation|1.7.0|jar) contains too many referenced libraries.

The list available on https://github.com/groupdocs/groupdocs-slim-annotation-java-spring-sample/tree/master/libs is much shorter than the references included in your maven repository. Can you update your project to point to just the required references? Otherwise it’s useless and we need to create it in our internal repository anyway.
All the JDBC drivers should not be referenced. If the list of dependencies available on https://github.com/groupdocs/groupdocs-slim-annotation-java-spring-sample/tree/master/libs is the full list, why you reference all that libraries in pom.xml?

Thanks,
Mariusz

#4

This is the list of libraries I’m trying to use, I’m attaching also pom.xml file used internally for groupdocs-annotation.

Please let me know whether this is all I need. Also can I remove sqljdbc4 since I don’t plan to use any database?


call mvn install:install-file -Dfile=aspose-email-4.7.0.0-jdk16.jar -DgroupId=com.aspose -DartifactId=aspose-email -Dversion=4.7.0.0 -Dpackaging=jar -Dclassifier=jdk16 -DgeneratePom=true -DcreateChecksum=true
call mvn install:install-file -Dfile=aspose-cells-8.2.2.jar -DgroupId=com.aspose -DartifactId=aspose-cells -Dversion=8.2.2 -Dpackaging=jar -Dclassifier=jdk16 -DgeneratePom=true -DcreateChecksum=true
call mvn install:install-file -Dfile=aspose-imaging-2.1.0.0-jdk16.jar -DgroupId=com.aspose -DartifactId=aspose-imaging -Dpackaging=jar -Dversion=2.1.0.0 -Dclassifier=jdk16 -DgeneratePom=true -DcreateChecksum=true
call mvn install:install-file -Dfile=aspose-pdf-9.5.2-jdk16.jar -DgroupId=com.aspose -DartifactId=aspose-pdf -Dversion=9.5.2 -Dclassifier=jdk16 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true
call mvn install:install-file -Dfile=aspose-slides-14.8.0.jar -DgroupId=com.aspose -DartifactId=aspose-slides -Dversion=14.8.0 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true
call mvn install:install-file -Dfile=aspose-words-14.10.0-jdk16.jar -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=14.10.0 -Dpackaging=jar -Dclassifier=jdk16 -DgeneratePom=true -DcreateChecksum=true
call mvn install:install-file -Dfile=aspose-barcode-6.0.1.0-jdk16.jar -DgroupId=com.aspose -DartifactId=aspose-barcode -Dversion=6.0.1.0 -Dpackaging=jar -Dclassifier=jdk16 -DgeneratePom=true -DcreateChecksum=true
call mvn install:install-file -Dfile=aspose-diagram-3.0.0-jdk6.jar -DgroupId=com.aspose -DartifactId=aspose-diagram -Dversion=3.0.0 -Dpackaging=jar -Dclassifier=jdk16 -DgeneratePom=true -DcreateChecksum=true

call mvn install:install-file -Dpackaging=jar -Dversion=4.0 -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dfile=sqljdbc4.jar
call mvn install:install-file -Dpackaging=jar -Dversion=3.1.3 -DgroupId=com.ice.jni -DartifactId=registry -Dfile=registry-3.1.3.jar

call mvn install:install-file -Dpackaging=jar -Dversion=2.5.0 -DgroupId=com.groupdocs -DartifactId=groupdocs-viewer -Dfile=groupdocs-viewer-2.5.0.jar

call mvn install:install-file -Dpackaging=jar -Dversion=1.1.0 -DgroupId=com.groupdocs -DartifactId=groupdocs-annotation -DpomFile=pom.xml -Dfile=groupdocs-annotation-1.7.0.jar


#5

In other words:


1. I need to know what are the dependencies of the core library. The JDBC library should not be part of it as we don’t use any database.
2. Whether there are any libraries required for the web application integration. As I understand some dependencies are required by the core product and some just for the integration purposes.

We’d like to integrate the library with our software which has two components: core API and the web app. From the core API we should be able to e.g. export the PDF with annotations or Word with track changes, and the web app should be integrated with the viewer using spring-mvc or servlets.
Right now I can see that we cannot use groupdocs in the core product as it has dependencies on web components - servlets etc.
Can you let me know whether this is possible at all? If not, then I just need to know what are the dependencies that are actually required.

Thanks,
Mariusz

#6
Hello Mariusz,

Sorry for the delay with the answer, we had to check all these dependencies in different use-cases.

Dependencies listed here http://search.maven.org/#artifactdetails%7Ccom.groupdocs%7Cgroupdocs-annotation%7C1.7.0%7Cjar contains libraries that are used in the core of the GroupDocs.Annotation or in some of its parts (i.e. meta-data connector, HTTP handlers ...). They are not redundant.

Here https://github.com/groupdocs/groupdocs-slim-annotation-java-spring-sample/tree/master/libs are only those libraries that are absent in the Maven central repository, so you have to install them manually. We provide it to eliminate searching them on the web.

If you do not use the custom meta-data storage functionality then you can freely remove these three dependencies:
mysql
mysql-connector-java
5.1.32
com.microsoft.sqlserver
sqljdbc4
4.0
org.postgresql
postgresql
9.3-1102-jdbc4
</dependen
But this one should remain:
com.thoughtworks.xstream
xstream
1.3.1
It’s used in the Utils class constant variable.

From your pom file you can freely remove this dependency:
com.microsoft.sqlserver
sqljdbc4
4.0
jar

In general there are two ways of including the GroupDocs.Annotation for Java library (slim version) into your project.

First is to install only the slim jar file using install:install-file command:
mvn install:install-file -Dpackaging=jar -Dversion=1.7.0 -DgroupId=com.groupdocs -DartifactId=groupdocs-annotation -Dfile=groupdocs-annotation-1.7.0.jar
Then there will be no dependencies declared and you can declare only those that will be 100% used in your project.

Other way is to let the Maven install the library automatically, then it will load the pom file provide with it (http://search.maven.org/#artifactdetails%7Ccom.groupdocs%7Cgroupdocs-annotation%7C1.7.0%7Cjar). Then exclude those dependencies from your application pom that you do not need, using the tag in the annotation dependency:
com.groupdocs
groupdocs-annotation
${groupdocs.annotation}

It’s hard to say what else should be included into your pom file without seeing the usage of the GroupDocs.Annotation library. Probably, as for the internal GroupDocs.Annotation pom, this one should also be included, because it’s used in the AnnotationHandler:
javax.servlet
javax.servlet-api
${servlet.version}
provided

If you can provide some project to examine it, then we will be able to assist you better.


#7

Thank you. Can you confirm I can remove the dependencies marked on the attached screenshot?


#8

In other words, is that correct if I don’t want to use JDBC and whether there is anything else that I can exclude?


com.groupdocs
groupdocs-annotation
1.7.0
postgresql
org.postgresql
mysql-connector-java
mysql
sqlite-jdbc
org.xerial
slf4j-api
org.slf4j
ormlite-jdbc
com.j256.ormlite
sqljdbc4
com.microsoft.sqlserver

Thank you,
Kind Regards,
Mariusz

#9
Almost correct, you can exclude all those dependencies except these two:
sqlite-jdbc
org.xerial
and
ormlite-jdbc
com.j256.ormlite
sqlite-jdbc is used in the GroupDocs.Viewer.
ormlite-jdbc is used in core meta-data abstract connectors logic of the GroupDocs.Annotation.


#10

Thank you. I hope you can make it lighter at some point, the number of dependencies is outstanding :slight_smile:


Thanks,
Mariusz

#11

You are welcome. Thank you too. We are working on it, but the library itself is a bit specific in the part of its abilities and ways to use them.