Posted by: Jay Jonas | September 11, 2008

AppFuse: removing auto-generated classes

Martin Homi, from Think.Reflect.Act, wrote this usefull post. I reproduce it here as part of a kind of a Log Post.

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.