<?xml version="1.0" encoding="UTF-8"?>
<!-- 
/* 
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 
* 
* Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
* 
* The contents of this file are subject to the terms of either the GNU 
* General Public License Version 2 only ("GPL") or the Common Development 
* and Distribution License("CDDL") (collectively, the "License").  You 
* may not use this file except in compliance with the License. You can obtain 
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html 
* or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific 
* language governing permissions and limitations under the License. 
* 
* When distributing the software, include this License Header Notice in each 
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. 
* Sun designates this particular file as subject to the "Classpath" exception 
* as provided by Sun in the GPL Version 2 section of the License file that 
* accompanied this code.  If applicable, add the following below the License 
* Header, with the fields enclosed by brackets [] replaced by your own 
* identifying information: "Portions Copyrighted [year] 
* [name of copyright owner]" 
* 
* Contributor(s): 
* 
* If you wish your version of this file to be governed by only the CDDL or 
* only the GPL Version 2, indicate your decision by adding "[Contributor] 
* elects to include this software in this distribution under the [CDDL or GPL 
* Version 2] license."  If you don't indicate a single choice of license, a 
* recipient has the option to distribute your version of this file under 
* either the CDDL, the GPL Version 2 or to extend the choice of license to 
* its licensees as provided above.  However, if you add GPL Version 2 code 
* and therefore, elected the GPL Version 2 license, then the option applies 
* only if the new code is made subject to such option by the copyright 
* holder. 
*/ 
-->
<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.glassfish.appclient</groupId>
        <artifactId>client</artifactId>
        <version>3.0-b74b</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>gf-client-module</artifactId>
    <packaging>hk2-jar</packaging> <!-- the main artifact is the OSGi module JAR -->
    <name>Client OSGi module (including ACC)</name>
    
    <!--
        This module creates the app client container in three artifacts:
            1. OSGi module for the ACC
            2. stand-alone ACC JAR, suitable for running using java -jar ...
            3. bundle suitable for distribution to remote clients.

        Java programs that want to use the embeddable ACC would place the stand-
        alone ACC JAR on their class paths.  OSGi modules that use the embeddable
        ACC could simply declare a dependency on the ACC OSGi module.

        The zip bundle contains the stand-alone ACC JAR and all other JARs on
        which it depends.  End-users or administrators could copy this bundle
        to remote clients and expand it, resulting in a single self-contained
        directory which would contain all the required JARs.
    -->

    <properties>
        <extracted-dtd-root>temp</extracted-dtd-root>
        <extracted-dtd-top-level-directory>${extracted-dtd-root}/glassfish</extracted-dtd-top-level-directory>
        <extracted-dtd-directory>${extracted-dtd-top-level-directory}/lib/dtds</extracted-dtd-directory>
        <config-dtd-file>sun-application-client-container_1_2.dtd</config-dtd-file>

        <acc.corba-version>3.0.0-b001</acc.corba-version>

        <standalone.classifier>lib</standalone.classifier>
        <acc.osgi.module.classifier>module</acc.osgi.module.classifier>
<!--
        <config-xsd-dir>src/main/resources</config-xsd-dir>
        <config-xsd-file>sun-application-client-container_1_2.xsd</config-xsd-file>
-->
    </properties>

    <developers>
      <developer>
            <id>tjquinn</id>
            <name>Tim Quinn</name>
            <url>http://blogs.sun.com/quinn</url>
            <organization>Sun Microsystems, Inc.</organization>
            <roles>
		        <role>lead</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <!--
                The next resource definition will include the DTDs and
                schemas in the module so we can find them at runtime in the
                client.  The dependency:unpack-dependency goal below will
                by default deposit the unpacked contents into
                target/dependency.  The .dtd and .xsd files are packaged into
                their respective JARs in glassfish/lib, so we define that
                combined directory as a resource
                location so the .dtd and .xsd files will be packaged by default.
                This is coordinated with the SaxParserHandlerBundled class
                which resolves entities via the class path.
            -->
            <resource>
                <directory>target/dependency/glassfish/lib/</directory>
                <includes>
                    <include>**/*.dtd</include>
                    <include>**/*.xsd</include>
                </includes>
            </resource>
        </resources>

        <plugins>

            <!--
                Unpack the modules which contain the DTDs and schemas so
                we can package them as resources.
            -->
            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                   <execution>
                     <id>unpack-dtds-and-schemas</id>
                     <phase>generate-resources</phase>
                     <goals>
                       <goal>unpack-dependencies</goal>
                     </goals>
                     <configuration>
                       <includeGroupIds>org.glassfish.deployment</includeGroupIds>
                       <includeArtifactIds>schemas,dtds</includeArtifactIds>
                       <includes>**/*.dtd,**/*.xsd</includes>
                     </configuration>
                   </execution>
                 </executions>
            </plugin>
            <plugin>

