We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

Unable to build E:\Tools\GroupBox\GroupDocs.Viewer-for-Java-master\Demos modules

Hello,
I’m trying to build the Demos modules (Dropwizard and Spring) but I have an error:
E:\Tools\GroupBox\GroupDocs.Viewer-for-Java-master\Demos\Dropwizard>mvn clean compile exec:java
[INFO] Scanning for projects…
[INFO]
[INFO] ----------------------< com.groupdocs.ui:viewer >-----------------------
[INFO] Building GroupDocs.Viewer Dropwizard 1.14.42
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.199 s
[INFO] Finished at: 2021-10-19T12:19:49+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project viewer: Could not resolve dependencies for project com.groupdocs.ui:viewer:jar:1.14.42: Failed to collect dependencies at com.groupdocs:groupdocs-viewer:jar:20.7: Failed to read artifact descriptor for com.groupdocs:groupdocs-viewer:jar:20.7: Could not transfer artifact com.groupdocs:groupdocs-viewer:pom:20.7 from/to maven-default-http-blocker http://0.0.0.0/: Blocked mirror for repositories: [com.springsource.repository.bundles.external http://repository.springsource.com/maven/bundles/external, default, releases+snapshots, GroupDocsJavaAPI (http://artifact.groupdocs.com/repo/, default, releases+snapshots)] -> [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

Do you know what is incorrect?
thanks in advance

@sonaca.rodriguez

Thank you for reporting this issue. It has been fixed in this commit by updating repository URLs in the pom.xml file to use HTTPS instead of HTTP since HTTP is not supported now. Please pull the latest version from GitHub or update your pom.xml.

It works now!
thanks!

just a little detail: you did the modification for Dropwizard but not for Spring.
I did it by myself on my local copy but you should do it on gitub too.

@sonaca.rodriguez

Updated Spring’s pom.xml too, thanks for catching it.

logfile.7z (4.2 KB)
sorry but it is not done…
I tried to compile Spring module and I have this attached error…
I don’t know how to handle this…

@sonaca.rodriguez

Thank you for sharing the log. Can you please check which Java version you’re using by typing java -version in a terminal? The Java 8 or 9 is recommended for Spring 2.0.4.RELEASE.

I use the last version of java:

E:\Tools\GroupBox\GroupDocs.Viewer-for-Java-master\Demos\Spring>java -version
java version “17” 2021-09-14 LTS
Java™ SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot™ 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)

@sonaca.rodriguez

Thanks, we’re investigating this issue and update you when we have any information.

Thanks a lot for your help! For your information, we are currently testing this solution to see if it could be used on our application. If the result is good, we are plannig to buy the solution

@sonaca.rodriguez

It seems that the version of Spring that we’re using is not compatible with your version of Java. While we continue to investigate this issue, can you try switching to e.g JDK 1.8? To switch Java version on Windows you have to set JAVA_HOME environment variable e.g to JAVA_HOME=c:\Program Files\Java\jdk1.8.0_162\ and PATH environment variable to PATH=%JAVA_HOME%\bin;%PATH%.

I installed the jdk1.8.0_301 and it works now

@sonaca.rodriguez

Great, thanks for the feedback. We’ve already planned to update Spring Demo and will let you know when the update is completed.

@sonaca.rodriguez

The Spring demo has been updated and tested with OpenJDK 17. Please give it a try and let us know if you have any issues.