Skip navigation

Release Notes 2.0.2
Added by Matt Raible, last edited by Mike P on Jun 27, 2008 10:35
(None)

Toggle Sidebar

This release contains several bug fixes as well as the ability to easily customize code generation templates.

Please see the Upgrade Guide below or the QuickStart Guide to get started with this release. If you're upgrading from a previous release, you may be interested in the changelog.

Upgrade Guide

If you're currently using AppFuse 2.0.1, there's a few things you'll need to change to upgrade to 2.0.2. If you're using a version prior to 2.0.1, 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, ApplicationResources.properties, web.xml and web-tests.xml with the ones from a new archetype. To do this, create a new project using 2.0.2, then compare the top-level directory of your project with the new one.
  • Beyond Compare is a fabulous diff tool for Windows users.
  • WinMerge is a great open source visual diff and merging tool for Windows.

The tutorial applications have been upgraded from 2.0.1 to 2.0.2. Looking at the diffs for these projects may be one of the easiest ways to upgrade.

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

The following are a detailed set of steps you'll need to do if you're manually upgrading your project from a previous 2.x version.

  1. Backup your project on your local file system or (even better) in your source control system.
  2. In your pom.xml, change <appfuse.version> to 2.0.2 and <spring.version> to 2.5.4.
  3. 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/*
    Alternatively, you could touch all files in src/main:
    find src/main -print0 | xargs -r0 touch

    Another, more permanent, solution is to use <dependentWarExcludes> to prevent the files from being overlayed.
  4. Upgrade the aspectj-maven-plugin to version 1.0 and add aspectjrt and aspectjtools as dependencies to the plugin.
    <dependencies>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>1.6.0</version>
        </dependency>
    </dependencies>
  5. Upgrade the maven-eclipse-plugin to version 2.5.1.
  6. Upgrade the maven-jetty-plugin to version 6.1.9.
  7. Upgrade the hibernate3-maven-plugin to version 2.1.
  8. Replace your jMock dependency with the following two dependencies for jMock 2.4. See the jMock Getting Started Guide or Services Tutorial to see how to upgrade your tests to 2.4. You can also see changeset 3132 to see how AppFuse's tests were upgraded.
    <dependency>
        <groupId>org.jmock</groupId>
        <artifactId>jmock-junit4</artifactId>
        <version>${jmock.version}</version>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
        <optional>true</optional>
    </dependency>
  9. In the <properties> section of your pom.xml, change jmock.version to 2.4.0 and webtest.version to R_1702.
  10. Upgrade to Spring Security 2.0.1.
  11. In log4j.xml, add the following to suppress Velocity logging messages:
    <logger name="org.apache.velocity">
        <level value="FATAL"/>
    </logger>
  12. If you're using JSF, replace the <variable-resolver> in faces-config.xml with the following:
    <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
  13. If you're using Struts 2, add the following to your log4j.xml:
    <!-- Turn off warnings from messages.jsp -->
    <logger name="com.opensymphony.xwork2.util.OgnlValueStack">
        <level value="ERROR"/>
    </logger>
  14. In web-tests.xml, remove the file:// prefix from the entity imports:
    <!DOCTYPE project [
        <!ENTITY config SYSTEM "./config.xml">
        <!ENTITY login SYSTEM "./login.xml">
    ]>

The AppFuse Maven Plugin

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

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.

Removing Code
You can run mvn appfuse:remove to remove the artifacts installed by appfuse:gen.

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.

If you want to customize the code generation templates (written in FreeMarker), you can copy them into your project using the following command:

appfuse:copy-templates

Installing AppFuse's source into your project

The good news is creating an "old style" project is now pretty easy. After you've create a new project using 2.x, you can run the following command:

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:

  1. Exports all sources from Subversion into your project. It reads the dao.framework and web.framework properties to determine what you need.
  2. Removes warpath plugin from pom.xml.
  3. 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.
  4. 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.
  5. 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.

Detailed Changelog

AppFuse JIRA (61 issues)
T Key Summary Status Res
Bug APF-1065 java.lang.NoSuchMethodError: ResolvedResolved DUPLICATE
Bug APF-1063 UserCounterListener/Invalid user information displayed in Current Login User ResolvedResolved FIXED
Bug APF-1062 AppFuse Spring Security/AspectJ issues ResolvedResolved FIXED
Improvement APF-1061 Upgrade to Canoo Web Test R_1702 ResolvedResolved FIXED
Improvement APF-1060 Upgrade to Maven Jetty Plugin 6.1.9 ResolvedResolved FIXED
Improvement APF-1059 Upgrade to Facelets 1.1.14 ResolvedResolved FIXED
Improvement APF-1058 Upgrade to AspectJ 1.6.0 ResolvedResolved FIXED
Improvement APF-1057 Upgrade to Spring Security 2.0.1 ResolvedResolved FIXED
Improvement APF-1056 Upgrade to Maven Eclipse Plugin 2.5.1 ResolvedResolved FIXED
Improvement APF-1055 Upgrade to Spring 2.5.4 ResolvedResolved FIXED
Improvement APF-1050 Upgrade to Spring Security 2.0.0 ResolvedResolved FIXED
Bug APF-1048 Missing calls in BasePageTestCase ResolvedResolved FIXED
Improvement APF-1047 Upgrade to aspectj-maven-plugin 1.0 ResolvedResolved FIXED
Bug APF-1045 appfuse:gen not generating for entities with similar names ResolvedResolved FIXED
Improvement APF-1043 Upgrade to Spring 2.5.3 ResolvedResolved FIXED
Bug APF-1041 JPA in appfuse modular spring MVC is not functional ResolvedResolved FIXED
Improvement APF-1038 Upgrade to Maven Hibernate3 Plugin 2.1 ResolvedResolved FIXED
Improvement APF-1035 Upgrade to MyFaces 1.2.2 ResolvedResolved FIXED
Improvement APF-1033 Upgrade to AspectJ 1.5.4 ResolvedResolved FIXED
Bug APF-1032 s:textfield renders bad HTML when using labelposition="left" ResolvedResolved FIXED
Improvement APF-1030 Upgrade to MySQL Connector/J 5.1.6 ResolvedResolved FIXED
Improvement APF-1029 Upgrade to Spring 2.5.2 ResolvedResolved FIXED
Improvement APF-1028 Upgrade to Struts 2.0.11.1 ResolvedResolved FIXED
Improvement APF-1022 Upgrade to Hibernate 3.2.6 GA ResolvedResolved FIXED
Improvement APF-1021 Upgrade to EhCache 1.4.1 ResolvedResolved FIXED
Bug APF-1017 NullPointerException is occrued during integration-test for full-source struts2 project ResolvedResolved WON'T FIX
Bug APF-1016 NullPointerException in MailEngine ResolvedResolved FIXED
Improvement APF-1014 Upgrade to Tapestry 4.1.5 and Tacos 4.1.1 ResolvedResolved FIXED
Improvement APF-1013 Hibernate GenericDAO additions - findByNamedQuery and getAllDistinct ResolvedResolved FIXED
Bug APF-1008 AppFuse struts 2 tutorial broken after mvn appfuse:full-source ResolvedResolved FIXED
Bug APF-1007 QuerySyntaxException in UniversalDaoJpa.getAll ResolvedResolved FIXED
Improvement APF-1004 Upgrade to Maven PMD Plugin 2.3 ResolvedResolved FIXED
Improvement APF-1000 Upgrade to Spring 2.5.1 ResolvedResolved FIXED
Bug APF-998 PersonDaoTest fails in tutorial-jpa ResolvedResolved FIXED
Improvement APF-996 Upgrade to Acegi Security 1.0.6 ResolvedResolved FIXED
Bug APF-994 Appfuse:gen controller generation does not generate non-generic managers ResolvedResolved FIXED
Bug APF-990 SimpleMailMessage not work with UTF-8 ResolvedResolved FIXED
Bug APF-989 Appfuse:gen form generation places commas in maxlength attribute ResolvedResolved FIXED
Bug APF-988 appfuse:gen also generates files it shouldn't ResolvedResolved FIXED
Bug APF-978 Admin cant edit user data ResolvedResolved FIXED
Bug APF-977 Dependency Conflicts on struts2-spring-plugin ResolvedResolved FIXED
Bug APF-976 Exception thrown when database connection wait_timeout exceeded ResolvedResolved FIXED
Bug APF-972 Change DelegatingVariableResolver to SpringBeanFacesELResolver ResolvedResolved FIXED
Improvement APF-969 Appgen - Allow code generation templates to be overridden ResolvedResolved FIXED
Improvement APF-966 Change paths for embedded databases to be ${java.io.tmpdir}/databasename ResolvedResolved FIXED
Improvement APF-964 Upgrade to H2 1.0.62 ResolvedResolved FIXED
Improvement APF-962 Change SMTP Port in Tests to be random to avoid port conflicts ResolvedResolved FIXED
Improvement APF-948 appfuse:label JSP tag does not gracefully show errors. ResolvedResolved FIXED
Improvement APF-947 Tutorial for Oracle users ResolvedResolved FIXED
Improvement APF-946 Upgrade to Prototype 1.5 and Scriptaculous 1.8 ResolvedResolved FIXED
Improvement APF-943 Upgrade jMock to 2.4.0 ResolvedResolved FIXED
Bug APF-937 mvn appfuse:full-source -> IllegalArgumentException if not using default repository location. ResolvedResolved FIXED
Bug APF-936 BaseDaoTestCase#populate( Object ) does not work ResolvedResolved FIXED
Bug APF-934 Appgen - non numeric version fields ResolvedResolved FIXED
Improvement APF-929 Change struts.xml to use redirect-action where appropriate ResolvedResolved FIXED
Sub-task APF-860 ValidationDelegate doesn't append "error" css class to labels and input fields ResolvedResolved FIXED
Bug APF-856 404 page doesn't work with JSF 1.2 with maven-jetty-plugin ResolvedResolved FIXED
Improvement APF-825 Upgrade to Commons FileUpload 1.2.1 ResolvedResolved FIXED
Bug APF-597 velocity.log in "current" directory ResolvedResolved FIXED
Improvement APF-559 Integrate Restful2ActionMapper using CompositeActionMapper ResolvedResolved WON'T FIX
New Feature APF-433 Add a choice between DisplayTag and eXtremeComponents, or other Table ResolvedResolved WON'T FIX


Adaptavist Theme Builder Powered by Atlassian Confluence