ZK application with Maven, versions 6.5 and 7

asked 2014-04-26 19:27:39 +0800

tomr gravatar image tomr
1 1

updated 2014-04-26 19:28:59 +0800

I am trying to use ZK Studio with ZK 7 and create new Maven project with ZK Maven Archetype, but currently there are only version 6.0 or version 6.5 archetypes available (version 7.0 ir available for zk-archetype-theme and I am not using it because it seems to be no real world project ready).

The question is - can these archetypes be used for ZK 7.0 application. Or, at least, maybe there is good practice how to adapte those archetypes for ZK 7.0 application?

I have tried to use existing 6.x archetypes and strange thins are happening: 1) Eclipse (upon startup) askes whether to upgrade projects to the new Maven version. Is I agree, then update is started but it hangs entire Eclipse. Aparently something is downloaded very slow; 2) Eclipse in some places requires m2e connectors, but automatic discovery and download also fails. May catalog URL has default value: download.eclipse.org/technology/m2e/discovery/directory-1.4.xml (Eclipse Preferences - Maven - Discovery), maybe it should be changed?

3) And then there are Maven exceptions (that invalidates pom.xml file when the project has enabled Maven nature):

ArtifactTransferException: Failure to transfer org.zkoss.zk:zkbind:jar:6.5.2 from mavensync.zkoss.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of ZK CE has elapsed or updates are forced. Original error: Could not transfer artifact org.zkoss.zk:zkbind:jar:6.5.2 from/to ZK CE (mavensync.zkoss.org/maven2):

No response received after 60000

Missing artifact javassist:javassist:jar:3.12.1.GA

All of this I am trying to do inside the Spring Tool Suite 3.4.0 (based on Eclipse 4.3.1). OK, maybe there are some inconsistenceis and more than not ZK is not responsible for all the errors, but I just want to start ZK demo projects or create new ones but there error prohibits me to do so.

p.s. protocol name http: is removed from the links above in this post, so, the problem is not about them.

Any help is appreciated. Thanks in advance! Tom

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-27 09:58:02 +0800

nmpallas gravatar image nmpallas
115 4

Hi Tom, from what it looks like from your description, you are facing more a problem in the devel environment configuration than actually a problem with ZK. Personally I don't use archetypes, but only creating with Eclipse(Kepler version) a maven project with war packaging. Then simply add the necessary zk deps on your pom.xml file and you are done. The archetypes on the other hand don't bind necessarily with the version of ZK you want to use. You can use 6.5 create the project with the archetype and then again edit your pom.xml file and set the version to 7. Maybe some deps need to be adjusted but that's an easy task. The maven related issues you describe it's clear you need to check your settings.xml file of your maven configuration and also please provide some information how you have configured inside probably your pom.xml files the extra repositories your are using to fetch deps.

happy hacking Nick

link publish delete flag offensive 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

1 follower



Asked: 2014-04-26 19:27:39 +0800

Seen: 54 times

Last updated: Apr 27 '14

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