1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?xml version="1.0"?>
- <!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <project name="fatjar" default="jar">
- <import file="../build-contrib.xml"/>
- <target name="setjarname">
- <property name="jarname"
- value="${build.dir}/zookeeper-${version}-${name}.jar"/>
- </target>
- <!-- Override jar target to specify main class -->
- <target name="jar" depends="checkMainCompiled, setjarname, compile">
- <echo message="contrib: ${name}"/>
- <jar jarfile="${jarname}">
- <manifest>
- <attribute name="Main-Class" value="org.apache.zookeeper.util.FatJarMain" />
- <attribute name="Built-By" value="${user.name}"/>
- <attribute name="Built-At" value="${build.time}"/>
- <attribute name="Built-On" value="${host.name}" />
- <attribute name="Implementation-Title" value="org.apache.zookeeper"/>
- <attribute name="Implementation-Version" value="${revision}"/>
- <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
- </manifest>
- <fileset file="${basedir}/src/main/resources/mainClasses" />
- <fileset dir="${build.classes}"/>
- <fileset dir="${build.test}"/>
- <fileset file="${zk.root}/LICENSE.txt" />
- <fileset file="${zk.root}/conf/log4j.properties" />
- <fileset dir="${zk.root}/build/classes" excludes="**/.generated"/>
- <fileset dir="${zk.root}/build/test/classes"/>
- <zipgroupfileset dir="${zk.root}/build/lib" includes="*.jar" />
- <zipgroupfileset dir="${zk.root}/build/test/lib" includes="*.jar" />
- <zipgroupfileset dir="${zk.root}/zookeeper-server/src/main/resources/lib" includes="*.jar" />
- </jar>
- </target>
- <target name="package" depends="jar, zookeeperbuildcontrib.package"
- unless="skip.contrib">
- <copy file="${basedir}/build.xml" todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}"/>
- <mkdir dir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/conf"/>
- <copy todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/conf">
- <fileset dir="${basedir}/src/main/resources"/>
- </copy>
- <mkdir dir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/src"/>
- <copy todir="${dist.dir}/zookeeper-contrib/zookeeper-contrib-${name}/src">
- <fileset dir="${basedir}/src"/>
- </copy>
- </target>
- <target name="test">
- <echo message="No test target defined for this package" />
- </target>
- </project>
|