0 可以参照appfuse的官网给出的引导进行下载 ,我直接copy来:
Create a project
Setup your Development Environment - or follow the steps below if you're a veteran.
Download and install JDK 7+ (make sure your JAVA_HOME environment variable points to the JDK, not a JRE).
Download and install MySQL 5.5+ (or use a different database see here).
Setup a local SMTP server or change mail.properties (in src/main/resources) to use a different host name - it defaults to "localhost".
Download and install Maven 3.1.0+.
From the command line, cd into your "Source" directory (c:\Source on Windows, ~/dev on Unix) run the Maven command you see below after choosing your web framework and other options.
1 mvn命令下载项目 (这个google被禁了后,看不到的,给copy出来)
---spring mvc 架构分单独模块
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-spring-archetype -DarchetypeVersion=3.0.0 -DgroupId=com.xxx -DartifactId=xxxxxxxx -DarchetypeRepository=https://oss.sonatype.org/content/repositories/appfuse---spring mvc 架构不分单独模块
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-spring-archetype -DarchetypeVersion=3.0.0 -DgroupId=com.xxx -DartifactId=xxxxxxxx -DarchetypeRepository=https://oss.sonatype.org/content/repositories/appfuse
--struts2 架构分单独模块
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts-archetype -DarchetypeVersion=3.0.0 -DgroupId=com.xxx -DartifactId=xxxxxxxx -DarchetypeRepository=https://oss.sonatype.org/content/repositories/appfuse
---struts2 架构不分单独模块
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts-archetype -DarchetypeVersion=3.0.0
-DgroupId=com.xxx -DartifactId=xxxxxxxx -DarchetypeRepository=https://oss.sonatype.org/content/repositories/appfuse
----tapestry5 架构分单独模块
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-tapestry-archetype -DarchetypeVersion=3.0.0-DgroupId=com.xxx -DartifactId=xxxxxxxx -DarchetypeRepository=https://oss.sonatype.org/content/repositories/appfuse
----tapestry5 架构不分单独模块
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-tapestry-archetype -DarchetypeVersion=3.0.0-DgroupId=com.xxx -DartifactId=xxxxxxxx -DarchetypeRepository=https://oss.sonatype.org/content/repositories/appfuse
标红的是对应的我们定义的包结构和项目名称 ;
2 运行项目,我直接copy的
Run your application
Running AppFuse is easy now. Once the archetype project is created, Maven will create and populate your database using the hibernate3 and dbunit plugins, respectively. All you have to do is use Maven to run the Jetty container and view your application.
Decide if you want to change AppFuse from "embedded mode" to full-source mode by runningmvn appfuse:full-source from your project's root directory. Embedded mode means the service layer is contained in JARs vs. having the source in your project.
To view your application run mvn jetty:run from your project's directory (for a modular project, you'll need to run mvn jetty:run from your project's web directory (after installing the core module)). Maven will start Jetty and you should be able to view your application in your browser at http://localhost:8080.
Check your new project into source control, unless you have a good reason not to. Google Code, GitHub, and BitBucket are good options.
Run mvn from within your project to download JARs, Tomcat and run the integration tests in your project.
Icon
The default username/password for an admin user is admin/admin. For a regular user, use user/user.
If you receive OutOfMemory errors when using mvn jetty:run, increase the memory available to Java. For example, set your JAVA_OPTS environment variable to -Xmx1024M -XX:PermSize=512m.
红色的部分是要下载全部代码; 绿色的没试 ;
3 完了后,我直接使用Eclipse3.6 将导入已存在的maven 项目到工程中;
4 设置maven编译环境; 例如我用的是分模块的,分core web ,在主模块上面; 点击右键配置
maven 编译环境,例如:
5 配置jetty运行看结果
运行起来了,看看接下来继续研究了