Добавлен ant task для компоновки библиотек в единый jar

This commit is contained in:
Victor 2016-01-23 18:48:35 +02:00
parent 45ef0f88bb
commit cf6f8c5fe8
2 changed files with 31 additions and 1 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
/dist/
/store/
/nbproject/private/

View File

@ -10,6 +10,34 @@
<project name="OwnLang" default="default" basedir=".">
<description>Builds, tests, and runs the project OwnLang.</description>
<import file="nbproject/build-impl.xml"/>
<target name="package-for-store" depends="jar">
<property name="store.jar.name" value="${application.title}"/>
<property name="store.dir" value="store"/>
<property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/>
<echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/>
<delete dir="${store.dir}"/>
<mkdir dir="${store.dir}"/>
<jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip">
<zipgroupfileset dir="dist" includes="*.jar"/>
<zipgroupfileset dir="dist/lib" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
<zip destfile="${store.jar}">
<zipfileset src="${store.dir}/temp_final.jar"
excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
</zip>
<delete file="${store.dir}/temp_final.jar"/>
</target>
<!--
There exist several targets which are by default empty and which can be