1 / 7

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

Lin-Long Shyu System Analyst Kuali Coeus Technical Team Indiana University shyu@indiana.edu. Customization with maven war/overlay. Provide configuration for institutional customization Extend Override Use Maven overlay Maven What is it?: build, dependency, project management tool

Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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

  3. 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>

  4. 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.

  5. 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>

  6. 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_custom • create war file for kc_custom with the overlay of kc_project

  7. 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>

More Related