0

Zk9, itext and maven

asked 2019-12-22 17:58:40 +0800

afxgroup gravatar image afxgroup
126 2

updated 2019-12-25 14:24:22 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

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 flag offensive retag edit

5 Answers

Sort by ยป oldest newest most voted
0

answered 2019-12-25 14:23:25 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2019-12-26 10:48:33 +0800

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
Downloading: http://mavensync.zkoss.org/zk/ee-eval/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar
Downloading: https://maven.zkoss.org/repo/zk/ee/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar
Downloading: https://repo.maven.apache.org/maven2/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar
Downloading: https://maven.nuxeo.org/nexus/content/groups/public/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar
Downloading: http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar
Downloaded: http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar (1105 KB at 652.7 KB/sec)

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

link publish delete flag offensive edit
0

answered 2019-12-28 18:31:49 +0800

afxgroup gravatar image 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

------------------------------- [INFO] Building TMS 1.0.0 [INFO] --------------------------------[ war ]--------------------------------- Downloading from ZK CE: http://mavensync.zkoss.org/maven2/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.pom Downloading from ZK EE: https://maven.zkoss.org/repo/zk/ee/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.pom Downloading from central: https://repo.maven.apache.org/maven2/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.pom Downloading from zk repository: http://mavensync.zkoss.org/maven2/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.pom [WARNING] The POM for com.lowagie:itext:jar:2.1.7.js6 is missing, no dependency information available Downloading from ZK CE: http://mavensync.zkoss.org/maven2/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar Downloading from ZK EE: https://maven.zkoss.org/repo/zk/ee/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar Downloading from central: https://repo.maven.apache.org/maven2/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar Downloading from zk repository: http://mavensync.zkoss.org/maven2/com/lowagie/itext/2.1.7.js6/itext-2.1.7.js6.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.992 s [INFO] Finished at: 2019-12-28T11:29:22+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project TMS: Could not resolve dependencies for project TMS:TMS:war:1.0.0: Could not find artifact com.lowagie:itext:jar:2.1.7.js6 in ZK CE (http://mave nsync.zkoss.org/maven2) -> [Help 1]

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

link publish delete flag offensive edit
0

answered 2019-12-28 18:45:12 +0800

afxgroup gravatar image 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

link publish delete flag offensive edit
0

answered 2019-12-28 21:02:37 +0800

cor3000 gravatar image cor3000
6280 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>
        <name>your custom repo</name>
        <url>http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/</url>
    </repository>
    ...
link publish delete flag offensive edit
0

answered 2019-12-28 23:57:24 +0800

afxgroup gravatar image 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.

link publish delete flag offensive edit

Comments

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

cor3000 ( 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

cor3000 ( 2020-01-02 11:08:20 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2019-12-22 17:58:40 +0800

Seen: 27 times

Last updated: Dec 28 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More