Using Maven"

From Documentation
Line 1: Line 1:
 
{{ZKPivottableEssentialsPageHeader}}
 
{{ZKPivottableEssentialsPageHeader}}
  
== Repository ==
+
__TOC__
 +
 
 +
This section describes the Maven settings required to use ZK Pivottable in your application. Please refer to [http://books.zkoss.org/wiki/ZK_Installation_Guide/Setting_up_IDE/Maven/Resolving_ZK_Framework_Artifacts_via_Maven this article] for the Maven settings for ZK Framework.
 +
 
 +
== Repository ==
 +
 
 +
You would refer to different repositories in your pom.xml depending on whether you are evaluating or you are a premium user.
 +
 
 +
1. Evaluating users (60-days free evaluation)
 +
 
 +
* http://mavensync.zkoss.org/eval
  
 
<source lang="xml">
 
<source lang="xml">
 
<repositories>
 
<repositories>
 
<repository>
 
<repository>
<id>zk eval repository</id>
+
<id>ZK Evaluation Repository</id>
 
<url>http://mavensync.zkoss.org/eval</url>
 
<url>http://mavensync.zkoss.org/eval</url>
 
</repository>
 
</repository>
Line 12: Line 22:
 
</source>
 
</source>
  
== Artifacts ==
+
2. Premium users only
 +
 
 +
* <span style="color:red">'''Notice'''</span>: Need [[ZK_Pivottable_Essentials/Quick_Start/Using_Maven#Login_authentication|Login authentication]]
 +
 
 +
: If you are our customer or ZOL licensed user, please contact [mailto:info@zkoss.org info@zkoss.org] to apply for a premium maven account to use ZK Premium Maven Repository.
 +
 
 +
* http://maven.zkoss.org/repo/zk/ee
 +
 
 +
<source lang="xml">
 +
<repositories>
 +
<repository>
 +
<id>ZK EE Repository</id>
 +
<url>https://maven.zkoss.org/repo/zk/ee</url>
 +
</repository>
 +
</repositories>
 +
</source>
 +
 
 +
=== Login authentication ===
 +
 
 +
Please refer to the [http://maven.apache.org/settings.html#Servers official documentation] of Apache Maven project for storing login authentication credential in the global settings file.
 +
 
 +
* Location (if not already existed, you can create it manually)
 +
** Maven installation root:  <u>$M2_HOME/conf/settings.xml</u> - OR -
 +
** User's Maven root: <u>${user.home}/.m2/settings.xml</u>
 +
 
 +
<source lang="xml">
 +
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
 +
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 +
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
 +
http://maven.apache.org/xsd/settings-1.0.0.xsd">
 +
<servers>
 +
<server>
 +
<id>ZK EE Repository</id><!-- Same as the repository name used in your pom.xml -->
 +
<!-- Please replace the following with your premium username and password -->
 +
<username>premium</username>
 +
<password>2k0553cr3t</password>
 +
</server>
 +
</servers>
 +
</settings>
 +
</source>
 +
 
 +
=== Troubleshooting ===
 +
If you were a customer having a premium account and your Maven reported the following error message:
 +
 
 +
'''sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target'''
 +
 
 +
Please contact [mailto:info@zkoss.org info@zkoss.org] to request a certificate file and import the certificate using keytool:
 +
<source lang="xml">
 +
keytool –import –noprompt –trustcacerts –alias ALIASNAME -file FILENAME_OF_THE_INSTALLED_CERTIFICATE -keystore PATH_TO_CACERTS_FILE -storepass PASSWORD
 +
</source>
 +
'''Note''': The initial password of the "cacerts" keystore file is "changeit". Please refer to [http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html here] for detail.
 +
 
 +
'''Example:'''
 +
 
 +
<source lang="xml">
 +
keytool -import -noprompt -trustcacerts -alias ZKOSS_root_CA -file C:\maven_test\ZKOSS_root_CA.crt -keystore "C:\Program Files\Java\jdk1.6.0_18\jre\lib\security\cacerts" -storepass changeit
 +
</source>
 +
 
 +
== Dependency ==
 +
 
 +
The dependency setting in your pom.xml stays the same regardless of your user status (evaluating or a premium customer).
  
 
<source lang="xml">
 
<source lang="xml">
+
<dependencies>
<dependency>
+
<dependency>
<groupId>org.zkoss.pivot</groupId>
+
<groupId>org.zkoss.pivot</groupId>
<artifactId>pivottable</artifactId>
+
<artifactId>pivottable</artifactId>
<version>2.0.0</version>
+
<version>2.0.1</version>
</dependency>
+
</dependency>
+
</dependencies>
 
</source>
 
</source>
  
==Version History==
+
== Version History ==
 
{{LastUpdated}}
 
{{LastUpdated}}
 
{| border='1px' | width="100%"
 
{| border='1px' | width="100%"

Revision as of 09:27, 3 May 2013


This section describes the Maven settings required to use ZK Pivottable in your application. Please refer to this article for the Maven settings for ZK Framework.

Repository

You would refer to different repositories in your pom.xml depending on whether you are evaluating or you are a premium user.

1. Evaluating users (60-days free evaluation)

	<repositories>
		<repository>
			<id>ZK Evaluation Repository</id>
			<url>http://mavensync.zkoss.org/eval</url>
		</repository>
	</repositories>

2. Premium users only

If you are our customer or ZOL licensed user, please contact info@zkoss.org to apply for a premium maven account to use ZK Premium Maven Repository.
<repositories>
	<repository>
		<id>ZK EE Repository</id>
		<url>https://maven.zkoss.org/repo/zk/ee</url>
	</repository>
</repositories>

Login authentication

Please refer to the official documentation of Apache Maven project for storing login authentication credential in the global settings file.

  • Location (if not already existed, you can create it manually)
    • Maven installation root: $M2_HOME/conf/settings.xml - OR -
    • User's Maven root: ${user.home}/.m2/settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
		http://maven.apache.org/xsd/settings-1.0.0.xsd">
	<servers>
		<server>
			<id>ZK EE Repository</id><!-- Same as the repository name used in your pom.xml -->
			<!-- Please replace the following with your premium username and password -->
			<username>premium</username>
			<password>2k0553cr3t</password>
		</server>
	</servers>
</settings>

Troubleshooting

If you were a customer having a premium account and your Maven reported the following error message:

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Please contact info@zkoss.org to request a certificate file and import the certificate using keytool:

keytool –import –noprompt –trustcacerts –alias ALIASNAME -file FILENAME_OF_THE_INSTALLED_CERTIFICATE -keystore PATH_TO_CACERTS_FILE -storepass PASSWORD

Note: The initial password of the "cacerts" keystore file is "changeit". Please refer to here for detail.

Example:

keytool -import -noprompt -trustcacerts -alias ZKOSS_root_CA -file C:\maven_test\ZKOSS_root_CA.crt -keystore "C:\Program Files\Java\jdk1.6.0_18\jre\lib\security\cacerts" -storepass changeit

Dependency

The dependency setting in your pom.xml stays the same regardless of your user status (evaluating or a premium customer).

<dependencies>	
	<dependency>
		<groupId>org.zkoss.pivot</groupId>
		<artifactId>pivottable</artifactId>
		<version>2.0.1</version>
	</dependency>
</dependencies>

Version History

Last Update : 2013/05/03


Version Date Content
2.0.0 June 2012 Add Maven information



Last Update : 2013/05/03

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