sa-struts-tutorial の pom.xml を作った
sa-struts-tutorial には pom.xml が含まれていない。
最近は maven 使わないと開発できない体になってしまったので作ってみた。備忘録的に貼っておく。
Dolteng が出力する pom.xml をそのまま使おうとしたら、上手くいかなかったので、少し改造。
何が問題だったかは、別のエントリーで書く。
- 使い方
以上で、WTP2.0(Eclipse 3.4)での開発が可能。
<?xml version="1.0" encoding="UTF-8"?> <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.seasar.sastruts</groupId> <artifactId>sa-struts-tutorial</artifactId> <version>1.0.4-sp4</version> <packaging>war</packaging> <name>sa-struts-tutorial</name> <build> <sourceDirectory>src/main/java</sourceDirectory> <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory> <resources> <resource> <directory>src/main/resources</directory> </resource> </resources> <testOutputDirectory>target/test-classes</testOutputDirectory> <testSourceDirectory>src/test/java</testSourceDirectory> <testResources> <testResource> <directory>src/test/resources</directory> </testResource> </testResources> <defaultGoal>validate</defaultGoal> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>source-jar</id> <phase>package</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <wtpversion>2.0</wtpversion> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> </configuration> </plugin> </plugins> </pluginManagement> </build> <pluginRepositories> <pluginRepository> <id>maven.seasar.org</id> <name>The Seasar Foundation Maven2 Repository</name> <url>http://maven.seasar.org/maven2</url> </pluginRepository> </pluginRepositories> <repositories> <repository> <id>local</id> <name>Local Repository</name> <url>file:repo</url> </repository> <repository> <id>maven.seasar.org</id> <name>The Seasar Foundation Maven2 Repository</name> <url>http://maven.seasar.org/maven2</url> </repository> </repositories> <dependencies> <dependency> <groupId>antlr</groupId> <artifactId>antlr</artifactId> <version>2.7.7</version> </dependency> <dependency> <groupId>aopalliance</groupId> <artifactId>aopalliance</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> <version>1.7.0</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.1</version> </dependency> <dependency> <groupId>commons-digester</groupId> <artifactId>commons-digester</artifactId> <version>1.6</version> <exclusions> <exclusion> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>commons-el</groupId> <artifactId>commons-el</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1</version> <exclusions> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>commons-validator</groupId> <artifactId>commons-validator</artifactId> <version>1.2.0</version> </dependency> <dependency> <groupId>oro</groupId> <artifactId>oro</artifactId> <version>2.0.8</version> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> </dependency> <dependency> <groupId>jboss</groupId> <artifactId>javassist</artifactId> <version>3.4.ga</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.1.2</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.13</version> </dependency> <dependency> <groupId>ognl</groupId> <artifactId>ognl</artifactId> <version>2.6.9-patch-20070908</version> </dependency> <dependency> <groupId>org.seasar.sastruts</groupId> <artifactId>sa-struts</artifactId> <version>1.0.4-sp4</version> </dependency> <dependency> <groupId>struts</groupId> <artifactId>struts</artifactId> <version>1.2.9</version> <exclusions> <exclusion> <groupId>xalan</groupId> <artifactId>xalan</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.4</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <!-- JDK 6.0を使っている場合、JDKにコモンアノテーションが含まれるので不要。 --> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-annotation_1.0_spec</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <!-- JavaEE5コンテナ(Glassfish, Geronimo, JBoss, WebSphere, WebLogicなど)を使っている場合は、scope を provided にすること。--> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-ejb_3.0_spec</artifactId> <version>1.0</version> <!-- <scope>provided</scope> --> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-interceptor_3.0_spec</artifactId> <version>1.0</version> <!-- <scope>provided</scope> --> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-jpa_3.0_spec</artifactId> <version>1.0</version> <!-- <scope>provided</scope> --> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-jta_1.1_spec</artifactId> <version>1.0</version> <!-- <scope>provided</scope> --> </dependency> </dependencies> </project>