Last active
March 10, 2019 12:23
-
-
Save ezhov-da/fce720b75c75fd649c93b07fb780f1fd to your computer and use it in GitHub Desktop.
java ant сборка проекта в netbeans для сервиса приложений
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#=================================================================================== | |
#собственные настроки для сборки проекта | |
#=================================================================================== | |
app.version=0.1 | |
config.file=config.properties | |
app.const=app.version | |
application.title=assistant_officer | |
name.zip=${application.title}_${app.version}.zip | |
<target name="-post-jar"> | |
<!-- | |
=================================== | |
здесь происходят все действия по созданию версии | |
=================================== | |
--> | |
<!--<echo> ${basedir}</echo> --> | |
<!--1. Создаем файл с версией--> | |
<echo file="${dist.dir}/${config.file}" append="true">${app.const}=${app.version}</echo> | |
<!---1. копируем пвпку с dll в dist--> | |
<copy todir="${basedir}/dist/dll"> | |
<fileset dir="${basedir}/dll"/> | |
</copy> | |
<copy file="${dist.dir}/${config.file}" tofile="${basedir}/dist/${config.file}"/> | |
<!--3. удаляем файл архива и папку для архива--> | |
<delete> | |
<fileset dir="${folder.project.build}" includes="*.zip"/> | |
</delete> | |
<delete dir="${name.folder.for.zip}"/> | |
<!--4. копируем проектные файлы в папку для архива--> | |
<copy todir="${name.folder.for.zip}"> | |
<fileset dir="${folder.project.build.dist}"/> | |
</copy> | |
<!--5. копируем другие исходники для архива--> | |
<copy todir="${name.folder.for.zip}"> | |
<fileset dir="${name.folder.dist.file}/"/> | |
</copy> | |
<!--6. cоздаем архив--> | |
<zip destfile="${name.zip}" basedir="${name.folder.for.zip}"/> | |
<!--7. удялем папку для архива--> | |
<delete dir="${name.folder.for.zip}"/> | |
</target>[/code] | |
<target name="-post-jar"> | |
<!-- | |
=================================== | |
здесь происходят все действия по созданию версии | |
=================================== | |
--> | |
<!--<echo> ${basedir}</echo> --> | |
<!--создаем файл с версией--> | |
<echo file="${dist.dir}/${config.file}" append="true">${app.const}=${app.version}</echo> | |
<!--копируем пвпку с dll в dist--> | |
<copy todir="${basedir}/dist/dll"> | |
<fileset dir="${basedir}/dll"/> | |
</copy> | |
<!--копируем файл версий--> | |
<copy file="${dist.dir}/${config.file}" tofile="${basedir}/dist/${config.file}"/> | |
<!--копируем файл запросов--> | |
<copy file="${basedir}/app_config.xml" tofile="${basedir}/dist/app_config.xml"/> | |
<!--копируем иконку--> | |
<copy file="${basedir}/phone.png" tofile="${basedir}/dist/phone.png"/> | |
<!--6. cоздаем архив--> | |
<zip destfile="${basedir}/dist/${name.zip}" basedir="${basedir}/dist"/> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment