build.xml revision ada1678a4262b208a7b87391f520a7767d25287c
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2010-2011 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="glassfish v3, glassfish distribution creation" default="create.distribution" basedir=".">
<import file="/distributions.xml"/>
<property name="source.distribution.name" value="GlassFish Open Source Edition 3.1.2"/>
<target name="create.distribution">
<echo message="Creating distribution: glassfish"/>
<unzip dest="target/stage">
<fileset dir="target/stage">
<include name="*.zip"/>
</fileset>
</unzip>
<delete dir="target/stage" includes="*.zip"/>
<chmod file="target/stage/${install.dir.name}/bin/*" perm="ugo+rx"/>
<chmod file="target/stage/${install.dir.name}/glassfish/bin/*" perm="ugo+rx"/>
<chmod file="target/stage/${install.dir.name}/mq/bin/*" perm="ugo+rx"/>
<!-- stage servicetag registry file and set source value -->
<resolveArtifact artifactId="servicetag-registry" groupId="org.glassfish.main.registration" property="servicetag-registry.zip"/>
<unzip src="${servicetag-registry.zip}"
dest="target/stage/${install.dir.name}">
<patternset>
<exclude name="META-INF/**"/>
</patternset>
</unzip>
<replace file="target/stage/${install.dir.name}/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.main.packager" property="legal-fragment.zip"/>
<unzip src="${legal-fragment.zip}"
dest="target/stage/${install.dir.name}">
<patternset>
<exclude name="META-INF/**"/>
</patternset>
</unzip>
<!-- use full platform 3rd party licence file -->
<delete file="target/stage/${install.dir.name}/glassfish/legal/3RD-PARTY-LICENSE-WEB-PROFILE.txt" quiet="true"/>
<!-- create distribution zip-->
<zip file="target/glassfish.zip" duplicate="preserve">
<zipfileset dir="target/stage" filemode="755"
includes="${install.dir.name}/bin/*"
excludes="${install.dir.name}/bin/*.bat" />
<zipfileset dir="target/stage" filemode="755"
includes="${install.dir.name}/glassfish/bin/*"
excludes="${install.dir.name}/glassfish/bin/*.bat" />
<zipfileset dir="target/stage" filemode="755"
includes="${install.dir.name}/mq/bin/*"
excludes="${install.dir.name}/mq/bin/*.exe" />
<zipfileset dir="target/stage">
<include name="${install.dir.name}/bin/*.bat" />
</zipfileset>
<zipfileset dir="target/stage">
<include name="${install.dir.name}/glassfish/bin/*.bat" />
</zipfileset>
<zipfileset dir="target/stage">
<include name="${install.dir.name}/mq/bin/*.exe" />
</zipfileset>
<zipfileset dir="target/stage"
includes="${install.dir.name}/**">
</zipfileset>
</zip>
<!-- deploy distribution artifact to maven repository" -->
<attachArtifact file="target/glassfish.zip"/>
</target>
</project>