Generating your project
To generate your own project based on this archetype you can run the following command:
mvn archetype:generate -B \ -DarchetypeGroupId=org.appfuse.archetypes \ -DarchetypeArtifactId=appfuse-basic-gwt-archetype \ -DarchetypeVersion=2.2.2-SNAPSHOT \ -DgroupId=com.mycompany \ -DartifactId=myproject \ -DarchetypeRepository=https://github.com/ivangsa/appfuse/raw/repo/
This will generate a Basic Appfuse project with GWT as its web module, providing most of AppFuse web functionality.
This is still a work in progress but it already provides most of AppFuse functionality, you can expect some stability, but there are a few issues you may need to take into account:
- Internationalization of field names on JSR 303 validation messages is still a missing feature
- User’s validator fails after password encryption because password and passwordConfirm do not match anymore so validation fails when persisting through hibernate/jpa, preventing singup, new user creation, or password update functionalities from working.
You can configure this maven repository for AppFuse snapshot jars to temporary workaround this issue updating your project’s pom.xml file around line 305:
<repositories> <repository> <id>appfuse-snapshots</id> <url>https://github.com/ivangsa/appfuse/raw/repo/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories>
Running your project
Once your project is created the quickest way to test it would be compiling GWT inplace and running it with jetty:
mvn clean gwt:clean compile gwt:compile \ -P gwtDebug -Dgwt.inplace=true \ jetty:run
This will compile gwt generated code to src/main/webapp/script and src/main/webapp/WEB-INF/deploy, so make sure you don’t commit these files into source control. You can always remove them running mvn gwt:clean.
Using gwtDebug maven profile you can reduce the amount of translations that are compiled by GWT, see MainModuleDebug.gwt.xml.
You can leave any feedback, issues you may find or any other question regarding the use of this archetype on github itself or just leaving a comment here..
Regards and Happy Coding!!
You can chekcout this branch containing a Person CRUD example.