Building an Institutional Plugin using Maven
Overview
The purpose of this tutorial is to familiarize Kuali Rice developers with building institutional plugins that override out-of-the-box Rice services. This tutorial focuses on overriding the IdentityService as an example.
Prerequisites
Download Rice Foundation Codebase into <workspace>\rice-0.9.4
Configure Maven Repository
Development Environment
Build Sheet
Create Maven Project
At a command prompt, navigate to your <workspace> (e.g. C:\Development\KualiRice.workspace)
Create a web application project using the maven-archetype-quickstart archetype
<workspace> mvn archetype:create -DgroupId=edu.ucdavis.iet.kuali.rice -DartifactId=ucd-kim-impl -DarchetypeArtifactId=maven-archetype-quickstartNavigate to the ucd-kim-impl subdirectory and generate the Eclipse project
<workspace>\ucd-kim-impl> mvn eclipse:eclipse
Import into Eclipse
Go to File -> Import -> Existing projects into Workspace
Select <workspace>\ucd-kim-impl as the root directory and click Finish
Configure POM
Define base properties:
Add dependency properties:
Add dependencies:
Spring LDAP Core
Spring
Rice API
Rice Implementation
Common Lang
DB OJB
Servlet API
Xalan-J
IET LDAP Widget
Add repository for Spring LDAP Core
Declare Spring Beans
Configure Dependencies on the Build Path
Method A:
In the Java Build Path dialog box, click on the Libraries tab
Click Add Variable
Select M2_REPO and click OK
Select the variable you just added and click Edit, then Extenstion
Select the appropriate JAR from the Maven repository hierarchy (e.g. spring-2.5.5.jar will be in org/spring/framework/spring/2.5.5)
Repeat for all other dependencies
Method B:
In the Java Build Path dialog box, click on the Libraries tab
Click Add External JARs
Select the appropriate JAR from your file system (e.g. C:\JavaLib\spring-framework-2.5.5\dist\spring.jar)
Repeat for all other dependencies
Build the JAR
Method A:
Compile the source code by selecting Project -> *Build Project (alternatively, configure Eclipse to always Build Automatically)
At the command prompt, create a JAR from the compiled code
<workspace>\ucd-kim-impl> mvn jar:jar