# Zk9, itext and maven

afxgroup
126 2

Hi, i'm trying to build a maven project with zk9 but i get this error:

[ERROR] Failed to execute goal on project animatrix: Could not resolve dependencies for project com.anima:animatrix:war:1.1-SNAPSHOT: Could not find artifact com.lowagie:itext:jar:2.1.7.js6 in ZK CE (http://mavensync.zkoss.org/maven2) -> [Help 1]

delete retag edit

Sort by » oldest newest most voted

hawk
2550 1 5
http://hawkphoenix.blogsp...

The required itext dependency located in this repo: http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/

It's strange to have such problem. Because, normally, maven will try several repositories specified in multiple pom.xml. For example, in my local testing:

Downloading: http://mavensync.zkoss.org/maven2/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar


So, maybe you should add ZK EE or EE evaluation repository according to the doc.

afxgroup
126 2

Yes, maven try to find several repositories but didn't find the package in any of it. And ZK EE is already in the project.

Try this:

C:\Users\Utente\IdeaProjects\TMS>mvn -U clean compile [INFO] Scanning for projects... [INFO] [INFO] ------------------------------< TMS:TMS

As you can see it try to download it but it is missed in any repository. The problem is in js6 extension since that one without js6 is available

afxgroup
126 2

Even adding the official Jaspersoft repository doesn't fix the prblem. Try to clean your cache and you will see the problem. I've seen that you are using https://jaspersoft.jfrog.io/jaspersoft/jaspersoft-repo/ as repository. This needs to be added to maven repositories. Otherwise the dependency is not found. Most probably you have in your cache and so is found. In the meanwhile maybe they have moved or renamed .js6 to .js6-SNAPSHOT (or totally removed) and maven can find it

cor3000
5069 2 7

I can only repeat what Hawk already said before: the dependency with the .js6 suffix is in jaspersoft's 3rd party repository in this folder:

http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/lowagie/itext/

Maven performs kind of a brute force search, telling you all the repos it tried. (Obviously it can't know where else to search). Those error messages are kind of frustrating at times, anyway in case that level of detail was missing: here how you can add the repository in question to your dependencies:

Add the repository to your pom.xml file:

<repositories>
...
<repository>
<id>jasper-3rd-party</id>
<url>http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/</url>
</repository>
...


afxgroup
126 2

yes. as i written in my answer, with that repository everything works fine. But it is better to add this to the doc. Otherwise it is impossible to create a maven package without that repository in a maven file. Just this.

somehow I still can't find your previous answer confirming it works ... maybe it was blocked or not submitted successfully, anyway thanks for confirming the 3rd party repo works

( 2020-01-02 10:52:24 +0800 )edit

where would you have searched for this in the docs? I'll add a remark there e.g. here? https://www.zkoss.org/wiki/ZKComponentReference/DiagramsandReports/Jasperreport#Troubleshooting

( 2020-01-02 11:08:20 +0800 )edit
[hide preview]