AppFuse: removing auto-generated classes
Posted by Martin Homik | Posted in WebApp | Posted on 12-07-2007
0
AppFuse is an application-framework based on the latest software developments. One extremely useful feature is automatic generation of code (snippets) from POJO classes. Unfortunately, there is no auto-deinstall function. So once, you have generated and installed code automatically, you have to remove the code snippets by hand.Here is a short description how to proceed. Let’s assume, you did not go through the full “Person” tutorial. Instead you implemented a POJO class including annotations and ran ‘mvn appfuse:gen|install -Dentity=Person’. To remove “Person” from project you have to delete:
- src/main/java/**/model/Person.java
- src/main/java/**/model/webapp/action/PersonAction.java
- src/test/java/**/model/webapp/action/PersonActionTest.java
- src/main/resources/**/model/Person-validation.xml
- src/main/resources/**/webapp/action/PersonAction-validation.xml
- src/main/webapp/WEB-INF/pages/personForm.jsp
- src/main/webapp/WEB-INF/pages/personList.jsp
Remove “Person” related entries from the following files:
- src/main/resources/hibernate.cfg.xml Delete mapping to Person modell class.
- src/main/resources/struts.xml Delete all Person actions.
- src/main/resources/ApplicationResources.properties Delete properties related to Person. Also delete properties inside other languages.
- src/main/webapp/common/menu.jsp Delete entry for Person
- src/main/webapp/WEB-INF/applicationContext.xml Delete Person related beans.
- src/main/webapp/WEB-INF/menu-config.xml Delete Person section.
- src/test/resources/sample-data.xml Delete Person mockup data.
- src/test/resources/web-tests.xml Delete Person Canoo web test data. Don’t forget to delete PersonTests in the top target.

