<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd' xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
    <parent>
        <groupId>com.sun.grizzly</groupId>
        <artifactId>project</artifactId>
        <version>1.6.1</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sun.grizzly</groupId>
    <artifactId>cometd</artifactId>
    <packaging>jar</packaging>
    <version>${grizzly-version}</version>
    <name>grizzly-cometd</name>
    <url>https://grizzly.dev.java.net</url>
    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copyfiles</id>
                        <phase>install</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <copy failonerror='false' file='target/${project.artifactId}-${project.version}.${project.packaging}' todir='.'/>
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <delete dir='./lib' failonerror='false'/>
                            </tasks>
                        </configuration>
                    </execution>		  
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Main-Class>com.sun.grizzly.standalone.Cometd</Main-Class>
                        </manifestEntries>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>dependency-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-deps</id>
                        <phase>install</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.sun.grizzly</groupId>
                                    <artifactId>framework</artifactId>
                                    <version>${grizzly-version}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sun.grizzly</groupId>
                                    <artifactId>http-utils</artifactId>
                                    <version>${grizzly-version}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sun.grizzly</groupId>
                                    <artifactId>http</artifactId>
                                    <version>${grizzly-version}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sun.grizzly</groupId>
                                    <artifactId>comet</artifactId>
                                    <version>${grizzly-version}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>javax.servlet</groupId>
                                    <artifactId>servlet-api</artifactId>
                                    <version>2.5</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>./lib/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <repositories>
        
    </repositories>
    <dependencies>
        <dependency>
            <groupId>com.sun.grizzly</groupId>
            <artifactId>comet</artifactId>
            <version>${grizzly-version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit-version}</version>
            <scope>test</scope>
        </dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.5</version>
		</dependency>
    </dependencies>
</project>