<!--
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
-->

                <groupId>com.sun.enterprise</groupId>
                <artifactId>hk2-maven-plugin</artifactId>
<!--

                <version>2.2</version>
    -->
<!--
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven</groupId>
                        <artifactId>maven-archiver</artifactId>

                        <version>2.4</version>
                    </dependency>
                </dependencies>
-->
<!--                <executions>
                    <execution>
                        <id>build-stand-alone-JAR</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
-->
                    <configuration>

                            <archive>

                                <manifest>
                                    <mainClass>org.glassfish.appclient.client.acc.AppClientCommand</mainClass>
<!--
                                    <packageName>org.glassfish.appclient.client.acc</packageName>
-->
<!--
                                    <addClasspath>true</addClasspath>
-->

    <!-- This is avl in archiver plug-in 2.4 only; it doesn't seem to work -->
    <!--
                                    <classpathLayoutType>custom</classpathLayoutType>
                                    <customClasspathLayout>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</customClasspathLayout>
    -->
                                </manifest>
                                <!--
                                    It's discouraging to have to specify the class path
                                    manually.  Ideally the plug-in would do this
                                    for us, but the jar plug-in uses the name
                                    of the modules including the version strings;
                                    when the GlassFish modules are packaged into
                                    the distributions the version strings are
                                    stripped off. 
                                -->
<!--
                                <manifestEntries>
                                    <Class-Path>hk2.jar common-util.jar security.jar container-common.jar dol.jar glassfish-api.jar webservices.security.jar web-naming.jar glassfish-corba-orb.jar</Class-Path>
                                </manifestEntries>
-->
                            </archive>
                        </configuration>
<!--
                    </execution>
                </executions>
