<?xml version="1.0" encoding="UTF-8"?>
<!-- 
Copyright 2013 Dan Haywood

Licensed under the Apache License, Version 2.0 (the "License"); 
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at 

    http://www.apache.org/licenses/LICENSE-2.0
     
Unless required by applicable law or agreed to in writing, 
software distributed under the License is distributed on an 
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
either express or implied. See the License for the specific
language governing permissions and limitations under the License.
-->
<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>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.danhaywood.isis.wicket</groupId>
    <artifactId>danhaywood-isis-wicket-wickedcharts</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>
    
    <name>Isis Wicket Viewer Wicket-Charts Component</name>
    <description>
        A number of components for Apache Isis' Wicket viewer, to render a standalone
        chart or a bar chart for a collection of entities.
        Uses wickedcharts Wicket component, a wrapper around HighCharts JS.  Note that a
        HighCharts license is required for any commercial usage.
    </description>

    <url>https://github.com/danhaywood/isis-wicket-wickedcharts</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:https://github.com/danhaywood/isis-wicket-wickedcharts.git</connection>
        <developerConnection>scm:git:https://github.com/danhaywood/isis-wicket-wickedcharts.git</developerConnection>
        <url>https://github.com/danhaywood/isis-wicket-wickedcharts.git</url>
    </scm>
    <developers>
        <developer>
            <id>danhaywood</id>
            <name>Dan Haywood</name>
            <email>dan@haywood-associates.co.uk</email>
        </developer>
    </developers>
    
    <properties>
        <isis.version>1.2.0</isis.version>
        <isis-viewer-wicket.version>1.2.0</isis-viewer-wicket.version>
        <wicked-charts.version>1.4.3</wicked-charts.version>

        <compileSource>1.6</compileSource>
        <compileTarget>1.6</compileTarget>
    </properties>

    <build>
        <resources>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/java</directory>
                <includes>
                    <include>**</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.1</version>
                    <configuration>
                        <showDeprecation>false</showDeprecation>
                        <showWarnings>false</showWarnings>
                        <source>${compileSource}</source>
                        <target>${compileTarget}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.3.1</version>
                    <inherited>true</inherited>
                    <executions>
                        <execution>
                            <id>package-test-jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.1.2</version>
                    <inherited>true</inherited>
                    <executions>
                        <execution>
                            <id>package-jars</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                                <goal>test-jar</goal>
                            </goals>
                            <configuration>
                                <includePom>true</includePom>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <includePom>true</includePom>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.8</version>
                    <inherited>true</inherited>
                    <executions>
                        <execution>
                            <id>package-jars</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                                <goal>test-jar</goal>
                            </goals>
                            <configuration>
                                <includePom>true</includePom>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <debug>true</debug>
                        <minmemory>128m</minmemory>
                        <maxmemory>1024m</maxmemory>
                        <quiet>true</quiet>
                        <doctitle>${project.name} ${project.version}</doctitle>
                        <windowtitle>${project.name} ${project.version}</windowtitle>
                        <testDoctitle>${project.name} ${project.version} (TEST API)</testDoctitle>
                        <testWindowtitle>${project.name} ${project.version} (TEST API)</testWindowtitle>
                        <splitindex>true</splitindex>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <links>
                            <link>http://java.sun.com/j2se/1.6.0/docs/api</link>
                            <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
                            <link>http://java.sun.com/j2se/1.4.2/docs/api</link>
                            <link>http://java.sun.com/j2ee/1.4/docs/api</link>
                        </links>
                        <linksource>true</linksource>
                        <detectOfflineLinks>false</detectOfflineLinks>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>


    <dependencyManagement>
        <dependencies>

            <!-- also for benefit of application developers, using scope=import, type=pom -->
            <dependency>
                <groupId>com.danhaywood.isis.wicket</groupId>
                <artifactId>danhaywood-isis-wicket-wickedcharts-applib</artifactId>
                <version>1.2.0</version>
            </dependency>
            <dependency>
                <groupId>com.danhaywood.isis.wicket</groupId>
                <artifactId>danhaywood-isis-wicket-wickedcharts-scalarchart</artifactId>
                <version>1.2.0</version>
            </dependency>
            <dependency>
                <groupId>com.danhaywood.isis.wicket</groupId>
                <artifactId>danhaywood-isis-wicket-wickedcharts-summarycharts</artifactId>
                <version>1.2.0</version>
            </dependency>

            <dependency>
                <!-- ASL v2.0 -->
                <groupId>org.apache.isis.core</groupId>
                <artifactId>isis-core-applib</artifactId>
                <version>${isis.version}</version>
            </dependency>
            <dependency>
                <!-- ASL v2.0 -->
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.7</version>
            </dependency>

            <dependency>
                <!-- ASL v2.0 -->
                <groupId>org.apache.isis.viewer</groupId>
                <artifactId>isis-viewer-wicket-ui</artifactId>
                <version>${isis-viewer-wicket.version}</version>
            </dependency>

            <dependency>
                <!-- ASL v2.0 -->
                <!-- in turn, depends on: 
                     * http://highcharts.com/license 
                       (commercial license required unless personal/open source project)  
                 -->
                <groupId>com.googlecode.wicked-charts</groupId>
                <artifactId>wicked-charts-wicket6</artifactId>
                <version>${wicked-charts.version}</version>
            </dependency>

            <dependency>
                <!-- Common Public License 1.0 -->
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <!-- http://jmock.org/license.html (similar to Apache) -->
                <groupId>org.jmock</groupId>
                <artifactId>jmock</artifactId>
                <version>2.5.1</version>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>


    
    <modules>
        <module>applib</module>
        <module>scalarchart</module>
        <module>summarycharts</module>
    </modules>
    
    <profiles>
        <profile>
            <id>m2e</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <directory>target-ide</directory>
            </build>
        </profile>
    </profiles>

</project>
