`
huinet
  • 浏览: 83594 次
  • 性别: Icon_minigender_1
  • 来自: 郑州市
社区版块
存档分类
最新评论

appfuse 2 下载

    博客分类:
  • J2EE
阅读更多

具体步骤:

1、下载jdk,maven,mysql5.x.设置好环境变量。新建一个存放项目的文件夹。

2、运行:(进入项目目录)

 

mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=org.soft.app -DartifactId=appfuse

 3、运行:mvn integration-test(进入项目目录)

4、运行:mvn jetty:run-war (进入项目目录)

5、运行:mvn appfuse:full-source。(出错的解决办法见下面)

 

注意:

1.在创建完struts2Basic后,cd 到/struts2Basic,    运行命令“mvn appfuse:full-source”,产生如下错误:

AppFuse官方网站QuickStart有解释:

Bug with Ant 1.7.0
Local repositories and projects on Windows platforms are held in directories whose paths contain no spaces.

在...\maven\apache-maven-2.0.8\conf的settings.xml修改如下:

<!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->

上面的配置里默认的资源库路径为~/.m2/repository, Documents and Settings里面有空格所以报错。最好直接指定另外的没有空格的英文路径:
<localRepository>E:\appfuse\repository </localRepository>

需要注意的是:也可以设置成这样<localRepository>E:/appfuse/repository </localRepository>

关键在于:最后的目录必须是repository,否则还是报路径错误,我曾建Repository目录,一直报路径不对,找不到*.jar

2. 然后修改pom.xml里mysql的密码,如果你接着运行mvn jetty:run-war,会产生需要的一切,并发布到jetty中,你就可以在浏览器里查看运行效果了。

3.另外
执行mvn eclipse:eclipse,可以生成eclipse下的项目。导入到eclipse后会存在找不到包的问题,需要在eclipse中window-> preference->java->build path->classpath variables中增加M2_REPO指向maven repository的目录。然后编译就可以通过了。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Appfuse 2.0: Errors I encountered and how I fixed them 


Appfuse 2.0 has finally been released. Instead of using version 1.9.4 (the previous stable release) for an upcoming web project, I decided to use this latest version. The fastest way to learn this new version is through the Quick Start guide. I encountered errors while following this guide. I googled around and found the fixes. For those starting with Appfuse 2.0, here's a list of errors I encountered and what I did to fix them. Note: I may not be able to explain why the fixes fixed the errors.


Error: Executed 'mvn' command and got a 'Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher'.

Fix: Set a M2_HOME environment variable. This should point to your Maven directory. Also, be sure you have JAVA_HOME setup. Appfuse 2.0 requires Maven 2.0.6+ and Java 5+.


Error: After fixing the above error, I got a "Error while expanding /tmp/cargo/installs/apache-tomcat-6.0.14.zip Unexpected end of ZLIB input stream"

Fix: Delete all files inside /tmp/cargo/installs/ (or whatever directory indicated in your case) and manually download apache-tomcat-6.0.14.zip and put it there.


Error: Executed 'mvn jetty:run-war' and got a "Failed startup of context org.mortbay.jetty.webapp.WebAppContext@4d342f5b
{/,jar:file:/.../.../.../.../web/target/..-webapp-1.0-SNAPSHOT.war!/}
java.util.zip.ZipException: error in opening zip file"

Fix: Delete everything inside ~/.m2/repository and execute the command again. This will download everything again.
I hope this post helps you. If you have other errors you encountered, please share how you fixed them. Thanks!

Posted by Milo Felipe at 9:18 AM

分享到:
评论

相关推荐

    appfuse2学习日记

    - **依赖包下载**:对于网络环境不佳的情况,建议手动下载 AppFuse2 的依赖包,并配置 Maven 使用本地仓库。下载地址为:https://appfuse.dev.java.net/files/documents/1397/96443/appfuse-dependencies-2.0.2.zip ...

    Appfuse2搭建文档

    从Appfuse官方网站或其他可信的源下载Appfuse2的源码。解压到本地目录。 **步骤3:配置数据库连接** 在Appfuse2的src/main/resources目录下找到applicationContext-persistence.xml文件,配置Oracle数据库的连接...

    appfuse

    2. **持久层(Persistence Layer)**:AppFuse支持Hibernate或JPA作为ORM(对象关系映射)工具,负责与数据库交互。 3. **服务层(Service Layer)**:这里是业务逻辑的实现,通常基于Spring的`@Service`注解。 4....

    Appfuse 2.doc

    2. **创建项目文件夹**:在磁盘上创建一个文件夹,用于存放Appfuse项目,例如`D:\appfuse2-hzy`。 3. **执行Maven命令**:在命令行中输入以下命令: ``` mvn archetype:create -DarchetypeGroupId=org.appfuse -...

    建立项目原型骨架的步骤(最新版本appfuse)appfuse2.1.0-M2

    2. 生成项目后,使用`mvn appfuse:full-source`命令初始化项目。这个命令会处理ant存在的问题,特别是Windows环境下遇到的问题,确保$USER_HOME/.m2/repository目录存在并包含正确的settings.xml文件。 3. 接下来,...

    AppFuse

    ### AppFuse:加速J2EE项目开发 #### 一、简介与背景 AppFuse是一个用于启动J2EE项目的工具包,它提供了一种快速而简便的方法来构建基于Java的应用程序。该工具包由Matt Raible创建,他在网络开发领域拥有丰富的...

    AppFuse2.1所需包

    2. Hibernate ORM:包含Hibernate主库和相关模块,如Hibernate Tools(用于生成Java实体类和数据库表之间的映射文件)。 3. JDBC驱动:用于与特定数据库(如MySQL、Oracle、PostgreSQL等)进行通信的驱动。 4. JSTL...

    appfuse学习笔记(一)安装部署

    替换 `&lt;选择的模板&gt;` 为下载的模板名称,如 `appfuse-basic`,`appfuse-minimal` 等,`&lt;对应版本&gt;` 是你下载的 AppFuse 版本号。 **4. 编译与运行** 进入新创建的项目目录,使用 Maven 编译并运行项目: ``` cd my...

    appfuse 学习笔记

    在硬盘上创建一个项目根目录,例如 `E:\appfuse2-ly`。 **2. 使用 Maven 创建 Appfuse 项目** 在命令行中切换到项目根目录,然后输入以下命令: ```bash mvn archetype:create -DarchetypeGroupId=org....

    APPFUSE工具研究.doc

    Maven 2的引入带来了许多优势,包括自动下载依赖项、简化维护(因为所有组件可以一次编译)以及方便最终用户的升级流程。AppFuse 2.0还更新了技术栈,支持JDK 5、注解、JSP 2.0和Servlet 2.4,同时提供了对Eclipse、...

    AppFuse入门文档(AppFuse与SpringMVC+mybatis整合)

    ### AppFuse与SpringMVC+MyBatis整合详解 #### 一、概述 AppFuse是一个开源的应用程序骨架,主要用于快速构建基于Java的企业级应用。它提供了丰富的模板和配置,能够帮助开发者快速搭建起一个完整的应用架构。本...

    Appfuse开发教程

    **Appfuse开发教程** Appfuse 是一个开源项目,它提供了一种快速开发Web应用程序的方式,尤其在使用Java技术栈时。本教程将深入探讨如何利用Appfuse创建数据访问对象(DAO)和简单Java对象(POJO),并进行数据库...

    appfuse新手上路

    - 下载`appfuse-dependencies-2.0.2`。 - 将其解压缩至`.m2/repository`目录下。 **2. 创建项目目录** - 在任意位置创建一个目录,如`C:\appfuse`,用于存放所有AppFuse项目。 **3. 构建项目骨架** - 使用...

    MAVEN 搭建APPFUSE

    你可以从AppFuse的官方网站或者GitHub仓库下载所需的版本。通常,AppFuse提供了不同框架的模板,根据你的需求选择合适的模板。 步骤3:创建新项目。使用Maven的archetype插件,我们可以快速生成一个基于AppFuse的新...

    appfuse2.0.2 Struts2 hibernate Spring 构建的基于SQLServer2005 的ssh2项目的过程全记录

    appfuse2.0.2 Struts2 hibernate Spring 构建的基于SQLServer2005 的ssh2项目的过程全记录 网上很多帖子介绍appfuse2构建过程的,但是基于SQLServer2005的没有,顶多一笔带过,另外对于期间出现的各种问题也没有个说明,...

    SSH学习及开发框架-appfuse

    appfuse 有struts2+hibernate+spring的整合 springmvc+hibernate+spring的整合 多模块,但模块都有 学习开发参考使用非常方便 可以到官方下载最新版的,我只是把自己下载的打包整理一下 注意哈,都是基于maven的...

    使用appfuse构建环境

    - 访问AppFuse官网下载页面下载`appfuse-springmvc-1.9.4-src.zip`,并将其解压至任意目录。 - 该版本支持Spring MVC作为Web层框架,适用于构建企业级应用。 **2. 安装JDK** - 从Oracle官方站点下载最新版的JDK,并...

    一个appfuse的应用

    AppFuse 使用Maven作为构建工具,整合了Spring、Hibernate、Struts2(或Spring MVC)等流行框架,简化了开发流程。 这个"一个appfuse的应用"是一个基于AppFuse框架构建的小型应用示例。由于描述中提到“一些jar包...

    appfuse 配置说明 doc 格式

    - **下载AppFuse源码**:从官方网站下载`appfuse-1.9.3-src.zip`,并将其解压至`D:\appfuse`目录下。 - **安装JDK**:确保安装JDK,并在环境变量中设置`JAVA_HOME`指向JDK安装目录,在`path`中添加`%JAVA_HOME%\...

    使用 AppFuse 快速构建 java

    1. **下载AppFuse**: 从AppFuse的官方网站下载最新版本的源码包(本文使用的版本是appfuse-tapestry-1.9.3-src.zip)。将其解压至所需的位置。 2. **安装JDK**: 下载并安装最新版本的JDK(本文使用JDK1.5.0),...

Global site tag (gtag.js) - Google Analytics