<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>
    <parent>
        <groupId>net.sf.cuf</groupId>
        <artifactId>cuf-parent</artifactId>
        <version>2.0.0</version>
    </parent>
    <artifactId>cuf-csvview</artifactId>
    <packaging>jar</packaging>

    <name>CUF csvview Java Swing example app</name>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <tasks>
                                <property name="src.dir"        value="${project.build.sourceDirectory}" />
                                <property name="buildversion"   value="${project.version}" />
                                <property name="buildtime"      value="${maven.build.timestamp}" />
                                <echo file="${src.dir}/net/sf/cuf/csvview/Version.java">package net.sf.cuf.csvview;

/**
 * Version class, do not modify, this is generated by Maven.
 */
public class Version
{
    /** version string. */
    public static String VERSION= "${buildversion}";
    /** build date. */
    public static String DATE   = "${buildtime}";

    /**
     * We provide only constants.
     */
    private Version()
    {
    }
}
</echo>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>net.sf.cuf.csvview.Main</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>net.sf.cuf</groupId>
            <artifactId>cuf-fw</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.cuf</groupId>
            <artifactId>cuf-swing</artifactId>
        </dependency>
    </dependencies>
</project>
