日期:2014-05-20  浏览次数:20841 次

用maven建项目 创建成功,但mvn jetty:run-war 总是不成功 请大家帮帮忙
环境简介
C:\>echo %JAVA_HOME%
D:\jdk1.6.0_10

C:\>mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
Java version: 1.6.0_10
Java home: D:\jdk1.6.0_10\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

C:\>net start mysql
请求的服务已经启动。

请键入 NET HELPMSG 2182 以获得更多的帮助。

参考 http://appfuse.org/display/APF/AppFuse+QuickStart+-+Chinese 创建项目
命令
D:\MyProject>mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifact
Id=appfuse-basic-struts-archetype -DarchetypeVersion=2.1.0 -DgroupId=com.mycompany -DartifactId=mypr
oject -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Batch mode
[INFO] Archetype defined by properties
[INFO] ------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Wed Aug 24 19:46:42 CST 2011
[INFO] Final Memory: 10M/19M
[INFO] ------------------------------------
D:\MyProject>
D:\MyProject>cd myproject

D:\MyProject\myproject>tree
文件夹 PATH 列表
卷序列号为 2CE3-7E7C
D:.
└─src
  ├─main
  │ ├─java
  │ │ ├─com
  │ │ │ └─mycompany
  │ │ │ ├─action
  │ │ │ └─webapp
  │ │ │ ├─action
  │ │ │ ├─filter
  │ │ │ ├─interceptor
  │ │ │ ├─jsp
  │ │ │ ├─listener
  │ │ │ ├─org
  │ │ │ │ └─appfuse
  │ │ │ │ └─model
  │ │ │ ├─search
  │ │ │ ├─taglib
  │ │ │ └─util
  │ │ └─org
  │ │ └─appfuse
  │ │ └─model
  │ ├─resources
  │ │ └─META-INF
  │ └─webapp
  │ ├─common
  │ ├─decorators
  │ ├─images
  │ ├─scripts
  │ │ ├─calendar
  │ │ │ └─lang
  │ │ └─dojo
  │ ├─styles
  │ │ ├─andreas01
  │ │ │ └─images
  │ │ ├─calendar-aqua
  │ │ ├─puzzlewithstyle
  │ │ │ └─images
  │ │ └─simplicity
  │ │ └─images
  │ ├─template
  │ │ ├─css_xhtml
  │ │ └─xhtml
  │ └─WEB-INF
  │ └─pages
  │ └─admin
  ├─site
  └─test
  ├─java
  │ └─com
  │ └─mycompany
  │ └─webapp
  │ ├─action
  │ ├─filter
  │ └─listener
  └─resources

D:\MyProject\myproject>
 
修改数据库密码 pom.xml 最后
  <!-- Database settings -->