LoginSignup
1
1

More than 5 years have passed since last update.

SnakeYAMLをテストフィクスチャとして使う場合のpom.xmlの設定

Last updated at Posted at 2012-12-27
pom.xml
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.ryu22e</groupId>
    <artifactId>ryu22e</artifactId>
    <version>1</version>
    <packaging>jar</packaging>

    <name>ryu22e</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <repositories>
        <repository>
            <id>Sonatype-public</id>
            <name>SnakeYAML repository</name>
            <url>http://oss.sonatype.org/content/groups/public/</url>
        </repository>
    </repositories>
    <build>
        <testResources>
            <testResource>
                <filtering>false</filtering>
                <directory>src/test/java</directory>
                <includes>
                    <!-- これがないとmvn testでyamlファイルを読み込むテストを実行できない。 -->
                    <include>**/*.java</include>
                    <include>**/*.yaml</include>
                </includes>
            </testResource>
        </testResources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.0</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <sourceIncludes>
                        <!-- これがないとEclipse上でyamlファイルを読み込むテストを実行できない。 -->
                        <sourceInclude>**/*.yaml</sourceInclude>
                    </sourceIncludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>1.12-SNAPSHOT</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1