buildOtimizadoLinux.xml 13.3 KB
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="make" name="projeto_gcom">

	<property file="build_linux.properties" />

	<property name="dest" value="bin" />
	<property name="descriptors" value="descriptors" />
	<property name="Generated.Source" value="${dest}/Temporary_Files" />
	<property name="nomeEAR" value="${JBossApplicationServer.3x.deploy}/gsan.ear" />
	<property name="nomeWAR" value="${JBossApplicationServer.3x.deploy}/gsan.ear/gsan.war" />
	<property name="JBossApplicationServer.3x.Client.home" value="${JBossApplicationServer.3x.home}/client" />
	<property name="Struts.home" value="lib/Struts1.1" />
	<property name="Servlet.home" value="lib/Servlet" />
	<property name="Hibernate3.home" value="lib/hibernate-3.0" />
	<property name="MenuTagLib.home" value="lib/MenuTagLib" />
	<property name="JasperReports.home" value="lib/JasperReports 1.2.2" />
	<property name="JAF.home" value="lib/JAF" />
	<property name="JavaMail.home" value="lib/Javamail" />
	<property name="PostGreSQL7.4.home" value="lib/DriverPostGres/7.4" />
	<property name="Properties.home" value="src/gsan" />
	<property name="PagerTagLib.home" value="lib/PagerTagLib" />
	<property name="JSTL.home" value="lib/JSTL 1.1" />
	<property name="Quartz.home" value="lib/quartz-1.5.2" />
	<property name="JavaHelp.home" value="lib/help" />
	<property name="mapsforge.home" value="lib/mapsforge" />
	<property name="src" value="src" />
	<path id="project.class.path">
		<pathelement location="${dest}" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-common-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-system-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/getopt.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/log4j.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-j2ee.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jnp-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-transaction-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jmx-rmi-connector-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jmx-ejb-connector-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jmx-connector-client-factory.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jmx-invoker-adaptor-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/concurrent.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/gnu-regexp.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-jaas.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jbosssx-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jsse.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jnet.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jcert.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jbossmq-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jbosscx-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jbossha-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jbossjmx-ant.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-net-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/xdoclet-module-jboss-net.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-iiop-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jacorb.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jboss-jsr77-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.Client.home}/jbossall-client.jar" />
		<pathelement location="${JBossApplicationServer.3x.home}/lib/jasper-runtime.jar" />
		<pathelement location="${JBossApplicationServer.3x.home}/lib/jasper-compiler.jar" />
		<pathelement location="${Struts.home}/commons-fileupload.jar" />
		<pathelement location="${Struts.home}/commons-beanutils.jar" />
		<pathelement location="${Struts.home}/struts-legacy.jar" />
		<pathelement location="${Struts.home}/jakarta-oro.jar" />
		<pathelement location="${Struts.home}/commons-digester.jar" />
		<pathelement location="${Struts.home}/commons-validator.jar" />
		<pathelement location="${Struts.home}/commons-collections.jar" />
		<pathelement location="${Struts.home}/commons-lang.jar" />
		<pathelement location="${Struts.home}/struts.jar" />
		<pathelement location="${Struts.home}/commons-logging.jar" />
		<pathelement location="${Servlet.home}/commons-el.jar" />
		<pathelement location="${Servlet.home}/jsp-api.jar" />
		<pathelement location="${Servlet.home}/servlet-api.jar" />
		<pathelement location="${Servlet.home}/servlets-common.jar" />
		<pathelement location="${Hibernate3.home}/asm-attrs.jar" />
		<pathelement location="${Hibernate3.home}/connector.jar" />
		<pathelement location="${Hibernate3.home}/ant-launcher-1.6.3.jar" />
		<pathelement location="${Hibernate3.home}/jboss-cache.jar" />
		<pathelement location="${Hibernate3.home}/ehcache-1.1.jar" />
		<pathelement location="${Hibernate3.home}/jaxen-1.1-beta-4.jar" />
		<pathelement location="${Hibernate3.home}/xml-apis.jar" />
		<pathelement location="${Hibernate3.home}/asm.jar" />
		<pathelement location="${Hibernate3.home}/oscache-2.1.jar" />
		<pathelement location="${Hibernate3.home}/jgroups-2.2.7.jar" />
		<pathelement location="${Hibernate3.home}/jdbc2_0-stdext.jar" />
		<pathelement location="${Hibernate3.home}/junit-3.8.1.jar" />
		<pathelement location="${Hibernate3.home}/ant-1.6.3.jar" />
		<pathelement location="${Hibernate3.home}/xerces-2.6.2.jar" />
		<pathelement location="${Hibernate3.home}/commons-logging-1.0.4.jar" />
		<pathelement location="${Hibernate3.home}/commons-collections-2.1.1.jar" />
		<pathelement location="${Hibernate3.home}/cleanimports.jar" />
		<pathelement location="${Hibernate3.home}/dom4j-1.6.jar" />
		<pathelement location="${Hibernate3.home}/ant-junit-1.6.3.jar" />
		<pathelement location="${Hibernate3.home}/hibernate3.jar" />
		<pathelement location="${Hibernate3.home}/concurrent-1.3.2.jar" />
		<pathelement location="${Hibernate3.home}/log4j-1.2.9.jar" />
		<pathelement location="${Hibernate3.home}/jacc-1_0-fr.jar" />
		<pathelement location="${Hibernate3.home}/antlr-2.7.5H3.jar" />
		<pathelement location="${Hibernate3.home}/ant-swing-1.6.3.jar" />
		<pathelement location="${Hibernate3.home}/c3p0-0.8.5.2.jar" />
		<pathelement location="${Hibernate3.home}/jboss-system.jar" />
		<pathelement location="${Hibernate3.home}/cglib-2.1.jar" />
		<pathelement location="${Hibernate3.home}/jboss-common.jar" />
		<pathelement location="${Hibernate3.home}/versioncheck.jar" />
		<pathelement location="${Hibernate3.home}/swarmcache-1.0rc2.jar" />
		<pathelement location="${Hibernate3.home}/jta.jar" />
		<pathelement location="${Hibernate3.home}/jboss-jmx.jar" />
		<pathelement location="${Hibernate3.home}/ant-antlr-1.6.3.jar" />
		<pathelement location="${Hibernate3.home}/jaas.jar" />
		<pathelement location="${Hibernate3.home}/proxool-0.8.3.jar" />
		<pathelement location="${JasperReports.home}/itext-1.01.jar" />
		<pathelement location="${JasperReports.home}/jasperreports-1.2.2.jar" />
		<pathelement location="${Properties.home}/properties" />
		<pathelement location="${PagerTagLib.home}/pager-taglib.jar" />
		<pathelement location="${JAF.home}/activation.jar" />
		<pathelement location="${JavaMail.home}/mail.jar" />
		<pathelement location="/reports" />

	</path>
	<target depends="init" name="javacompile">
		<javac classpathref="project.class.path" debug="true" deprecation="true" destdir="${dest}" nowarn="true" encoding="ISO-8859-1" >
			<src path="${src}" />
		</javac>
	</target>

	<target name="ejb">

		<ejbjar dependency="none" srcdir="${dest}" descriptordir="${descriptors}/" naming="ejb-name">

			<!--	
			<support dir="${dest}">
				<include name="**/*.xml" />
				<include name="**/*.properties" />
				<include name="**/*.jasper" />
			</support>

			<support dir="lib/CodigoBarras">
				<include name="CodigoBarra.jar" />
			</support>
			
			<support dir="${Quartz.home}">
				<include name="*.jar" />
			</support>
		-->

			<dtd publicid="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" location="${JBossApplicationServer.3x.home}/docs/dtd/ejb-jar_2_0.dtd" />
			<dtd publicid="-//JBoss//DTD JBOSS 4.0//EN" location="${JBossApplicationServer.3x.home}/docs/dtd/jboss_4_0.dtd" />

			<jboss destdir="${JBossApplicationServer.3x.deploy}/gsan.ear">
			</jboss>
		</ejbjar>

		<delete file="${JBossApplicationServer.3x.deploy}/gsan.ear/null.jar" />

	</target>
	<!--	<target name="cleanup">
		<delete failonerror="false" includeemptydirs="true">
			<fileset dir="${dest}">
				<include name="**/*.*" />
			</fileset>
		</delete>
	</target>
	-->

	<target depends="resource" name="war">
		<mkdir dir="${nomeWAR}/META-INF" />
		<mkdir dir="${nomeWAR}/WEB-INF" />
		<mkdir dir="${nomeWAR}/WEB-INF/classes" />
		<mkdir dir="${nomeWAR}/WEB-INF/lib" />

		<copy todir="${nomeWAR}">
			<fileset dir="gsan">
				<include name="**/*" />
				<exclude name="html" />
			</fileset>
		</copy>
		<!--<copy todir="${nomeWAR}/META-INF">
			<fileset dir="/home/ras/implantacao/CVSROOT/Gcom/">
				<include name="MANIFEST.MF"/>
			</fileset>
		</copy>-->
		<copy todir="${nomeWAR}/WEB-INF/classes">
		<!--	<fileset dir="${dest}">
				<include name="gsan/**/*.*" />
			</fileset>-->
			<fileset dir="src/gsan/properties">
				<include name="*.properties" />
			</fileset>
			<fileset dir="reports">
				<include name="*.jasper" />
			</fileset>
		</copy>
		
		<copy todir="${nomeWAR}/WEB-INF/lib">
			<fileset dir="${Struts.home}">
				<include name="*.jar" />
			</fileset>
			<fileset dir="${JAF.home}">
				<include name="activation.jar" />
			</fileset>
			<fileset dir="${JavaMail.home}">
				<include name="mail.jar" />
			</fileset>
			<fileset dir="${PagerTagLib.home}">
				<include name="pager-taglib.jar" />
			</fileset>
			<fileset dir="${JasperReports.home}">
				<include name="*.jar" />
			</fileset>
			<fileset dir="${JSTL.home}">
				<include name="*.jar" />
			</fileset>
			<fileset dir="${Quartz.home}">
				<include name="*.jar" />
			</fileset>
			<fileset dir="${JavaHelp.home}">
				<include name="*.jar" />
			</fileset>
			<fileset dir="${mapsforge.home}">
				<include name="*.jar" />
			</fileset>
		</copy>

		<jar compress="false" update="false" destfile="gsan.jar">
			<fileset dir="${dest}">
				<include name="**/*.xml" />
				<include name="**/*.properties" />
				<include name="**/*.jasper" />
				<include name="**/*.class" />
			</fileset>

			<fileset dir="lib/CodigoBarras">
				<include name="CodigoBarra.jar" />
			</fileset>

			<fileset dir="${Quartz.home}">
				<include name="*.jar" />
			</fileset>
		</jar>

	</target>


	<target name="jasperReports" description="Compilar os Relatórios">


		<taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask">
			<classpath>
				<fileset dir="${JasperReports.home}">
					<include name="*.jar" />
				</fileset>
			</classpath>
		</taskdef>

		<jrc srcdir="${CaminhoReports}" destdir="${CaminhoReports}" tempdir="${CaminhoReports}" keepjava="false" xmlvalidation="false">
			<classpath>
				<fileset dir="${JasperReports.home}">
					<include name="*.jar" />
				</fileset>
			</classpath>
		</jrc>
	</target>


	<target depends="resource,war,ejb" name="ear">
		<mkdir dir="${nomeEAR}/META-INF" />
		<copy todir="${nomeEAR}/META-INF">
			<fileset dir="META-INF">
				<include name="application.xml" />
			</fileset>
		</copy>
		<copy todir="${nomeEAR}">
			<fileset dir=".">
				<include name="gsan.jar" />
			</fileset>
		</copy>
		
		
	</target>

	<target name="resource">
		<copy todir="${dest}">
			<fileset dir="${src}">
				<include name="**/*.au" />
				<include name="**/*.midi" />
				<include name="**/*.gif" />
				<include name="**/*.xml" />
				<include name="**/*.properties" />
				<include name="**/*.aiff" />
				<include name="**/*.jpe" />
				<include name="**/*.jpeg" />
				<include name="**/*.rmf" />
				<include name="**/*.wav" />
				<include name="**/*.mid" />
				<include name="**/*.png" />
				<include name="**/*.jpg" />
				<include name="**/*.swf" />
				<include name="**/*.jasper" />
			</fileset>
		</copy>
	</target>

	<target name="clean">
		<delete dir="${JBossApplicationServer.3x.deploy}/gsan.ear" />
	</target>

	<target name="update-ear">
		<touch file="${JBossApplicationServer.3x.deploy}/gsan.ear/META-INF/application.xml" />
	</target>


	<target name="compile" />
	<!--depends="javacompile"-->
	<target depends="jasperReports, war, resource, ejb, ear, update-ear" name="package" />
	<target depends="compile,package" name="make" />
	<target depends="clean,make" name="rebuild" />
	<target depends="war, resource" name="update-jsp" />

	<target name="init">
	</target>
</project>