I believe the instructions are fairly straightforward: 1. Check your new project into source control, unless you have a good reason not to. Google Code has free Subversion hosting, as do many others. 2. From the command line, cd into your new project's directory and run mvn to download JARs, Tomcat and run the integration tests in your project. Now is a good time to take a coffee break or grab a beer - downloading everything and running the tests can take 5-10 minutes. 3. To view your application run mvn jetty:run-war from your project's directory (for a modular project, you'll need to run mvn jetty:run-war from your project's web directory). Maven will start Jetty and you should be able to view your application in your browser at http://localhost:8080. The default username/password for an admin user is admin/admin. For a regular user, use user/user. 4. To override files from AppFuse, run mvn war:inplace. This will extract the dependent WARs into src/main/webapp, where you can change files to your heart's content. When you have the war expanded in your source tree, you can run mvn jetty:run. This will allow you to change files on-the-fly and Jetty will reload them as needed. The only problem with this approach is you end up with an "exploded AppFuse" in your project, which won't bode well for upgrading. We recommend you check your project into source control before running mvn war:inplace. That way, it'll be easier for you to decide what needs to be checked in (over written) and what can be deleted.
You can change AppFuse from its "embedded mode" to full-source mode by running mvn appfuse:full-source from your project's root directory. Maybe it's better that we simply eliminate Step 4 as a recommendation? In reality, war:inplace works fine - you just have to be aware that it's putting JARs/classes into your src tree (under src/main/webapp/WEB-INF/lib and WEB-INF/classes) and you may need to delete them. Matt On Tue, Apr 15, 2008 at 12:12 AM, Alex Worden <[EMAIL PROTECTED]> wrote: > Hi, > > I did what Michael suggested and it appeared to work. i tried > following the first tutorial to the letter and now I have hordes of > build exceptions. > > I'd like to understand why the WEB-INF\classes and WEB-INF\lib > directories need to be deleted. If this is the case, then the pom.xml > that is supplied with AppFuse should already contain these > configuration elements. Shouldn't the config elements that Peter > suggested be added to the pom for everyone? > > I'd suggest definitely that you can't ignore this original issue and > omit it from your wiki. As is, the wiki is incomplete and the > instructions are not usable. > > If the mvn war:inplace is not the recommended way to work with > AppFuse, please can you explain better (with diagrams) in the wiki > just how a developer is supposed to use AppFuse to develop an > application. Some project structure diagrams would really help, along > with a general overview of the AppFuse philosophy. I've never seen > anything like it, so I'm sorry to say that my first impressions are > that it's very confusing. > > I have a ton of other build exceptions now after following the first > tutorial. I can send details in a seperate thread if you're > interested... > > Alex > > > > On Mon, Apr 14, 2008 at 12:49 PM, Matt Raible <[EMAIL PROTECTED]> wrote: > > If you're going to use war:inplace, it's probably a good idea to add > > these settings to your pom.xml. You might want to add it as a note > > after the first reference to war:inplace. I believe we've notified > > folks that they need to do this during upgrades, but not during > > regular development. I don't know if we should add it - I'd like to > > hear what other folks think. > > > > Matt > > > > > > > > On Mon, Apr 14, 2008 at 1:00 PM, Alex Worden <[EMAIL PROTECTED]> wrote: > > > Thank you so much for your input. I'll try your suggestions tonight. > > > Should we / I update the Getting Started Wiki? I don't feel too > > > comfortable doing that given that I have very little experience with > > > AppFuse thus far... > > > > > > Alex > > > > > > > > > > > > On Mon, Apr 14, 2008 at 1:36 AM, Peter Schneider-Manzell > > > <[EMAIL PROTECTED]> wrote: > > > > Hi! > > > > > > > > I've extended my pom.xml with the following part: > > > > > > > > <build> > > > > ... > > > > <plugins> > > > > .... > > > > <plugin> > > > > <artifactId>maven-clean-plugin</artifactId> > > > > <configuration> > > > > <filesets> > > > > <fileset> > > > > <directory>src/main/webapp/WEB-INF</directory> > > > > <includes> > > > > <include>lib</include> > > > > <include>classes</include> > > > > </includes> > > > > <followSymlinks>false</followSymlinks> > > > > </fileset> > > > > </filesets> > > > > </configuration> > > > > </plugin> > > > > > > > > So everytime I run "mvn clean", the 2 folders WEB-IF/lib and > WEB-IF/classes > > > > are also removed. > > > > > > > > Bye, > > > > > > > > > > > > Peter > > > > > > > > 2008/4/14, Michael Horwitz <[EMAIL PROTECTED]>: > > > > > > > > > After running the mvn:war-inplace command, you must delete the > > > > src/main/webapp/WEB-INF/classes and src/main/webapp/WEB-INF/lib > directories > > > > from your web module. Then run mvn clean install from the top level, > > > > followed by mvn jetty:run-war in your web module and all should run > just > > > > fine. > > > > > > > > > > Mike > > > > > > > > > > > > > > > > > > > > On 14/04/2008, Alex Worden <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > > > > > > > I'm trying to get up and running with AppFuse for the first > time. I've > > > > > > followed the directions described at: > > > > > > http://appfuse.org/display/APF/AppFuse+QuickStart and can get the > > > > > > application running from the war. I used the > > > > > > archetypeArtifactId=appfuse-modular-struts. > > > > > > > > > > > > However I can't imagine understanding it all without the src > code so I > > > > > > followed the instructions under "Run your application" step 4. > These > > > > > > unfortunately don't tell you which directory to run the mvn > commands > > > > > > from. (I created a modular project.) I've tried running them > from the > > > > > > top level and the 'web' directory without success. When running > from > > > > > > the web directory I ran mvn war:inplace OK, followed by mvn > jetty:run > > > > > > and got the following errors.... > > > > > > > > > > > > 2008-04-13 22:14:58.053::WARN: failed struts > > > > > > Unable to load bean: type: > class:com.opensymphony.xwork2.ObjectFactory > > > > > > - bean - > > > > > jar:file:/Users/alex/work/maven_repo/org/apache/struts/struts2-core/2.0.11/struts2-core-2.0.11.jar!/struts-default.xml:30:72 > > > > > > at > > > > > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208) > > > > > > at > > > > > org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101) > > > > > > at > > > > > com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131) > > > > > > at > > > > > com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52) > > > > > > at > > > > > org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395) > > > > > > at > > > > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452) > > > > > > at > > > > > org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201) > > > > > > at > > > > org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) > > > > > > at > > > > org.mortbay.jetty.servlet.Context.startContext(Context.java:139) > > > > > > at > > > > > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216) > > > > > > at > > > > > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509) > > > > > > at > > > > > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447) > > > > > > at > > > > > org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) > > > > > > at > > > > > org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) > > > > > > at org.mortbay.jetty.Server.doStart(Server.java:222) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132) > > > > > > at > > > > > org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:337) > > > > > > at > > > > > org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:279) > > > > > > at > > > > > org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203) > > > > > > at > > > > > org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:182) > > > > > > at > > > > > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) > > > > > > at > > > > org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) > > > > > > at > org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) > > > > > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) > > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > > > > > at > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > > > > at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > > > > > at java.lang.reflect.Method.invoke(Method.java:585) > > > > > > at > > > > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > > > > > > at > org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > > > > > > at > > > > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > > > > > at > org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > > > > > Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory > with > > > > > > the name xwork has already been loaded by bean - > > > > > > > > > > > jar:file:/Users/alex/work/myvoxpop/web/src/main/webapp/WEB-INF/lib/struts2-core-2.0.11.jar!/struts-default.xml:30:72 > > > > > > - bean - > > > > > jar:file:/Users/alex/work/maven_repo/org/apache/struts/struts2-core/2.0.11/struts2-core-2.0.11.jar!/struts-default.xml:30:72 > > > > > > at > > > > > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:193) > > > > > > ... 46 more > > > > > > 2008-04-13 22:14:58.055::WARN: Failed startup of context > > > > > > > > > > [EMAIL PROTECTED]/,/Users/alex/work/myvoxpop/web/src/main/webapp} > > > > > > Unable to load bean: type: > class:com.opensymphony.xwork2.ObjectFactory > > > > > > - bean - > > > > > jar:file:/Users/alex/work/maven_repo/org/apache/struts/struts2-core/2.0.11/struts2-core-2.0.11.jar!/struts-default.xml:30:72 > > > > > > at > > > > > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208) > > > > > > at > > > > > org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101) > > > > > > at > > > > > com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131) > > > > > > at > > > > > com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52) > > > > > > at > > > > > org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395) > > > > > > at > > > > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452) > > > > > > at > > > > > org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201) > > > > > > at > > > > org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) > > > > > > at > > > > org.mortbay.jetty.servlet.Context.startContext(Context.java:139) > > > > > > at > > > > > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216) > > > > > > at > > > > > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509) > > > > > > at > > > > > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447) > > > > > > at > > > > > org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) > > > > > > at > > > > > org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) > > > > > > at org.mortbay.jetty.Server.doStart(Server.java:222) > > > > > > at > > > > > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > > > > > > at > > > > > org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132) > > > > > > at > > > > > org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:337) > > > > > > at > > > > > org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:279) > > > > > > at > > > > > org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:203) > > > > > > at > > > > > org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:182) > > > > > > at > > > > > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) > > > > > > at > > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) > > > > > > at > > > > org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) > > > > > > at > org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) > > > > > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) > > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > > > > > at > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > > > > at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > > > > > at java.lang.reflect.Method.invoke(Method.java:585) > > > > > > at > > > > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > > > > > > at > org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > > > > > > at > > > > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > > > > > at > org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > > > > > Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory > with > > > > > > the name xwork has already been loaded by bean - > > > > > > > > > > > jar:file:/Users/alex/work/myvoxpop/web/src/main/webapp/WEB-INF/lib/struts2-core-2.0.11.jar!/struts-default.xml:30:72 > > > > > > - bean - > > > > > jar:file:/Users/alex/work/maven_repo/org/apache/struts/struts2-core/2.0.11/struts2-core-2.0.11.jar!/struts-default.xml:30:72 > > > > > > at > > > > > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:193) > > > > > > ... 46 more > > > > > > 2008-04-13 22:14:59.083::INFO: Started > > > > [EMAIL PROTECTED]:8080 > > > > > > [INFO] Started Jetty Server > > > > > > [INFO] Starting scanner at interval of 3 seconds. > > > > > > > > > > > > > > > > > > When I attempt to access the webapp, I get a 503 error. > > > > > > > > > > > > Any help would be much appreciated! Oh - I'm running this on OSX > 10.5 > > > > > > > > > > > > Thanks, > > > > > > > > > > > > Alex > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]