用Seam-gen起步(二)

我的测试例子:

 


使用到的Seam版本是:jboss-seam-2.2.0.GA

使用seam-gen工具生成的一个war应用程序

可以正常运行于jboss-5.1.0.GA上


初始化命令:seam setup
生成命令:seam create-project
部署命令:seam explode






(1)初始化命令:seam setup
D:\Seam>cd jboss-seam-2.2.0.GA

D:\Seam\jboss-seam-2.2.0.GA>seam setup
SEAM_HOME: D:\Seam\jboss-seam-2.2.0.GA
Using seam-gen sources from: D:\Seam\jboss-seam-2.2.0.GA\seam-gen
Buildfile: D:\Seam\jboss-seam-2.2.0.GA\seam-gen\build.xml

init:

setup:
     [echo] Welcome to seam-gen 2.2.0.GA :-)
     [echo] Answer each question or hit ENTER to accept the default (in brackets
)
     [echo]
    [input] Enter the directory where you want the project to be created (should
 not contain spaces) [C:/Projects] [C:/Projects]
D:/projects
    [input] Enter your JBoss AS home directory [C:/Program Files/jboss-5.1.0.GA]
 [C:/Program Files/jboss-5.1.0.GA]
D:/GreenSoft/JBoss/JDK16/jboss-5.1.0.GA
    [input] Enter your JBoss AS domain [default] [default]
default
    [input] Enter your GlassFish V2 or V3 home directory (Ignore if you aren't d
eploying to GlassFish) [C:/Program Files/glassfish-v2.1] [C:/Program Files/glass
fish-v2.1]
D:/GreenSoft/glassfish/glassfish-3.0.1
    [input] Enter your GlassFish domain (Ignore if you aren't deploying to Glass
Fish) [domain1] [domain1]
domain1
    [input] Enter the project name [myproject] [myproject]
seamWerProject
     [echo] Accepted project name as: seamWerProject
    [input] Do you want to use ICEfaces instead of RichFaces? [n] (y, [n])
n
    [input] skipping input as property icefaces.home.new has already been set.
    [input] Select a RichFaces skin [glassX] (blueSky, classic, darkX, deepMarin
e, DEFAULT, emeraldTown, [glassX], japanCherry, laguna, ruby, wine)
emeraldTown
    [input] Is this project deployed as an EAR (with EJB components) or a WAR (w
ith no EJB support)? [war] (ear, [war])
war
    [input] Enter the base package name for your Java classes [com.mydomain.seam
WerProject] [com.mydomain.seamWerProject]
com.cmm.seamwerproject
    [input] Enter the Java package name for your session beans [com.cmm.seamwerp
roject.action] [com.cmm.seamwerproject.action]
com.cmm.seamwerproject.action
    [input] Enter the Java package name for your entity beans [com.cmm.seamwerpr
oject.model] [com.cmm.seamwerproject.model]
com.cmm.seamwerproject.model
    [input] Enter the Java package name for your test cases [com.cmm.seamwerproj
ect.test] [com.cmm.seamwerproject.test]
com.cmm.seamwerproject.test
    [input] What kind of database are you using? [hsql] ([hsql], mysql, derby, o
racle, postgres, mssql, db2, sybase, enterprisedb, h2)
mysql
    [input] Enter the filesystem path to the JDBC driver jar [] []
D:/mysql-connector-java-5.1.5-bin.jar
    [input] skipping input as property driver.license.jar.new has already been s
