|
Glassfish example source code file (nucleus-distributions.xml)
The Glassfish nucleus-distributions.xml source code<?xml version="1.0" encoding="iso-8859-1"?> <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright (c) 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 name="Nucleus Distribution (ips) Creation" default="create-image" basedir="."> <property name="image.name" value="nucleus"/> <property name="source.distribution.name" value="GlassFish Open Source Edition 3.1 Nucleus"/> <target name="init"> <condition property="windows"> <os family="windows" /> </condition> <condition property="unix"> <os family="unix" /> </condition> </target> <target name="create-image" depends="create-installer-image, create-glassfish-image"> <mkdir dir="${installer.image.dir}"/> <mkdir dir="${installer.image.dir}/${install.dir.name}"/> <mkdir dir="${glassfish.image.dir}"/> </target> <target name="create-installer-image" description="Creating IPS Image without Domains for Installer"> <antcall target="create-common-image"> <param name="image.dir" value="${installer.image.dir}/${install.dir.name}"/> </antcall> <antcall target="create-common-image"> <param name="image.dir" value="${installer.image.dir.l10n}/${install.dir.name}"/> </antcall> <antcall target="install-l10n-packages"> <param name="image.dir" value="${installer.image.dir.l10n}/${install.dir.name}"/> </antcall> </target> <target name="create-glassfish-image" description="Creating IPS Image with Domains"> <antcall target="create-common-image"> <param name="image.dir" value="${glassfish.image.dir}/${install.dir.name}"/> </antcall> <antcall target="create-common-image"> <param name="image.dir" value="${glassfish.image.dir.l10n}/${install.dir.name}"/> </antcall> <antcall target="install-l10n-packages"> <param name="image.dir" value="${glassfish.image.dir.l10n}/${install.dir.name}"/> </antcall> <!-- get modules required to create default domain --> <ant antfile="../distributions.xml" target="fetch-domain-creation-artifacts"> <property name="modules.dir" value="${basedir}/target/local_image/glassfish/${install.dir.name}/glassfish/modules"/> </ant> <ant antfile="../distributions.xml" target="fetch-domain-creation-artifacts"> <property name="modules.dir" value="${basedir}/target/local_image/glassfish-l10n/${install.dir.name}/glassfish/modules"/> </ant> <!-- create domain --> <echo message="image.dir: ${image.dir}"/> <echo message="user.dir: ${user.dir}"/> <echo message="basedir: ${basedir}"/> <antcall target="create-domain"/> <antcall target="create-domain-ml"/> <!-- delete modules required to create default domain; these are not bundled as part of nucleus --> <ant antfile="../distributions.xml" target="delete-domain-creation-artifacts"> <property name="modules.dir" value="${basedir}/target/local_image/glassfish/${install.dir.name}/glassfish/modules"/> </ant> <ant antfile="../distributions.xml" target="delete-domain-creation-artifacts"> <property name="modules.dir" value="${basedir}/target/local_image/glassfish-l10n/${install.dir.name}/glassfish/modules"/> </ant> </target> <target name="create-domain" depends="create-domain-on-windows, create-domain-on-unix"/> <target name="create-domain-ml" depends="create-domain-on-windows-ml, create-domain-on-unix-ml"/> <target name="create-domain-on-windows" depends="init" if="windows"> <ant antfile="../distributions.xml" target="create-domain"> <property name="exec.dir" value="${basedir}/target/local_image/glassfish/${install.dir.name}/glassfish/bin"/> <property name="exec.executable" value="${basedir}/target/local_image/glassfish/${install.dir.name}/glassfish/bin/asadmin.bat"/> </ant> </target> <target name="create-domain-on-windows-ml" depends="init" if="windows"> <ant antfile="../distributions.xml" target="create-domain"> <property name="exec.dir" value="${basedir}/target/local_image/glassfish-l10n/${install.dir.name}/glassfish/bin"/> <property name="exec.executable" value="${basedir}/target/local_image/glassfish-l10n/${install.dir.name}/glassfish/bin/asadmin.bat"/> </ant> </target> <target name="create-domain-on-unix" depends="init" if="unix"> <ant antfile="../distributions.xml" target="create-domain"> <property name="exec.dir" value="${basedir}/target/local_image/glassfish/${install.dir.name}/glassfish/bin"/> <property name="exec.executable" value="${basedir}/target/local_image/glassfish/${install.dir.name}/glassfish/bin/asadmin"/> </ant> </target> <target name="create-domain-on-unix-ml" depends="init" if="unix"> <ant antfile="../distributions.xml" target="create-domain"> <property name="exec.dir" value="${basedir}/target/local_image/glassfish-l10n/${install.dir.name}/glassfish/bin"/> <property name="exec.executable" value="${basedir}/target/local_image/glassfish-l10n/${install.dir.name}/glassfish/bin/asadmin"/> </ant> </target> <target name="create-common-image" description="Creating IPS Image"> <ant antfile="../distributions.xml" target="create-local-image"> <property name="image.dir" value="${image.dir}"/> </ant> <ant antfile="../distributions.xml" target="update-cfg-cache"> <property name="image.dir" value="${image.dir}"/> </ant> <ant antfile="../distributions.xml" target="install-package"> <property name="package.name" value="felix"/> <property name="image.dir" value="${image.dir}"/> </ant> <ant antfile="../distributions.xml" target="install-package"> <property name="package.name" value="glassfish-hk2"/> <property name="image.dir" value="${image.dir}"/> </ant> <ant antfile="../distributions.xml" target="install-package"> <property name="package.name" value="glassfish-grizzly"/> <property name="image.dir" value="${image.dir}"/> </ant> <ant antfile="../distributions.xml" target="install-package"> <property name="package.name" value="glassfish-nucleus"/> <property name="image.dir" value="${image.dir}"/> </ant> <ant antfile="../distributions.xml" target="install-package"> <property name="package.name" value="pkg-java"/> <property name="image.dir" value="${image.dir}"/> </ant> <delete file="${image.dir}/.org.opensolaris,pkg/catalog/glassfish.org/pkg_names.pkl"/> <copy file="${image.dir}/pkg/lib/pkg-bootstub.sh" tofile="${image.dir}/bin/updatetool"/> <copy file="${image.dir}/pkg/lib/pkg-bootstub.bat" tofile="${image.dir}/bin/updatetool.bat"/> <copy file="${image.dir}/pkg/lib/pkg-bootstub.sh" tofile="${image.dir}/bin/pkg"/> <copy file="${image.dir}/pkg/lib/pkg-bootstub.bat" tofile="${image.dir}/bin/pkg.bat"/> <!-- stage servicetag registry file and set source value --> <resolveArtifact artifactId="servicetag-registry" groupId="org.glassfish.registration" property="servicetag-registry.zip"/> <unzip src="${servicetag-registry.zip}" dest="${image.dir}"> <patternset> <exclude name="META-INF/**"/> </patternset> </unzip> <replace file="${image.dir}/glassfish/lib/registration/servicetag-registry.xml" token="%%%SOURCE%%%" value="${source.distribution.name}"/> <!-- stage appropriate legal content for this distribution --> <resolveArtifact artifactId="legal-fragment" groupId="org.glassfish.packager" property="legal-fragment.zip"/> <unzip src="${legal-fragment.zip}" dest="${image.dir}"> <patternset> <exclude name="META-INF/**"/> </patternset> </unzip> <!-- use web profile 3rd party licence file --> <delete file="${image.dir}/glassfish/legal/3RD-PARTY-LICENSE.txt" quiet="true" /> <move file="${image.dir}/glassfish/legal/3RD-PARTY-LICENSE-WEB-PROFILE.txt" tofile="${image.dir}/glassfish/legal/3RD-PARTY-LICENSE.txt" /> </target> <target name="install-l10n-packages" description="Installing l10n packages"> <ant antfile="../distributions.xml" target="install-package"> <property name="package.name" value="glassfish-nucleus-l10n"/> <property name="image.dir" value="${image.dir}"/> </ant> </target> </project> Other Glassfish examples (source code examples)Here is a short list of links related to this Glassfish nucleus-distributions.xml source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.