From Documentation

Jump to: navigation, search

Stop.png This article is out of date, please refer to ZK Installation Guide/Setting up IDE/Maven for more up to date information.







On your machine you will find a directory in called 'm2'. This is where maven stores all downloaded jars and installed projects. Let us assume the user account is USER and the directory might look like as follows.

  • Linux: ~/.m2
  • Windows: C:\Documents and Settings\USER\.m2
  • Vista/Windows7: C:\Users\USER\.m2

All of ZK libraries are under this two folders:

C:\Users\USER\.m2\repository\org\zkoss\common\
C:\Users\USER\.m2\repository\org\zkoss\zk\

You can create a new folder for each library, in this case, we assume it is zul.jar file with ZK 5 RC2 version as below:

C:\Users\USER\.m2\repository\org\zkoss\zk\zul\5.0.4

In this folder, you should put the two files, one is the jar file and the other one is the POM file. For example,

C:\Users\USER\.m2\repository\org\zkoss\zk\zul\5.0.4\zul-5.0.4.jar
C:\Users\USER\.m2\repository\org\zkoss\zk\zul\5.0.4\zul-5.0.4.pom

Note: the version number cannot use the dash sign (-). For example, 5.0.0-RC2 should be 5.0.0.RC2 (you can refer to the version declaration from pom.xml)

After all of the ZK libraries created, you should be able to use the latest version to build the maven project.

Another way is to use the mvn command, that works fine in all platforms.

So once you downloaded the jars you should tipe on a command line prompt, something like this:

mvn install:install-file -DgroupId=org.zkoss.zk -DartifactId=zul -Dversion=5.0.4 -Dpackaging=jar -Dfile=zul-5.0.4.jar

The file zul-5.0.4.jar have to be on the same folder wher you run the command, if not so, you just need to use the full path to the file.

When the command is complete, get a look to yor local maven repository, and you should find there the jar installed in the correct tree folders and the right pom file there.

Please take care that the groupId and artifactId depends on the jar packaging, so get a look to the ZK releases on maven, to put the properly informations.

Version History

Version Date Content
     




Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.