-->
            </plugin>
            <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-dependency-plugin</artifactId>
                   <executions>
                       <execution>
                           <id>unpack</id>
                           <phase>process-classes</phase>
                           <goals>
                             <goal>unpack</goal>
                           </goals>
                           <configuration>
                               <artifactItems>
                                   <artifactItem>
                                       <groupId>org.glassfish.docs.man</groupId>
                                       <artifactId>appclient-client-acc-manpage</artifactId>
                                       <version>${v3-docs.version}</version>
                                       <type>jar</type>
                                       <overWrite>true</overWrite>
                                       <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                                       <excludes>META-INF/**</excludes>
                                   </artifactItem>
                                </artifactItems>
                           </configuration>
                      </execution>
                   </executions>
           </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
                <groupId>com.sun.enterprise</groupId>
                <artifactId>hk2</artifactId>
        </dependency>
<!--
	    <dependency>
            <groupId>org.glassfish.common</groupId>
            <artifactId>glassfish-api</artifactId>
            <version>${project.version}</version>
        </dependency>
-->
        
<!--
        <dependency>
            <groupId>com.sun.enterprise</groupId>
            <artifactId>hk2-core</artifactId>
        </dependency>
-->

        <!--
            required for annotation processing support
        -->
        <dependency>
            <groupId>org.glassfish.common</groupId>
            <artifactId>common-util</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.security</groupId>
            <artifactId>security</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.ejb</groupId>
            <artifactId>ejb-container</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!--
            We depend on the deployment/dtds module which contains the
            sun-application-client-container_1_2.dtd.  We use that for
            generating JAXB classes.  We depend on both the DTDs and
            the schemas at runtime.
        -->
        <dependency>
            <scope>compile</scope>
            <groupId>org.glassfish.deployment</groupId>
            <artifactId>dtds</artifactId>
            <type>zip</type>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <scope>runtime</scope>
            <groupId>org.glassfish.deployment</groupId>
            <artifactId>schemas</artifactId>
            <type>zip</type>
            <version>${project.version}</version>
        </dependency>


        <!-- required for InjectionManager -->
        <dependency>
            <groupId>org.glassfish.common</groupId>
            <artifactId>container-common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!--
            Required for AnnotationDetector, AnnotationScanner, PersistenceUnitDescriptor
        -->
        <dependency>
            <groupId>org.glassfish.deployment</groupId>
            <artifactId>dol</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!--
            Required for security.
        -->
        <dependency>
            <groupId>org.glassfish.security</groupId>
            <artifactId>appclient.security</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!--
            Required for ClientNamingConfigurator
        -->
        <dependency>
            <groupId>org.glassfish.common</groupId>
            <artifactId>glassfish-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- required for ClientPipeCloser -->
        <dependency>
            <groupId>org.glassfish.security</groupId>
            <artifactId>webservices.security</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- required for DirContextURLStreamHandler and its factory -->
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>web-naming</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.common</groupId>
            <artifactId>glassfish-naming</artifactId>
            <version>${project.version}</version>
        </dependency>
        
	 <dependency>
            <groupId>org.glassfish.connectors</groupId>
            <artifactId>work-management</artifactId>
            <version>${project.version}</version>
        </dependency>

 	<dependency>
            <groupId>org.glassfish.connectors</groupId>
            <artifactId>connectors-inbound-runtime</artifactId>
            <version>${project.version}</version>
        </dependency>

        
        <dependency>
            <groupId>org.glassfish.orb</groupId>
            <artifactId>orb-connector</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!--
            Ken C. reports that eight ORB-related modules are needed, but
            the one "orb" module directly or indirectly depends on the others
            so I have just included it here.
        -->
        <dependency>
            <groupId>com.sun.corba</groupId>
            <artifactId>glassfish-corba-orb</artifactId>
            <version>${acc.corba-version}</version>
        </dependency>

        <dependency>
            <scope>runtime</scope>
            <groupId>org.glassfish.orb</groupId>
            <artifactId>orb-iiop</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.core</groupId>
            <artifactId>glassfish</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.appclient</groupId>
            <artifactId>acc-config</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.admin</groupId>
            <artifactId>config-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.external</groupId>
            <artifactId>asm-all-repackaged</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.ejb</groupId>
            <artifactId>ejb-container</artifactId>
            <version>${project.version}</version>
        </dependency>

<!--
<dependency>
            <groupId>org.glassfish.deployment</groupId>
            <artifactId>deployment-common</artifactId>
            <version>${project.version}</version>
        </dependency>
       <dependency>
            <groupId>org.glassfish.core</groupId>
            <artifactId>kernel</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.deployment</groupId>
            <artifactId>deployment-admin</artifactId>
            <version>${project.version}</version>
        </dependency>
-->
     <dependency>
         <groupId>org.glassfish.transaction</groupId>
         <artifactId>jts</artifactId>
         <version>${project.version}</version>
     </dependency>

     <dependency>
         <scope>runtime</scope>
         <groupId>org.glassfish.jms</groupId>
         <artifactId>jms-core</artifactId>
         <version>${project.version}</version>
     </dependency>

     <dependency>
         <scope>runtime</scope>
         <groupId>org.glassfish</groupId>
         <artifactId>javax.jms</artifactId>
         <version>${project.version}</version>
     </dependency>

     <!-- for EclipseLink support -->
     <dependency>
         <type>pom</type>
         <scope>runtime</scope>
         <groupId>org.glassfish.persistence</groupId>
         <artifactId>eclipselink-wrapper</artifactId>
         <version>${project.version}</version>
     </dependency>

     <dependency>
         <groupId>org.glassfish.persistence</groupId>
         <artifactId>jpa-connector</artifactId>
         <version>${project.version}</version>
     </dependency>

     <dependency>
         <scope>runtime</scope>
         <groupId>org.glassfish.persistence.cmp</groupId>
         <artifactId>cmp-internal-api</artifactId>
         <version>${project.version}</version>
     </dependency>

     <!-- explicit dependencies for endorsed JARs the ACC needs -->

     <!-- endorsed: javax.annotation.jar -->
     <dependency>
         <groupId>org.glassfish</groupId>
         <artifactId>javax.annotation</artifactId>
         <version>${project.version}</version>
     </dependency>

     <!-- endorsed: jaxb-api-osgi.jar -->
     <dependency>
         <groupId>javax.xml.bind</groupId>
         <artifactId>jaxb-api-osgi</artifactId>
     </dependency>

     <!-- endorsed: webservices-api-osgi.jar -->
     <dependency>
        <groupId>javax.xml</groupId>
        <artifactId>webservices-api-osgi</artifactId>
     </dependency>

     <!-- end of endorsed JAR dependencies -->

   </dependencies>
</project>
