<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JOnAS: Java(TM) Open Application Server
  - Copyright (C) 2009-2010 Bull S.A.S.
  - Contact: jonas-team@ow2.org
  -
  - This library 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 2.1 of the License, or any later version.
  -
  - This library 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
  - Lesser General Public License for more details.
  -
  - You should have received a copy of the GNU Lesser General Public
  - License along with this library; if not, write to the Free Software
  - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  - USA
  -
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - $Id: pom.xml 20565 2010-11-08 11:38:20Z benoitf $
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<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">
  <parent>
    <groupId>org.ow2.jonas.assemblies.profiles</groupId>
    <artifactId>micro-jonas</artifactId>
    <version>5.2.0-M3</version>
    <relativePath>../minimal/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jonas-full</artifactId>
  <packaging>pom</packaging>
  <name>JOnAS :: Assemblies :: Profiles :: Full</name>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <!-- Unpack the JOnAS configuration files + binaries + samples -->
            <id>unpack-jonas-configuration</id>
            <goals>
              <goal>unpack</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <artifactItems combine.children="append">
                <artifactItem>
                  <groupId>org.ow2.jonas.assemblies</groupId>
                  <artifactId>examples</artifactId>
                  <version>${project.version}</version>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <!-- Place the bundles in the appropriate directory-->
        <groupId>org.ow2.util.maven</groupId>
        <artifactId>maven-jbuilding-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <profile>
            <!-- JOnAS bundles -->
            <include>audit</include>
            <include>cmi</include>
            <include>db</include>
            <include>dbm</include>
            <include>depmonitor</include>
            <include>discovery-base</include>
            <include>discovery-internal</include>
            <include>discovery-jgroups</include>
            <include>ear</include>
            <include>easybeans-core</include>
            <include>javassist</include>
            <include>easybeans-persistence-eclipselink</include>
            <include>easybeans-persistence-eclipselink2</include>
            <include>easybeans-persistence-hibernate</include>
            <include>easybeans-persistence-hibernate3.5</include>
            <include>easybeans-persistence-openjpa2</include>
<!-- No JPA 2 yet -->
<!--
            <include>easybeans-persistence-openjpa2</include>
-->
            <include>ejb2</include>
            <include>ejb3</include>
            <include>generators-base</include>
            <include>ha</include>
            <include>irmi</include>
            <include>jaxrpc-axis</include>
            <include>jaxrpc-base</include>
            <include>jaxws-axis2</include>
            <include>jaxws-base</include>
            <include>jaxws-cxf</include>
            <include>jdbc-resource-adapters</include>
            <include>jgroups</include>
            <include>jotm</include>
            <include>jtm</include>
            <include>lib-ejb2-ha</include>
            <include>mail</include>
            <include>ow2-util-common-impl</include>
            <include>ow2-util-event-common-ejb</include>
            <include>resource</include>
            <include>resourcemonitor</include>
            <include>saaj-ri</include>
            <include>sec-interceptors-iiop</include>
            <include>smartclient</include>
            <include>trans-interceptors-iiop</include>
            <include>versioning</include>
            <include>wc</include>
            <include>web-base</include>
            <include>web-jetty6</include>
            <include>web-tomcat6</include>
            <include>web-tomcat7</include>
            <include>wm</include>
            <include>wsdl-publisher</include>
            <include>xmlbeans</include>
            <include>cdi</include>

            <!-- Applications -->
            <include>ctxroot</include>
            <include>doc</include>
            <include>jonasAdmin</include>
            <include>joram</include>
            <include>mejb</include>
            <include>scout</include>
          </profile>
        </configuration>
        <executions>
          <execution>
            <id>generate-jonas-services-maven2-deployment-plans</id>
            <goals>
              <goal>generate-maven2-deployment-plans</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <directory>repositories/url-internal</directory>
            </configuration>
          </execution>

          <execution>
            <id>copy-jonas-artifacts</id>
            <goals>
              <goal>assemble</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <directory>repositories/maven2-internal</directory>
            </configuration>
          </execution>

          <!-- Generate a version.properties in target/ -->
          <execution>
            <id>generate-versions-properties</id>
            <goals>
              <goal>versions</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <output>${project.build.directory}/assemble-resources/versions.properties</output>
            </configuration>
          </execution>

          <!-- Generate the client.jar -->
          <execution>
            <id>generate-client-jar</id>
            <goals>
              <goal>client-jar</goal>
            </goals>
            <phase>generate-sources</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <!-- Create the Full JOnAS assembly -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <!-- Shared configuration for all executions -->
          <descriptors>
            <descriptor>src/main/assembly/assembly.xml</descriptor>
          </descriptors>
          <!-- Compatibility with older mvn-asmb-plg versions: append .dir to the directory name -->
          <ignoreDirFormatExtensions>false</ignoreDirFormatExtensions>
        </configuration>
      </plugin>

      <plugin>
        <!-- The plugin execution is copied from micro profiles but cannot be shared
             because the plugin is marked inherited=false :-( -->
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>move-osgi-configuration</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <copy toDir="${project.build.directory}/configuration-resources/conf/osgi">
                  <fileset dir="${project.build.directory}/osgi-conf-resources">
                    <include name="**/*.properties" />
                  </fileset>
                  <flattenmapper />
                </copy>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

</project>
