Setting Up ZK Spring using Maven"

From Documentation
Line 5: Line 5:
 
Setup ZK Spring Integration Library using maven configurations.
 
Setup ZK Spring Integration Library using maven configurations.
 
===Example===
 
===Example===
 +
==== Add ZK Maven repository to your pom.xml file ====
 +
By default while resolving project dependencies Maven will only look into Maven central repository [http://repo1.maven.org/maven2]. In order to use ZK Maven repository add following <repositories> element into pom.xml under the root <project> element.
 +
 +
<source lang="xml">
 +
<repositories>
 +
    <repository>
 +
      <id>zk repository</id>
 +
      <url>http://mavensync.zkoss.org/maven2</url>
 +
    </repository>
 +
  </repositories>
 +
</source>
 +
 +
Note that ZK Maven repository URL is [http://mavensync.zkoss.org/maven2 http://mavensync.zkoss.org/maven2].
 +
 +
==== Adding ZK Spring library dependencies  ====
 +
 +
You can declare these dependencies in pom.xml file and Maven can resolve them by automatically connecting to [http://mavensync.zkoss.org/maven2 ZK Maven repository] Here is how you can declare a dependency for ZK Spring library for your project.
 +
 +
<source lang="xml">
 +
<dependency>
 +
<groupId>org.zkoss.zk</groupId>
 +
<artifactId>zkspring-core</artifactId>
 +
<version>3.0</version>
 +
</dependency>
 +
<dependency>
 +
<groupId>org.zkoss.zk</groupId>
 +
<artifactId>zkspring-webflow</artifactId>
 +
<version>3.0</version>
 +
</dependency>
 +
<dependency>
 +
<groupId>org.jboss.el</groupId>
 +
<artifactId>com.springsource.org.jboss.el</artifactId>
 +
<version>2.0.0.GA</version>
 +
</dependency>
 +
</source>
  
 
===Configuration===
 
===Configuration===

Revision as of 04:42, 17 November 2011

Setting Up ZK Spring using Maven



Subsections:


WarningTriangle-32x32.png This page is under construction, so we cannot guarantee the accuracy of the content!

Purpose

Setup ZK Spring Integration Library using maven configurations.

Example

Add ZK Maven repository to your pom.xml file

By default while resolving project dependencies Maven will only look into Maven central repository [1]. In order to use ZK Maven repository add following <repositories> element into pom.xml under the root <project> element.

 <repositories>
    <repository>
      <id>zk repository</id>
      <url>http://mavensync.zkoss.org/maven2</url>
    </repository>
  </repositories>

Note that ZK Maven repository URL is http://mavensync.zkoss.org/maven2.

Adding ZK Spring library dependencies

You can declare these dependencies in pom.xml file and Maven can resolve them by automatically connecting to ZK Maven repository Here is how you can declare a dependency for ZK Spring library for your project.

<dependency>
	<groupId>org.zkoss.zk</groupId>
	<artifactId>zkspring-core</artifactId>
	<version>3.0</version>
</dependency>
<dependency>
	<groupId>org.zkoss.zk</groupId>
	<artifactId>zkspring-webflow</artifactId>
	<version>3.0</version>
</dependency>
<dependency> 
	<groupId>org.jboss.el</groupId>
	<artifactId>com.springsource.org.jboss.el</artifactId> 
	<version>2.0.0.GA</version> 
</dependency>

Configuration

  • You need to declare Spring ContextLoaderListener in the web.xml file to be able to declare and register your Spring beans with Spring framework.
<listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

Version History

Last Update : 2011/11/17


Version Date Content
     


Last Update : 2011/11/17

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