From Ant to Maven - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Пользователи Календарь Все разделы прочитаны
Вернуться   Форум администраторов игровых серверов > MMO > Lineage II > Тех-документация

Тех-документация Статьи по редактированию, компиляции и настройки ява серверов Lineage 2
Описание темы:Переход

Ответ
Опции темы
Непрочитано 23.12.2019, 23:49   #1
Пользователь

Автор темы (Топик Стартер) From Ant to Maven

Ребят сори за офтоп. Хотел спросить, у меня есть сборка L2Universe исходники. Она билдается с помощью Ant xml скрипта.
Код HTML:
<?xml version="1.0" encoding="UTF-8"?>
<project name="DataPack" default="dist" basedir=".">
	<description>
		This script will build the L2jInfinity DataPack.

		This program is free software; you can redistribute it and/or modify
		it under the terms of the GNU General Public License as published by
		the Free Software Foundation; either version 3, or (at your option)
		any later version.

		This program is distributed in the hope that it will be useful,
		but WITHOUT ANY WARRANTY; without even the implied warranty of
		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
		GNU General Public License for more details.

		You should have received a copy of the GNU General Public License
		along with this program; if not, write to the Free Software
		Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
		02111-1307, USA.

		http://www.gnu.org/copyleft/gpl.html
	</description>

	<property name="build" location="../builds/datapack" />
	<property name="build.dist" location="${build}/dist" />
	<property name="build.dist.game" location="${build.dist}/gameserver" />
	<property name="build.dist.lang" location="${build.dist}/languages" />
	<property name="build.dist.login" location="${build.dist}/login" />
	<property name="build.dist.cb" location="${build.dist}/community" />
	<property name="build.dist.sql" location="${build.dist}/sql" />
	<property name="build.dist.cb_sql" location="${build.dist}/cb_sql" />
	<property name="build.dist.tools" location="${build.dist}/tools" />
	<property name="build.dist.doc" location="${build.dist}/doc" />
	<property name="properties-file" location="${build.dist.game}/config/l2universedp-version.properties" />

	<target name="init" description="Create the output directories. Do nothing if dirs were already created">
		<mkdir dir="${build}" />
		<mkdir dir="${build.dist}" />
		<mkdir dir="${build.dist.cb}" />
		<mkdir dir="${build.dist.cb_sql}" />
		<mkdir dir="${build.dist.game}" />
		<mkdir dir="${build.dist.doc}" />
		<mkdir dir="${build.dist.lang}" />
		<mkdir dir="${build.dist.login}" />
		<mkdir dir="${build.dist.sql}" />
		<mkdir dir="${build.dist.tools}" />
	</target>

	<target name="export" description="Syncronizes build space contents with project.">
		<sync todir="${build.dist.doc}">
			<fileset dir="${basedir}">
				<include name="gpl.txt" />
				<include name="readme-dp.txt" />
			</fileset>
		</sync>
		<sync todir="${build.dist.game}/data" includeemptydirs="true">
			<fileset dir="${basedir}/data">
				<exclude name=".project" />
				<exclude name="log/**" />
				<exclude name="cachedir/**" />
				<exclude name="clans/**" />
				<exclude name="crests/**" />
				<exclude name="**.svn**" />
				<exclude name="**/*.class" />
				<exclude name="**/*.jar" />
				<exclude name="geodata/**" />
				<exclude name="pathnode/**" />
			</fileset>
		</sync>
		<sync todir="${build.dist.cb}/data">
			<fileset dir="${basedir}/cb_data" />
		</sync>
		<sync todir="${build.dist.cb_sql}">
			<fileset dir="${basedir}/cb_sql" />
		</sync>
		<sync todir="${build.dist.sql}">
			<fileset dir="${basedir}/sql" />
		</sync>
		<sync todir="${build.dist.tools}">
			<fileset dir="${basedir}/tools">
				<exclude name="database_installer.rc" />
				<exclude name="*.txt" />
				<exclude name="*.log" />
				<exclude name="*backup.sql" />
			</fileset>
		</sync>
		<sync todir="${build.dist.lang}">
			<fileset dir="${basedir}/data/lang" />
		</sync>
		<sync todir="${build.dist.login}">
			<fileset dir="${build.dist.game}/data">
				<include name="servername.xml" />
			</fileset>
		</sync>
	</target>

	<target name="dist" depends="distclean" description="Creates a ZIP file. Suitable for distribution but building takes longer. See dist-deflate for faster builds.">
		<zip destfile="${build}/DataPack.zip" basedir="${build.dist}" update="true" />
	</target>

	<target name="dist-deflate" depends="distclean" description="Creates a datapack ZIP file with NO compression (bigger ZIP file but faster than regular dist target)">
		<zip destfile="${build}/DataPack-nocompress.zip" basedir="${build.dist}" update="true" compress="false" />
	</target>

	<target name="clean" description="Deletes the whole build space and existing packages.">
		<delete dir="${build}" />
	</target>

	<target name="distclean" depends="export" description="Deletes the datapack distribution ZIP file only, preserving synchronized build files.">
		<delete file="${build}/DataPack.zip" />
		<delete file="${build}/DataPack-nocompress.zip" />
	</target>
</project>
Так вот вопрос, есть ли способ перевести скрипт для мейвена и билдать уже мейвеном? Может идея сама умеет такое делать?) Я знаю что есть Maven-Ant plugin. Но так виходит что у меня есть разние модули и в каждом из них по таком вот Build.xml файлу. Я не знаю как красиво сделать. Создать помку, добавить дочерние помки, и юзать скрипт во всех дочерних?
cjhrxSS вне форума Ответить с цитированием
Ответ

Метки
ant, build, maven


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 
Опции темы

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Компиляция сервера на Maven undertrey Документация 28 12.06.2011 07:09
Необходимые плагины для maven (.m2) _NEO_PK Lineage II 5 21.09.2010 01:52
Перевод с Maven'a на Ant Discos Работа со скриптами 0 15.11.2009 04:02
проблемы с maven compil laric Lineage II 3 31.08.2009 23:03


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 01:11. Часовой пояс GMT +3.

Вверх