The major features in this release are JSF 1.2, Tapestry 4.1 and improved Code Generation. In addition, we've addressed over 100 issues in preparation for the final 2.0 release. We hope to fix any bugs related to this release and release 2.0 Final in the next week or two.
Please see about the AppFuse Maven Plugin (AMP) for more information on how to generate code and import AppFuse source into your project.
Please see the Upgrade Guide below or the QuickStart Guide to get started with this release.
Upgrade Guide
If you're currently using AppFuse 2.0 M5, here's a few things you'll need to change to upgrade to 2.0 RC1. If you're using a version prior to 2.0 M5, you may want to follow previous upgrade instructions first.
| Diff is your friend The easiest way to make the changes below might be to compare your pom.xml, web.xml and web-tests.xml with the ones from a new archetype. Beyond Compare is a fabulous diff tool for Windows users. |
- Backup your project on your local file system or (even better) in your source control system.
- In pom.xml, change <appfuse.version>2.0-m5</appfuse.version> to <appfuse.version>2.0-rc1</appfuse.version>.

If you've used war:inplace
If you've used mvn war:inplace in your project, make sure you remove your WEB-INF/classes and re-run war:inplace:rm -r src/main/webapp/WEB-INF/classes
- Maven's war overlay feature is based on timestamps. If you've overridden AppFuse files in your project, you'll need to "touch" them in order to give them a newer timestamp. Here's a sample of what you might run:
touch src/main/webapp/* touch src/main/webapp/scripts/* touch src/main/webapp/WEB-INF/* touch src/main/webapp/WEB-INF/pages/*
Another, more permanent, solution is to use <dependentWarExcludes> to prevent the files from being overlayed.
- JPA: The JPA implementation has changed from jpa-hibernate to jpa to allow greater flexibility in AppFuse's JPA implementation in future releases. This philosophy follows what we're doing with appfuse-jsf. If you're using <dao.framework>jpa-hibernate</dao.framework> in M5, you'll need to use <dao.framework>jpa</dao.framework> in RC1.
- Change <spring.version> to 2.0.6 if you have it specified in your pom.xml.
- The maven-warpath-plugin has a new version of 1.0-rc1. Update your pom.xml.
- Admin-only screens have been moved to /admin/*. You may need to update your web framework's configuration file as well as web-tests.xml to accomodate this change. See APF-673 for more information.
About the AppFuse Maven Plugin
This release marks the second release of the AppFuse Maven Plugin (AMP). This plugin currently does two things: 1) code generation for CRUD and 2) allows you to convert your project to use AppFuse's source instead of using its binary dependencies.
Generating CRUD with AMP
In the 2.0 RC1 release, you can run the following command to generate CRUD screens/classes for a POJO:
mvn appfuse:gen -Dentity=Name
If you don't specify the entity name, you will be prompted for it. Currently, if a @Column has "nullable = false", a "required field" validation rule will be generated as part of the web framework's validation configuration. This command will also install the generated code, unless you specify -DdisableInstallation=true.
If your entity is not defined in hibernate.cfg.xml, it will be added.
In a modular project, these commands must be run in the "core" and "web" modules. The plugin is smart enough to figure out when it should/should not generate stuff based on the packaging type (jar vs. war). If you want to generate specific code in a "war" project, you can use gen-core or gen-web.
There's also a goal that allows you to generate model objects from database tables.
appfuse:gen-model
This goal will install the generated files into your source tree, unless you specify -DdisableInstallation=true. After running this command, you can use appfuse:gen to generate CRUD classes/tests/screens for this object.
Installing AppFuse's source into your project
The good news is creating an "old style" project is now pretty easy. If you create a new project using 2.0-rc1, you can now use:
mvn appfuse:full-source
This goal will convert your project to use all of AppFuse's source and remove all dependencies on AppFuse.
What the full-source plugin does:
- Exports all sources from Subversion into your project. It reads the dao.framework and web.framework properties to determine what you need.
- Removes warpath plugin from pom.xml.
- Calculates dependencies by reading pom.xml files form the various AppFuse modules. It replaces your dependencies with these new ones. The order of the dependencies added is alphabetical based on groupId.
- Reads properties from the root AppFuse pom.xml and adds the ones that don't exist to your project. The order of the properties added is alphabetical.
- Renames packages from org.appfuse to your project's groupId.
If you have issues developing AppFuse in Eclipse or NetBeans because of the WarPath plugin, running "appfuse:full-source" should fix that problem. It removes the warpath plugin as part of its installation process.