Selecting Play! 2.x Source Watcher JDK7

This file watch service is selected automatically on Linux or Windows machines with Java version 1.7 and later.

If you want to force this service on other operating systems, there are three ways of doing so:

- using project property.

Add play2.fileWatchService project property with value jdk7.

This is simplest and recommended way.

<project>
    ...
    <properties>
        ...
        <play2.fileWatchService>jdk7</play2.fileWatchService>
    </properties>
    ...
</project>

- using plugin configuration parameter.

Add fileWatchService parameter with value jdk7 to plugin configuration section.

<project>
    ...
    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>com.google.code.play2-maven-plugin</groupId>
                <artifactId>play2-maven-plugin</artifactId>
                <version>1.0.0-beta7</version>
                <extensions>true</extensions>
                <configuration>
                    ...
                    <fileWatchService>jdk7</fileWatchService>
                </configuration>
            </plugin>
            ...
        </plugins>
    </build>
    ...
</project>

- watch service as plugin dependency.

Add file watch service artifact as plugin dependency.

Warning: Only one file watch service can be added as plugin’s dependency at a time. It will be selected regardless of the value of fileWatchService plugin configuration parameter or play2.fileWatchService project property.

<project>
    ...
    <build>
        ...
        <plugins>
            ...
            <plugin>
                <groupId>com.google.code.play2-maven-plugin</groupId>
                <artifactId>play2-maven-plugin</artifactId>
                <version>1.0.0-beta7</version>
                <extensions>true</extensions>
                <dependencies>
                    <dependency>
                        <groupId>com.google.code.play2-maven-plugin</groupId>
                        <artifactId>play2-source-watcher-jdk7</artifactId>
                        <version>1.0.0-beta7</version>
                    </dependency>
                </dependencies>
            </plugin>
            ...
        </plugins>
    </build>
    ...
</project>

Configuring Play! 2.x Source Watcher JDK7

This service has no configuration parameters.