7
open source administration software for education research administration Lin-Long Shyu System Analyst Kuali Coeus Technical Team Indiana University [email protected]

Lin-Long Shyu System Analyst Kuali Coeus Technical Team Indiana University shyu@indiana

Embed Size (px)

DESCRIPTION

Lin-Long Shyu System Analyst Kuali Coeus Technical Team Indiana University [email protected]. Customization with maven war/overlay. Provide configuration for institutional customization Extend Override Use Maven overlay Maven What is it?: build, dependency, project management tool - PowerPoint PPT Presentation

Citation preview

Page 1: Lin-Long Shyu System Analyst Kuali  Coeus  Technical Team Indiana University shyu@indiana

open source administration software for education

research administration

Lin-Long ShyuSystem AnalystKuali Coeus Technical TeamIndiana [email protected]

Page 2: Lin-Long Shyu System Analyst Kuali  Coeus  Technical Team Indiana University shyu@indiana

open source administration software for education

Customization with maven war/overlay

Provide configuration for institutional customization Extend Override

Use Maven overlay Maven

• What is it?: build, dependency, project management tool• Good : Dependency Management, many plugins, works with Eclipse• Bad : Poor documentation, rigid, high learning curve, not all plugins well tested.

Maven/war plugin/Overlay• shares common resources across multiple web applications.• Merges between an original war and other code/files that you develop.

KC uses maven

Confluence page Link : https://wiki.kuali.org/x/AoApDw

Page 3: Lin-Long Shyu System Analyst Kuali  Coeus  Technical Team Indiana University shyu@indiana

open source administration software for education

Use Case : Services, struts actions, and forms

Spring : Bean customization, mostly services. CustomSpringBeans.xml :

• overrides kc spring beans• adds new beans. • This file name is hard coded in KraServiceLocator.java.

Struts-config : action and form classes. struts-custom-config.xml :

• overrides kc's struts configuration • adds new struts configuration. • This file is defined in web.xml. <param-value>/WEB-INF/struts-config.xml, /WEB-INF/struts-custom-

config.xml</param-value>

Page 4: Lin-Long Shyu System Analyst Kuali  Coeus  Technical Team Indiana University shyu@indiana

open source administration software for education

Use Case : OJB, Configuration, Web Content

OJB repository : new classes. repository-custom.xml :

• override kc's OJB descriptors • add new class descriptors. • defined in CustomSpringBeans.xml.

<bean id="customModuleConfiguration-parentBean" class="org.kuali.rice.kns.bo.ModuleConfiguration" abstract="true"> <property name="initializeDataDictionary" value="true" /> <property name="databaseRepositoryFilePaths"> <list> <value>org/kuali/kra/custom/repository-custom.xml</value> </list> </property>

Configuration extension. kc-config-custom.xml

• add institution specific configuration. This file name is set in kc-config.xml. <param name="config.location">classpath:META-INF/kc-config-custom.xml</param>

Web content : jsp/tag/scripts/images are automatically overlayed by maven/overlay.

Page 5: Lin-Long Shyu System Analyst Kuali  Coeus  Technical Team Indiana University shyu@indiana

open source administration software for education

Use Case : Data Dicitonary

DD : modify bo properties. Rule class Authorization class Defined in CustomSpringBeans.xml. <bean id="customModuleConfiguration-parentBean"

class="org.kuali.rice.kns.bo.ModuleConfiguration" abstract="true"> <property name="dataDictionaryPackages"> <list> <value>org/kuali/kra/custom/datadictionary</value> </list> </property> </bean>

Page 6: Lin-Long Shyu System Analyst Kuali  Coeus  Technical Team Indiana University shyu@indiana

open source administration software for education

Steps to create KC_custom project

check out from svn Or Create kc_custom from scratch https://test.kuali.org/svn/kc_custom

Apply patch to kc_project R2. Customization configurations files not included in R2

install kc_project to local maven repository mvn -Dmaven.test.skip=true install

do customization in kc_customcreate war file for kc_custom with the overlay of

kc_project

Page 7: Lin-Long Shyu System Analyst Kuali  Coeus  Technical Team Indiana University shyu@indiana

open source administration software for education

Issues and work around

Eclipse Jetty Debug configuration 8080 "/kc-dev" "/target/kc_custom-1.0-SNAPSHOT" default : 8080 "/kc-dev" "/web/src/main/webapp“

Unit test loading classes issue : classes in multiple jar files and folders

• Delete 'lib' and 'classes' folders in /%PROJECT_DIRECTORY%/kc_custom/target/kc_custom-1.0-SNAPSHOT/WEB-INF. Relative Web root :

• kc-test-config-custom.xml : It contains the custom web root. <config> <param name="custom.webroot">/target/kc_custom-1.0-SNAPSHOT</param> </config>

POM file inheritance option 1 : copy from Kc and modify. option 2 :

• create pom_custom.xml in kc_project, which is a copy from pom.xml, and change 'packaging' to 'pom'. • add 'parent' element to kc_custom's pom.xml.

<parent> <groupId>org.kuali.kra</groupId> <artifactId>kc_project</artifactId> <version>2.0</version> <relativePath>../kc_project/pom_custom.xml</relativePath> </parent>