et.
    [input] Enter the Hibernate dialect for your database [org.hibernate.dialect
.MySQLDialect] [org.hibernate.dialect.MySQLDialect]
org.hibernate.dialect.MySQL5Dialect
    [input] Enter the JDBC driver class for your database [com.mysql.jdbc.Driver
] [com.mysql.jdbc.Driver]
com.mysql.jdbc.Driver
    [input] Enter the JDBC DataSource class for your database [com.mysql.jdbc.jd
bc2.optional.MysqlDataSource] [com.mysql.jdbc.jdbc2.optional.MysqlDataSource]
com.mysql.jdbc.jdbc2.optional.MysqlDataSource
    [input] Enter the JDBC URL for your database [jdbc:mysql:///test] [jdbc:mysq
l:///test]
jdbc:mysql://localhost:3306/seamtest
    [input] Enter the database username [sa] [sa]
root
    [input] Enter the database password [] []
mysql
    [input] skipping input as property hibernate.default_schema.entered has alre
ady been set.
    [input] Enter the database catalog name (Enter '-' to clear previous value)
[] []

    [input] Are you working with tables that already exist in the database? [n]
(y, [n])
y
    [input] Do you want to recreate the database tables and execute import.sql e
ach time you deploy? [n] (y, [n])
n
[propertyfile] Creating new property file: D:\Seam\jboss-seam-2.2.0.GA\seam-gen\
build.properties
     [echo] Installing JDBC driver jar to JBoss AS

init:

init-properties:
     [echo] D:/GreenSoft/JBoss/JDK16/jboss-5.1.0.GA

validate-workspace:

validate-project:

settings:
     [echo] JBoss AS home: D:/GreenSoft/JBoss/JDK16/jboss-5.1.0.GA
     [echo] GlassFish home: D:/GreenSoft/glassfish/glassfish-3.0.1
     [echo] Project name: seamWerProject
     [echo] Project location: D:/projects/seamWerProject
     [echo] Project type: war
     [echo] IceFaces: n
     [echo] Action package: com.cmm.seamwerproject.action
     [echo] Model package: com.cmm.seamwerproject.model
     [echo] Test package: com.cmm.seamwerproject.test
     [echo] JDBC driver class: com.mysql.jdbc.Driver
     [echo] JDBC DataSource class: com.mysql.jdbc.jdbc2.optional.MysqlDataSource

     [echo] Hibernate dialect: org.hibernate.dialect.MySQL5Dialect
     [echo] JDBC URL: jdbc:mysql://localhost:3306/seamtest
     [echo] Database username: root
     [echo] Database password: mysql
     [echo]
     [echo] Type 'seam create-project' to create the new project

BUILD SUCCESSFUL
Total time: 9 minutes 47 seconds

D:\Seam\jboss-seam-2.2.0.GA>









(2)生成命令:seam create-project
D:\Seam\jboss-seam-2.2.0.GA>seam create-project
SEAM_HOME: D:\Seam\jboss-seam-2.2.0.GA
Using seam-gen sources from: D:\Seam\jboss-seam-2.2.0.GA\seam-gen
Buildfile: D:\Seam\jboss-seam-2.2.0.GA\seam-gen\build.xml

init:

init-properties:
     [echo] D:/GreenSoft/JBoss/JDK16/jboss-5.1.0.GA

validate-workspace:

validate-project:

icefaces-staging-copy:

initcopy:

initpoms:
     [echo] Setting up dependencies
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
[artifact:install] [INFO] Installing D:\Seam\jboss-seam-2.2.0.GA\classes\poms\ro
ot.pom to C:\Documents and Settings\Administrator\.m2\repository\org\jboss\seam\
root\2.2.0.GA\root-2.2.0.GA.pom
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
[artifact:install] [INFO] Installing D:\Seam\jboss-seam-2.2.0.GA\classes\poms\pa
rent.pom to C:\Documents and Settings\Administrator\.m2\repository\org\jboss\sea
m\parent\2.2.0.GA\parent-2.2.0.GA.pom
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms
     [copy] Copying 1 file to D:\Seam\jboss-seam-2.2.0.GA\classes\poms

copyseam:

copyseamdependencies:

copyjbossembedded:

copy-icefaces-home:

copy-icefaces-maven:

copy-lib:
     [echo] Copying Seam and dependencies to the D:/projects/seamWerProject/lib
directory...
     [copy] Copying 141 files to D:\projects\seamWerProject\lib
     [copy] Copied 5 empty directories to 2 empty directories under D:\projects\
seamWerProject\lib
     [echo] Copying JBoss Embedded configuration to the D:/projects/seamWerProje
ct/bootstrap directory...
     [copy] Copying 30 files to D:\projects\seamWerProject\bootstrap

file-copy-war:
     [echo] Copying build scripts for WAR deployment to the D:/projects/seamWerP
roject directory...
     [copy] Copying 2 files to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject
     [echo] Copying resources needed for WAR deployment to the D:/projects/seamW
erProject/resources directory...
     [copy] Copying 5 files to D:\projects\seamWerProject\resources
     [copy] Copying 1 file to D:\projects\seamWerProject\resources\WEB-INF

file-copy-ear:

setup-filters:

file-copy:
     [copy] Copying 1 file to D:\projects\seamWerProject
     [copy] Copying 3 files to D:\projects\seamWerProject\resources
     [copy] Copying 11 files to D:\projects\seamWerProject\resources
     [copy] Copying 4 files to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject\.settings
     [copy] Copying 1 file to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject
    [mkdir] Created dir: D:\projects\seamWerProject\nbproject
     [copy] Copying 3 files to D:\projects\seamWerProject\nbproject
     [copy] Copying 1 file to D:\projects\seamWerProject\resources
     [copy] Copying 1 file to D:\projects\seamWerProject\resources
     [copy] Copying 1 file to D:\projects\seamWerProject\resources
     [copy] Copying 1 file to D:\projects\seamWerProject\resources
     [copy] Copying 1 file to D:\projects\seamWerProject\resources
     [copy] Copying 1 file to D:\projects\seamWerProject\resources
     [copy] Copying 1 file to D:\projects\seamWerProject\resources
     [copy] Copying 1 file to D:\projects\seamWerProject\resources
     [copy] Copying 13 files to D:\projects\seamWerProject\view
     [copy] Copying 16 files to D:\projects\seamWerProject\view
     [copy] Copying 1 file to D:\projects\seamWerProject\src\hot\com\cmm\seamwer
project\action
     [copy] Copying 3 files to D:\projects\seamWerProject
     [copy] Copying 1 file to D:\projects\seamWerProject
    [mkdir] Created dir: D:\projects\seamWerProject\src\main\com\cmm\seamwerproj
ect\model
    [mkdir] Created dir: D:\projects\seamWerProject\src\test\com\cmm\seamwerproj
ect\test
     [copy] Copying 1 file to D:\projects\seamWerProject\src\test

create-project:
     [echo] A new Seam project named 'seamWerProject' was created in the D:/proj
ects directory
     [echo] Type 'seam explode' and go to http://localhost:8080/seamWerProject
     [echo] Eclipse Users: Import the project using File > Import... > Existing
Projects into Workspace, set the root directory to D:/projects, then select the
project named seamWerProject
     [echo] NetBeans Users: Open the project using File > Open project... and se
lect the project folder D:/projects/seamWerProject
     [echo] IDEA Users: Open the project using File > Open project... and select
 the file D:/projects/seamWerProject/seamWerProject.ipr

BUILD SUCCESSFUL
Total time: 6 seconds

D:\Seam\jboss-seam-2.2.0.GA>











(3)部署命令:seam explode
D:\Seam\jboss-seam-2.2.0.GA>seam explode
SEAM_HOME: D:\Seam\jboss-seam-2.2.0.GA
Using seam-gen sources from: D:\Seam\jboss-seam-2.2.0.GA\seam-gen
Buildfile: D:\Seam\jboss-seam-2.2.0.GA\seam-gen\build.xml

init:

init-properties:
     [echo] D:/GreenSoft/JBoss/JDK16/jboss-5.1.0.GA

validate-workspace:

validate-project:

explode:
     [echo] Deploying project 'seamWerProject' to JBoss AS as an exploded direct
ory

init:
    [mkdir] Created dir: D:\projects\seamWerProject\exploded-archives\seamWerPro
ject.war\WEB-INF\classes
    [mkdir] Created dir: D:\projects\seamWerProject\exploded-archives\seamWerPro
ject.war\WEB-INF\dev
    [mkdir] Created dir: D:\projects\seamWerProject\dist

groovy.compilemodel:

compilemodel:

groovy.compileactions:

groovy.copyactions:

compileactions:
    [javac] Compiling 1 source file to D:\projects\seamWerProject\exploded-archi
ves\seamWerProject.war\WEB-INF\dev

copyclasses:

compile:

war:
     [copy] Copying 29 files to D:\projects\seamWerProject\exploded-archives\sea
mWerProject.war
     [copy] Copying 1 file to D:\projects\seamWerProject\exploded-archives\seamW
erProject.war\WEB-INF\classes
     [copy] Copying 1 file to D:\projects\seamWerProject\exploded-archives\seamW
erProject.war\WEB-INF\classes\META-INF
     [copy] Copying 1 file to D:\projects\seamWerProject\exploded-archives\seamW
erProject.war\WEB-INF\classes
     [copy] Copying 4 files to D:\projects\seamWerProject\exploded-archives\seam
WerProject.war\WEB-INF
     [copy] Copying 30 files to D:\projects\seamWerProject\exploded-archives\sea
mWerProject.war\WEB-INF\lib
     [copy] Copying 10 files to D:\projects\seamWerProject\exploded-archives\sea
mWerProject.war\WEB-INF\classes
     [copy] Copying 1 file to D:\projects\seamWerProject\exploded-archives\seamW
erProject.war\WEB-INF

stage:

datasource:
     [copy] Copying 1 file to D:\GreenSoft\JBoss\JDK16\jboss-5.1.0.GA\server\def
ault\deploy

explode:
    [mkdir] Created dir: D:\GreenSoft\JBoss\JDK16\jboss-5.1.0.GA\server\default\
deploy\seamWerProject.war
     [copy] Warning: WEB-INF\classes\META-INF\orm.xml modified in the future.
     [copy] Warning: WEB-INF\classes\META-INF\persistence.xml modified in the fu
ture.
     [copy] Warning: WEB-INF\classes\components.properties modified in the futur
e.
     [copy] Warning: WEB-INF\classes\import.sql modified in the future.
     [copy] Warning: WEB-INF\classes\messages_bg.properties modified in the futu
re.
     [copy] Warning: WEB-INF\classes\messages_de.properties modified in the futu
re.
     [copy] Warning: WEB-INF\classes\messages_en.properties modified in the futu
re.
     [copy] Warning: WEB-INF\classes\messages_fr.properties modified in the futu
re.
     [copy] Warning: WEB-INF\classes\messages_it.properties modified in the futu
re.
     [copy] Warning: WEB-INF\classes\messages_tr.properties modified in the futu
re.
     [copy] Warning: WEB-INF\classes\seam.properties modified in the future.
     [copy] Warning: WEB-INF\classes\security.drl modified in the future.
     [copy] Warning: WEB-INF\classes\stylesheet\theme.xcss modified in the futur
e.
     [copy] Warning: WEB-INF\components.xml modified in the future.
     [copy] Warning: WEB-INF\dev\com\cmm\seamwerproject\action\Authenticator.cla
ss modified in the future.
     [copy] Warning: WEB-INF\faces-config.xml modified in the future.
     [copy] Warning: WEB-INF\jboss-web.xml modified in the future.
     [copy] Warning: WEB-INF\lib\antlr-runtime.jar modified in the future.
     [copy] Warning: WEB-INF\lib\commons-beanutils.jar modified in the future.
     [copy] Warning: WEB-INF\lib\commons-digester.jar modified in the future.
     [copy] Warning: WEB-INF\lib\core.jar modified in the future.
     [copy] Warning: WEB-INF\lib\darkX.jar modified in the future.
     [copy] Warning: WEB-INF\lib\drools-api.jar modified in the future.
     [copy] Warning: WEB-INF\lib\drools-compiler.jar modified in the future.
     [copy] Warning: WEB-INF\lib\drools-core.jar modified in the future.
     [copy] Warning: WEB-INF\lib\drools-decisiontables.jar modified in the futur
e.
     [copy] Warning: WEB-INF\lib\drools-templates.jar modified in the future.
     [copy] Warning: WEB-INF\lib\glassX.jar modified in the future.
     [copy] Warning: WEB-INF\lib\janino.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-el.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-seam-debug.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-seam-excel.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-seam-ioc.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-seam-mail.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-seam-pdf.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-seam-remoting.jar modified in the future.

     [copy] Warning: WEB-INF\lib\jboss-seam-rss.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-seam-ui.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jboss-seam.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jbpm-jpdl.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jsf-facelets.jar modified in the future.
     [copy] Warning: WEB-INF\lib\jxl.jar modified in the future.
     [copy] Warning: WEB-INF\lib\laguna.jar modified in the future.
     [copy] Warning: WEB-INF\lib\mvel2.jar modified in the future.
     [copy] Warning: WEB-INF\lib\richfaces-api.jar modified in the future.
     [copy] Warning: WEB-INF\lib\richfaces-impl.jar modified in the future.
     [copy] Warning: WEB-INF\lib\richfaces-ui.jar modified in the future.
     [copy] Warning: WEB-INF\pages.xml modified in the future.
     [copy] Warning: WEB-INF\web.xml modified in the future.
     [copy] Warning: error.xhtml modified in the future.
     [copy] Warning: favicon.ico modified in the future.
     [copy] Warning: home.xhtml modified in the future.
     [copy] Warning: img\btnmanageroles.png modified in the future.
     [copy] Warning: img\btnmanageusers.png modified in the future.
     [copy] Warning: img\btnnewpermission.png modified in the future.
     [copy] Warning: img\btnnewrole.png modified in the future.
     [copy] Warning: img\btnnewuser.png modified in the future.
     [copy] Warning: img\dtpick.gif modified in the future.
     [copy] Warning: img\error.gif modified in the future.
     [copy] Warning: img\false.png modified in the future.
     [copy] Warning: img\manytoone.gif modified in the future.
     [copy] Warning: img\msgerror.png modified in the future.
     [copy] Warning: img\msginfo.png modified in the future.
     [copy] Warning: img\msgwarn.png modified in the future.
     [copy] Warning: img\onetomany.gif modified in the future.
     [copy] Warning: img\seamlogo.png modified in the future.
     [copy] Warning: img\true.png modified in the future.
     [copy] Warning: index.html modified in the future.
     [copy] Warning: layout\display.xhtml modified in the future.
     [copy] Warning: layout\edit.xhtml modified in the future.
     [copy] Warning: layout\menu.xhtml modified in the future.
     [copy] Warning: layout\sort.xhtml modified in the future.
     [copy] Warning: layout\template.xhtml modified in the future.
     [copy] Warning: login.page.xml modified in the future.
     [copy] Warning: login.xhtml modified in the future.
     [copy] Warning: stylesheet\theme.css modified in the future.
     [copy] Warning: stylesheet\theme.xcss modified in the future.
     [copy] Warning: stylesheet\useradmin.css modified in the future.
     [copy] Warning: WEB-INF\classes\META-INF modified in the future.
     [copy] Warning: WEB-INF\classes\stylesheet modified in the future.
     [copy] Warning: WEB-INF\dev\com modified in the future.
     [copy] Warning: WEB-INF\dev\com\cmm modified in the future.
     [copy] Warning: WEB-INF\dev\com\cmm\seamwerproject modified in the future.
     [copy] Warning: WEB-INF\dev\com\cmm\seamwerproject\action modified in the f
uture.
     [copy] Warning: WEB-INF\lib modified in the future.
     [copy] Warning: img modified in the future.
     [copy] Warning: layout modified in the future.
     [copy] Warning: stylesheet modified in the future.
     [copy] Copying 78 files to D:\GreenSoft\JBoss\JDK16\jboss-5.1.0.GA\server\d
efault\deploy\seamWerProject.war

BUILD SUCCESSFUL
Total time: 7 seconds

D:\Seam\jboss-seam-2.2.0.GA>



在部署完成后,会在Jboss服务器下生成一个目录(seamWerProject.war)和一个数据源文件(seamWerProject-ds.xml)。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值