alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Glassfish example source code file (pom.xml)

This example Glassfish source code file (pom.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Glassfish tags/keywords

acc, acc, cddl, copyright, gpl, gpl, jar, jars, license, license, osgi, the, version, version

The Glassfish pom.xml source code

<?xml version="1.0" encoding="UTF-8"?>
<!--

    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright (c) 1997-2010 Oracle and/or its affiliates. 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_1_1.html
    or packager/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 packager/legal/LICENSE.txt.

    GPL Classpath Exception:
    Oracle designates this particular file as subject to the "Classpath"
    exception as provided by Oracle in the GPL Version 2 section of the License
    file that accompanied this code.

    Modifications:
    If applicable, add the following below the License Header, with the fields
    enclosed by brackets [] replaced by your own identifying information:
    "Portions Copyright [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
        <artifactId>client
        <version>3.1
    </parent>
    <modelVersion>4.0.0
    <artifactId>gf-client-module
    <packaging>hk2-jar 
    <name>Client OSGi module (including ACC)
    
    <!--
        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-top-level-directory>${extracted-dtd-root}/glassfish
        <extracted-dtd-directory>${extracted-dtd-top-level-directory}/lib/dtds
        <config-dtd-file>sun-application-client-container_1_2.dtd

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

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

    <build>
        <resources>
            <resource>
                <directory>src/main/resources
            </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/
                <includes>
                    <include>**/*.dtd
                    <include>**/*.xsd
                </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
                 <artifactId>maven-dependency-plugin
                 <executions>
                   <execution>
                     <id>unpack-dtds-and-schemas
                     <phase>generate-resources
                     <goals>
                       <goal>unpack-dependencies
                     </goals>
                     <configuration>
                       <includeGroupIds>org.glassfish.deployment
                       <includeArtifactIds>schemas,dtds
                       <includes>**/*.dtd,**/*.xsd
                     </configuration>
                   </execution>
                       <execution>
                           <id>unpack
                           <phase>process-classes
                           <goals>
                             <goal>unpack
                           </goals>
                           <configuration>
                               <artifactItems>
                                   <artifactItem>
                                       <groupId>org.glassfish.docs.man
                                       <artifactId>appclient-client-acc-manpage
                                       <version>${v3-docs.version}
                                       <type>jar
                                       <overWrite>true
                                       <outputDirectory>${project.build.outputDirectory}
                                       <excludes>META-INF/**
                                   </artifactItem>
                                </artifactItems>
                           </configuration>
                        </execution>
                  </executions>
            </plugin>
            <plugin>
                <groupId>com.sun.enterprise
                <artifactId>hk2-maven-plugin
                    <configuration>

                            <archive>

                                <manifest>
                                    <mainClass>org.glassfish.appclient.client.acc.AppClientCommand
                                </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. 
                                -->
                            </archive>
                        </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
                <groupId>com.sun.enterprise
                <artifactId>hk2
        </dependency>
        
        <!--
            required for annotation processing support
        -->
        <dependency>
            <groupId>org.glassfish.common
            <artifactId>common-util
            <version>${project.version}
        </dependency>

        <dependency>
            <groupId>org.glassfish.ejb
            <artifactId>ejb-container
            <version>${project.version}
        </dependency>
        <!--
            We depend on the deployment/dtds and deployment/schemas modules
            but only at build-time.  We extract the DTD and schema files and
            add them to the module JAR so they will be accessible at tuntime
            on the class path.  Because we don't really rely on the zip files
            at runtime, we use scope "provided" for the dependencies.
        -->
        <dependency>
            <scope>provided
            <groupId>org.glassfish.deployment
            <artifactId>dtds
            <type>zip
            <version>${project.version}
        </dependency>

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


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

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

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

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

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

        
        <dependency>
            <groupId>org.glassfish.orb
            <artifactId>orb-connector
            <version>${project.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
            <artifactId>glassfish-corba-orb
        </dependency>

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

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

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

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

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

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

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

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

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

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

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

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

     <dependency>
         <groupId>com.sun.xml.bind
         <artifactId>jaxb-osgi
     </dependency>

     <!-- endorsed: webservices-api-osgi.jar -->
     <dependency>
        <groupId>org.glassfish.metro
        <artifactId>webservices-api-osgi
     </dependency>

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

   </dependencies>
</project>

Other Glassfish examples (source code examples)

Here is a short list of links related to this Glassfish pom.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.