ICEfaces 3.0.x and Maven

compared with
Current by Deryk Sinotte
on Oct 01, 2012 21:43.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

  h2. Using ICEfaces 3.0.x with Maven
  h2. ICEfaces 3.0.x and Maven
  
 If you are a Maven user, there are a couple of different ways for getting the ICEfaces 3.0.x libraries for use in your project. You can use the libraries provided from the ICEfaces Maven Repository or you can compile and build the source code locally and install those libraries into your local Maven repository.
  
 h3. From the ICEfaces Maven Repository
  
 The Maven poms and jars for this distribution are located in the following ICEfaces Maven repository. Just add this repository entry to your own .pom files:
  
 {code}
  <repository>
  <id>snapshots</id>
  <url>http://anonsvn.icefaces.org/repo/maven2/releases/</url>
  </repository>
 {code}
  
 Then you can add the dependencies for the libraries you wish to use. For example to add the ACE components and the transitive dependency on ICEfaces:
  
 {code}
  <dependency>
  <groupId>org.icefaces</groupId>
  <artifactId>icefaces-ace</artifactId>
  <version>3.0.1</version>
  </dependency>
 {code}
  
  
 h3. Building and Installing to Local Maven Repository
  
 In ICEfaces 3.0.x, there is no support for building the ICEfaces libraries themselves using Maven. ICEfaces source code can only be compiled and packaged into .jar files by Ant. If you have [downloaded|http://www.icefaces.org/main/downloads/os-downloads.iface/] the Source distribution bundle of ICEfaces, you will need to:
  
 * Compile and build the ICEfaces libraries.
 * Install them into your local Maven repository.
  
 h3. Compile and Build with Ant
  
 {tip}The ICEfaces Binary distribution bundle comes with prebuilt ICEfaces libraries so the steps in this section are not necessary.{tip}
  
 To build the ICEfaces libraries, open a console or shell and navigate to the "icefaces" directory where you unzipped the ICEfaces distribution. Then, in the console, type the following and press Enter:
  
 {code}> ant allclean world{code}
  
 This builds all of the ICEfaces libraries and sample applications suitable for deployment to any JEE 6 Web Profile platform, such as Glassfish 3.
  
  
 h3. Install to Local Maven Repository
  
 The _\[icefaces.install.dir\]/icefaces/maven2_ folder contains an Ant build script for doing the required Maven tasks. To use this script:
  
 * Modify the contents of the file _\[icefaces.install.dir\]/icefaces/maven2/build.properties_ so that the _local.repository_ property is set to the path of your local Maven repository. For example:
  
 {code}local.repository=/Users/myName/.m2/repository/{code}
  
 To install the ICEfaces .jar files into your local Maven repository, open a shell or console window and navigate to _\[icefaces.install.dir\]/icefaces/maven2_.
  
 * Download the the maven library that allows Ant to perform the required Maven tasks (this should only need to be done once). Type the following and hit Enter:
  
 {code}> ant get-maven{code}
  
 * To install the ICEfaces libraries into your local Maven repository, type the following and hit Enter:
  
 {code}> ant install{code}
  
 The locally built ICEfaces .jar files should now be installed in the local Maven repository of your machine and you can now add them as dependencies in your .pom files as outlined in the first section of this page.

© Copyright 2021 ICEsoft Technologies Canada Corp.