<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Nuiton Utils :: Nuiton Profiling
  %%
  Copyright (C) 2004 - 2010 CodeLutin
  %%
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as 
  published by the Free Software Foundation, either version 3 of the 
  License, or (at your option) any later version.
  
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Lesser Public License for more details.
  
  You should have received a copy of the GNU General Lesser Public 
  License along with this program.  If not, see
  <http://www.gnu.org/licenses/lgpl-3.0.html>.
  #L%
  -->
<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>

  <!-- ************************************************************* -->
  <!-- *** POM Relationships *************************************** -->
  <!-- ************************************************************* -->

  <parent>
    <groupId>org.nuiton</groupId>
    <artifactId>mavenpom4redmineAndCentral</artifactId>
    <version>3.4.7</version>
  </parent>

  <!-- ************************************************************* -->
  <!-- *** Project Information ************************************* -->
  <!-- ************************************************************* -->

  <name>Nuiton Profiling</name>
  <description>Library of perform profiling in any project.</description>
  <inceptionYear>2004</inceptionYear>

  <artifactId>nuiton-profiling</artifactId>
  <version>2.7</version>
  <packaging>jar</packaging>

  
  <developers>
    <developer>
      <name>Benjamin Poussin</name>
      <id>bpoussin</id>
      <email>poussin@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://www.codelutin.com/</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
        <role>Debian packager</role>
      </roles>
    </developer>

    <developer>
      <name>Éric Chatellier</name>
      <id>echatellier</id>
      <email>chatellier@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://www.codelutin.com/</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

    <developer>
      <name>Tony Chemit</name>
      <id>tchemit</id>
      <email>chemit at codelutin dot com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://www.codelutin.com/</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>


  <!-- ************************************************************* -->
  <!-- *** Project Properties ************************************** -->
  <!-- ************************************************************* -->

  <properties>

    <aspectjVersion>1.7.1</aspectjVersion>

    <!-- Documentation is in apt format -->
    <siteSourcesType>apt</siteSourcesType>

    <!-- extra files to include in release -->
    <redmine.releaseFiles>${redmine.libReleaseFiles}</redmine.releaseFiles>

    <!-- Configure aop -->
    <maven.surefire.debug>
      -javaagent:target/lib/aspectjweaver-${aspectjVersion}.jar
    </maven.surefire.debug>
    <!--<maven.surefire.debug>-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectjVersion}/aspectjweaver-1.6.11.jar</maven.surefire.debug>-->
  </properties>

  <!-- ************************************************************* -->
  <!-- *** Project Dependencies ************************************ -->
  <!-- ************************************************************* -->

  <dependencies>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>

    <!-- aspectJ -->
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>${aspectjVersion}</version>
    </dependency>

    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <version>${aspectjVersion}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <scm>
    <connection>scm:svn:http://svn.nuiton.org/svn/nuiton-profiling/tags/nuiton-profiling-2.7</connection>
    <developerConnection> scm:svn:http://svn.nuiton.org/svn/nuiton-profiling/tags/nuiton-profiling-2.7</developerConnection>
    <url>http://nuiton.org/projects/nuiton-profiling/repository/show/tags/nuiton-profiling-2.7</url>
  </scm>

  <distributionManagement>
    <site>
      <id>${platform}</id>
      <url>${our.site.repository}/${projectId}</url>
    </site>
  </distributionManagement>

  <!-- ************************************************************* -->
  <!-- *** Build Environment  ************************************** -->
  <!-- ************************************************************* -->

  <build>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <configuration>
            <signature>
              <groupId>org.codehaus.mojo.signature</groupId>
              <artifactId>java16-sun</artifactId>
              <version>1.10</version>
            </signature>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>

      <plugin>
        <groupId>ro.isdc.wro4j</groupId>
        <artifactId>wro4j-maven-plugin</artifactId>
        <version>1.6.3</version>
        <dependencies>
          <dependency>
            <groupId>org.nuiton.js</groupId>
            <artifactId>nuiton-js-wro</artifactId>
            <version>1.0</version>
          </dependency>

          <dependency>
            <groupId>org.nuiton.js</groupId>
            <artifactId>nuiton-js-jquery</artifactId>
            <version>1.8.3-1</version>
          </dependency>

          <dependency>
            <groupId>org.nuiton.js</groupId>
            <artifactId>nuiton-js-jquery-ui</artifactId>
            <version>1.9.2-1</version>
          </dependency>

          <dependency>
            <groupId>org.nuiton.js</groupId>
            <artifactId>nuiton-js-jqplot</artifactId>
            <version>1.0.4r1121-1</version>
          </dependency>

          <dependency>
            <groupId>org.nuiton.js</groupId>
            <artifactId>nuiton-js-jqgrid</artifactId>
            <version>4.4.1-1</version>
          </dependency>

          <dependency>
            <groupId>org.nuiton.js</groupId>
            <artifactId>nuiton-js-bootstrap</artifactId>
            <version>2.2.2-1</version>
          </dependency>
        </dependencies>

        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>

        <configuration>
          <targetGroups>profiling-ui-web</targetGroups>
          <minimize>true</minimize>
          <wroFile>${basedir}/src/main/resources/nuiton-js/wro.xml</wroFile>
          <extraConfigFile>${basedir}/src/main/resources/nuiton-js/wro.properties</extraConfigFile>
          <contextFolder>${basedir}/src/main/resources/org/nuiton/profiling/web/</contextFolder>
          <destinationFolder>${basedir}/target/classes/org/nuiton/profiling/web/</destinationFolder>
          <wroManagerFactory>org.nuiton.js.wro.NuitonJsMavenWroManagerFactory</wroManagerFactory>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
              <silent>true</silent>
            </configuration>
          </execution>
        </executions>
      </plugin>

        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>org.nuiton.profiling.NuitonTrace</mainClass>
                    </manifest>
                    <manifestEntries>
                      <Premain-Class>org.aspectj.weaver.loadtime.Agent</Premain-Class>
                      <Can-Redefine-Classes>true</Can-Redefine-Classes>
                    </manifestEntries>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
            <executions>
              <execution>
                <id>one-jar-assembly</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
        </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <reporting>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <quiet>true</quiet>
              <links>
                <link>http://java.sun.com/javase/6/docs/api/</link>
              </links>
            </configuration>
          </plugin>
        </plugins>
      </reporting>

    </profile>

    <!-- create assemblies at release time -->
    <profile>
      <id>assembly-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <defaultGoal>package</defaultGoal>
        <plugins>

          <!-- launch in a release the assembly automaticly -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>create-assemblies</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <attach>false</attach>
              <descriptorRefs>
                <descriptorRef>deps</descriptorRef>
                <descriptorRef>full</descriptorRef>
              </descriptorRefs>
            </configuration>
          </plugin>

        </plugins>

      </build>
    </profile>

  </profiles>

</project>
