`
superloafer
  • 浏览: 167823 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Seam Maven integration

阅读更多
By running this command you will get template for your project.
    mvn archetype:create  -DarchetypeArtifactId=softeu-archetype-seam \
    -DremoteRepositories=http://maven.softeu.cz/ \
    -DgroupId=cz.softeu.test -DartifactId=helloApp


Read README.txt inside the generated project.

Modify profiles.xml and jdbc.properties and configure it for your environment (DB + Container).

Now you can use Maven Seam plugin (similar to SeamGen):
    mvn seam:new-entity
    mvn seam:new-action
    mvn seam:new-form
    mvn seam:new-conversation


Note: mvn seam:generate-entities doesn't work yet.
Seam Examples

You can download few Seam examptes that I converted to using Maven:

    * hibernate2.zip
    * blog.zip

Using by hand

Add our Maven repository to your repositories in pom.xml:
<repositories>
    <repository>
        <id>softeu-repo</id>
        <url>http://maven.softeu.cz/</url>
    </repository>
</repositories>

And add dependency on your chosen profile(s)
<dependency>
    <groupId>jboss.seam.profiles</groupId>
    <artifactId>seam-facelets</artifactId>
    <version>1.1.6.GA</version>
    <scope>compile</scope>
</dependency>

不过运行这个命令后,在eclipse里面总是会出现找不到包的错误,原来maven下不到它要求的版本的包。于是把该项目目录下的.classpath文件改一改,修改为maven-repository里面已有版本的包就行了,不过觉得好多包都用不上。修改后的.classpath文件为:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src/main/java"/>
	<classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
	<classpathentry excluding="**/*.java" kind="src" path="src/main/resources-filter"/>
	<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
	<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources-filter"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-security/5.0.0alpha/jboss-security-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-transaction/5.0.0alpha/jboss-transaction-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-archive-browsing/5.0.0alpha-200607201-119/jboss-archive-browsing-5.0.0alpha-200607201-119.jar"/>
	<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.2.1.ga/hibernate-annotations-3.2.1.ga.jar"/>
	<classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/apache/myfaces/core/myfaces-impl/1.1.2/myfaces-impl-1.1.2.jar"/>
	<classpathentry kind="var" path="M2_REPO/qdox/qdox/1.5/qdox-1.5.jar"/>
	<classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/profiles/seam-ajax4jsf/1.2.1.GA/seam-ajax4jsf-1.2.1.GA.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-jca/5.0.0alpha/jboss-jca-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.2.1.ga/hibernate-entitymanager-3.2.1.ga.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar">
		<attributes>
			<attribute name="javadoc_location" value="jar:file:/D:/maven-repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-javadoc.jar!/"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar" sourcepath="M2_REPO/javax/mail/mail/1.4/mail-1.4-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-jci-core/1.0-406301/commons-jci-core-1.0-406301.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/profiles/seam-jpa/1.2.1.GA/seam-jpa-1.2.1.GA.jar"/>
	<classpathentry kind="var" path="M2_REPO/javax/resource/connector-api/1.5/connector-api-1.5.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/testng/testng/5.1/testng-5.1-jdk15.jar"/>
	<!-- <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar">
		<attributes>
			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
		</attributes>
	</classpathentry>
	 -->
	<classpathentry kind="var" path="M2_REPO/jaxen/jaxen/1.1-beta-6/jaxen-1.1-beta-6.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/ajax4jsf/ajax4jsf/1.1.1/ajax4jsf-1.1.1.jar"/>
	<classpathentry kind="var" path="M2_REPO/jaxme/jaxme-api/0.3/jaxme-api-0.3.jar"/>
	<classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.5.0/xercesImpl-2.5.0.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jnpserver/5.0.0alpha/jnpserver-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/jboss-seam-ui/1.2.1.GA/jboss-seam-ui-1.2.1.GA.jar" sourcepath="M2_REPO/jboss/seam/jboss-seam-ui/1.2.1.GA/jboss-seam-ui-1.2.1.GA-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/profiles/seam-ejb/1.2.1.GA/seam-ejb-1.2.1.GA.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/jboss-seam/1.2.1.GA/jboss-seam-1.2.1.GA.jar" sourcepath="M2_REPO/jboss/seam/jboss-seam/1.2.1.GA/jboss-seam-1.2.1.GA-sources.jar">
		<attributes>
			<attribute name="javadoc_location" value="jar:file:/D:/maven-repository/jboss/seam/jboss-seam/1.2.1.GA/jboss-seam-1.2.1.GA-javadoc.jar!/"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="var" path="M2_REPO/pull-parser/pull-parser/2/pull-parser-2.jar"/>
	<classpathentry kind="var" path="M2_REPO/cz/softeu/softeu-rewriter/1.1/softeu-rewriter-1.1.jar" sourcepath="M2_REPO/cz/softeu/softeu-rewriter/1.1/softeu-rewriter-1.1-sources.jar">
		<attributes>
			<attribute name="javadoc_location" value="jar:file:/D:/maven-repository/cz/softeu/softeu-rewriter/1.1/softeu-rewriter-1.1-javadoc.jar!/"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar" sourcepath="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/drools/drools-compiler/3.0.5/drools-compiler-3.0.5.jar"/>
	<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"/>
	<classpathentry kind="var" path="M2_REPO/drools/drools-core/3.0.5/drools-core-3.0.5.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/profiles/seam-hibernate/1.2.1.GA/seam-hibernate-1.2.1.GA.jar"/>
	<classpathentry kind="var" path="M2_REPO/javax/el/el-api/1.2/el-api-1.2.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-common/5.0.0alpha/jboss-common-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3-sources.jar">
		<attributes>
			<attribute name="javadoc_location" value="jar:file:/D:/maven-repository/commons-codec/commons-codec/1.3/commons-codec-1.3-javadoc.jar!/"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="var" path="M2_REPO/msv/xsdlib/20030807/xsdlib-20030807.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-microcontainer/5.0.0alpha/jboss-microcontainer-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-jci-janino/2.4.3/commons-jci-janino-2.4.3.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/profiles/seam-microcontainer/1.2.1.GA/seam-microcontainer-1.2.1.GA.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/jboss-seam-debug/1.2.1.GA/jboss-seam-debug-1.2.1.GA.jar" sourcepath="M2_REPO/jboss/seam/jboss-seam-debug/1.2.1.GA/jboss-seam-debug-1.2.1.GA-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.1/commons-io-1.1.jar" sourcepath="M2_REPO/commons-io/commons-io/1.1/commons-io-1.1-sources.jar">
		<attributes>
			<attribute name="javadoc_location" value="jar:file:/D:/maven-repository/commons-io/commons-io/1.1/commons-io-1.1-javadoc.jar!/"/>
		</attributes>
	</classpathentry>
	<!--  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar"/> -->
	<classpathentry kind="var" path="M2_REPO/msv/relaxngDatatype/20030807/relaxngDatatype-20030807.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-container/5.0.0alpha/jboss-container-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/javax/el/el-ri/1.2/el-ri-1.2.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar"/>
	<classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/profiles/seam-facelets/1.2.1.GA/seam-facelets-1.2.1.GA.jar"/>
	<classpathentry kind="var" path="M2_REPO/xom/xom/1.0b3/xom-1.0b3.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-common-jdbc-wrapper/5.0.0alpha/jboss-common-jdbc-wrapper-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-dependency/5.0.0alpha/jboss-dependency-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/javassist/3.4.ga/javassist-3.4.ga.jar"/>
	<classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.0/commons-fileupload-1.0.jar" sourcepath="M2_REPO/commons-fileupload/commons-fileupload/1.0/commons-fileupload-1.0-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/apache/myfaces/core/myfaces-api/1.1.3/myfaces-api-1.1.3.jar"/>
	<classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.6/commons-digester-1.6.jar"/>
	<classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/bsh/bsh/2.0b1/bsh-2.0b1.jar"/>
	<classpathentry kind="var" path="M2_REPO/javax/jms/jms/1.1/jms-1.1.jar"/>
	<classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/apache/myfaces/tomahawk/tomahawk/1.1.3/tomahawk-1.1.3.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar"/>
	<classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/jboss-seam-mail/1.2.1.GA/jboss-seam-mail-1.2.1.GA.jar" sourcepath="M2_REPO/jboss/seam/jboss-seam-mail/1.2.1.GA/jboss-seam-mail-1.2.1.GA-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-system/5.0.0alpha/jboss-system-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-local-jdbc/5.0.0alpha/jboss-local-jdbc-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar"/>
	<classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.1/commons-lang-2.1-sources.jar"/>
	<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.1.ga/hibernate-3.2.1.ga.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/jboss-j2se/5.0.0alpha/jboss-j2se-5.0.0alpha.jar"/>
	<classpathentry kind="var" path="M2_REPO/jboss/seam/profiles/seam-drools/1.2.1.GA/seam-drools-1.2.1.GA.jar"/>
	<classpathentry kind="output" path="target/classes"/>
</classpath>
分享到:
评论
1 楼 wenjinglian 2009-08-01  

相关推荐

Global site tag (gtag.js) - Google Analytics