A couple of weeks ago I sat down and started doing an investigation of AppFuse given all the wonderful things Matt has been saying about Atlassian and how the appfuse project development tools are now integrated with crowd.
One of the things I was really excited to see in today's release was the support for multiple module source support with the 2.0 rc1. The generation has presented quite a few hurdles.. here is my workflow: I started out with a struts2 modular framework by running the following command: mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0-rc1 -DgroupId=com.devvine.crm -DartifactId=crm [INFO] Archetype created in dir: /Users/jstepka/Projects/devvine/crm [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Wed Sep 05 16:20:34 EST 2007 [INFO] Final Memory: 4M/8M [INFO] ------------------------------------------------------------------------ Everything works out well enough... following the instructions on the quick start guide, I need to run 'mvn install' to build the project before I can run jetty: jstepka-osx:~/Projects/devvine/crm jstepka$ mvn install [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] AppFuse Modular Application [INFO] AppFuse Modular Application - Core [INFO] AppFuse Modular Application - Web (Struts 2) [INFO] ---------------------------------------------------------------------------- great... I have now have my project modules built, lets run it... jstepka-osx:~/Projects/devvine/crm jstepka$ mvn jetty:run-war [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] AppFuse Modular Application [INFO] AppFuse Modular Application - Core [INFO] AppFuse Modular Application - Web (Struts 2) [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist or no valid version could be found [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Wed Sep 05 16:22:54 EST 2007 [INFO] Final Memory: 3M/6M [INFO] ------------------------------------------------------------------------ It turns out the plugin for jetty is not part of the root pom.xml. This was simple enough to fix, I added the following files to the pom.xml ... <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> </plugin> </plugins> </build> lets try running the mvn jetty:run-war jstepka-osx:~/Projects/devvine/crm jstepka$ mvn jetty:run-war [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] AppFuse Modular Application [INFO] AppFuse Modular Application - Core [INFO] AppFuse Modular Application - Web (Struts 2) [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] ---------------------------------------------------------------------------- [INFO] Building AppFuse Modular Application [INFO] task-segment: [jetty:run-war] [INFO] ---------------------------------------------------------------------------- [INFO] Preparing jetty:run-war [INFO] [site:attach-descriptor] [INFO] [jetty:run-war] [INFO] Configuring Jetty for project: AppFuse Modular Application 2007-09-05 16:26:04.602::INFO: Logging to STDERR via org.mortbay.log.StdErrLog [INFO] Jetty server exiting. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failure Embedded error: Bad temp directory: /Users/jstepka/Projects/devvine/crm/target/work [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Wed Sep 05 16:26:04 EST 2007 [INFO] Final Memory: 8M/15M [INFO] ------------------------------------------------------------------------ 2007-09-05 16:26:04.766::INFO: Shutdown hook executing 2007-09-05 16:26:04.766::INFO: Shutdown hook complete It appears the project is not properly building the application... Moving on I decided okay, I will just run the application through my IDE, this is the standard approach I have taken in the past: jstepka-osx:~/Projects/devvine/crm jstepka$ mvn idea:idea [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] AppFuse Modular Application [INFO] AppFuse Modular Application - Core [INFO] AppFuse Modular Application - Web (Struts 2) [INFO] Searching repository for plugin with prefix: 'idea'. ... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] ------------------------------------------------------------------------ [INFO] AppFuse Modular Application ........................... SUCCESS [47.457s] [INFO] AppFuse Modular Application - Core .................... SUCCESS [3:15.229s] [INFO] AppFuse Modular Application - Web (Struts 2) .......... SUCCESS [2:52.791s] [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6 minutes 56 seconds [INFO] Finished at: Wed Sep 05 16:38:11 EST 2007 [INFO] Final Memory: 14M/27M [INFO] ------------------------------------------------------------------------ Then I ended up opening up the idea project, however it appears the dynamic linking of the appfuse core will not compile without the inclusion of the missing pages such as: error.jsp index.jsp 404.jsp 403.jsp Fair enough, I'll just get all the sources: jstepka-osx:~/Projects/devvine/crm jstepka$ mvn appfuse:full-source [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] AppFuse Modular Application [INFO] AppFuse Modular Application - Core [INFO] AppFuse Modular Application - Web (Struts 2) [INFO] Searching repository for plugin with prefix: 'appfuse'. [INFO] ---------------------------------------------------------------------------- [INFO] Building AppFuse Modular Application [INFO] task-segment: [appfuse:full-source] [INFO] ---------------------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Java heap space [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.OutOfMemoryError: Java heap space [INFO] ------------------------------------------------------------------------ ick... I found that this can be fixed by getting all of the sources before building the idea project... so I ran the quick-start commands in the following order: mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0-rc1 -DgroupId=com.devvine.crm -DartifactId=crm mvn appfuse:full-source mvn install mvn idea:idea Wonderful! Everything is there... Next step was to see if everything would compile, which idea seemed to be non-cooperative. I kept running into 'DataSource ORM Annotations Problems'. After searching through the idea forums I was able to find I need to do the following: Removed the "Data source ORM Annotations Problems" inspection ("Settings" -> "Errors" -> "Java EE issues" -> "DataSource ORM Annotations Problems"). After doing this on a 'IDE Profiles -> Default' settings I was finally in the green. I then setup tomcat inside of idea by configuring a default web-module with an exploded directory that is synchronized to my code changes. With this in place I pointed my browser window at tomcat and all was good and I was able to login. Regards, Justen -- Justen Stepka http://www.jstepka.name/blog/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]