読者です 読者をやめる 読者になる 読者になる

Wicket-Seam-Testを動かしてみた。

今、これ読んでる。

JBoss徹底活用ガイド ーJava・オープンソース・JBoss Seam・JBoss AS

JBoss徹底活用ガイド ーJava・オープンソース・JBoss Seam・JBoss AS

WicketSeamの連携って出来るのかなーと思ってたら、shin1さんがチャレンジしている模様

もうちょっとググってみたら、Wicket-Stuffの中にwicket-seam-testというのを発見。
http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-seam-test/

とりえずチェックアウトしてみる。
そのままでは、バージョンが古かったりSNAPSHOTのライブラリが使われてたりしているのでpomを適当に書き換える。

<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<groupId>org.apache.wicket</groupId>
	<artifactId>wicket-seam-test</artifactId>
	<packaging>war</packaging>
	<version>1.0-SNAPSHOT</version>
	<name>wicket seam test</name>
	<description></description>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<pluginRepositories>
		<pluginRepository>
			<releases />
			<snapshots>
				<enabled>false</enabled>
				<updatePolicy>never</updatePolicy>
			</snapshots>
			<id>repository.jboss.com</id>
			<name>JBoss Repository</name>
			<url>http://repository.jboss.com/maven2</url>
		</pluginRepository>
	</pluginRepositories>
	<repositories>
		<repository>
			<id>wicket-stuff.org</id>
			<url>http://wicketstuff.org/maven/repository/</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>repository.jboss.com</id>
			<name>JBoss Repository</name>
			<url>http://repository.jboss.com/maven2</url>
		</repository>
		<repository>
			<id>maven1.java.net</id>
			<name>Java.net Maven1 Repositiory</name>
			<url>http://download.java.net/maven/1</url>
			<layout>legacy</layout>
		</repository>
		<repository>
			<id>gwt-maven</id>
			<url>
				http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/
			</url>
		</repository>
		<repository>
			<id>glassfish.java.net</id>
			<url>http://download.java.net/maven/glassfish/</url>
		</repository>
		<repository>
			<id>maven2.java.net</id>
			<url>http://download.java.net/maven/2/</url>
		</repository>
	</repositories>

	<dependencies>
		<!--  WICKET DEPENDENCIES -->

		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket</artifactId>
			<version>${wicket.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket-ioc</artifactId>
			<version>${wicket.version}</version>
		</dependency>

		<!-- LOGGING DEPENDENCIES - LOG4J -->

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.4.2</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.14</version>
		</dependency>

		<!-- SEAM DEPENDENCIES -->
		<dependency>
			<groupId>jboss</groupId>
			<artifactId>jboss-seam</artifactId>
			<version>2.0.0.BETA1</version>
		</dependency>
		<dependency>
			<groupId>javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.8.1.GA</version>
		</dependency>
		<dependency>
			<groupId>dom4j</groupId>
			<artifactId>dom4j</artifactId>
			<version>1.6.1-jboss</version>
		</dependency>
		<dependency>
			<groupId>javax.el</groupId>
			<artifactId>el-api</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>javax.faces</groupId>
			<artifactId>jsf-api</artifactId>
			<version>1.2_04-p01</version>
		</dependency>
		<dependency>
			<groupId>javax.persistence</groupId>
			<artifactId>persistence-api</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>3.0.0.ga</version>
		</dependency>

		<!--  JETTY DEPENDENCIES FOR TESTING  -->

		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty-util</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty-plus</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty-naming</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<downloadSources>true</downloadSources>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<warSourceDirectory>
						src/main/webapp
					</warSourceDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>surefire-report-maven-plugin</artifactId>
			</plugin>
		</plugins>
		<resources>
			<resource>
				<filtering>false</filtering>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<filtering>false</filtering>
				<directory>src/main/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<filtering>false</filtering>
				<directory>src/test/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</testResource>
		</testResources>
	</build>

	<properties>
		<wicket.version>1.3.4</wicket.version>
		<jetty.version>6.1.4</jetty.version>
		<maven.test.skip>true</maven.test.skip>
	</properties>

</project>

とりあえずjettyで動かしてみる。

$ mvn jetty:run

動いたっぽい!
f:id:yamkazu:20080922171144j:image

もうちょっとseamを勉強しつつ遊んでみよう。