build.xml
changeset 11 78a8dd1eeb2b
parent 10 4e70453a027f
child 15 cfb2fc0ca242
equal deleted inserted replaced
10:4e70453a027f 11:78a8dd1eeb2b
     8 	<property name="funkce" value="${šablona}/funkce/build/classes"/>
     8 	<property name="funkce" value="${šablona}/funkce/build/classes"/>
     9 	
     9 	
    10 	<target	name="generuj" description="Vygeneruje kompletní web." depends="kompiluj-funkce,stránky,agregace">
    10 	<target	name="generuj" description="Vygeneruje kompletní web." depends="kompiluj-funkce,stránky,agregace">
    11 	</target>
    11 	</target>
    12 	
    12 	
    13 	<target name="stránky" description="Vygeneruje XHTML webové stránky.">		
    13 	<target name="stránky" description="Vygeneruje samotné XHTML webové stránky." depends="statický-obsah">		
    14 		<xslt basedir="${vstup}" destdir="${výstup}" includes="*.xml" extension=".xhtml" style="${šablona}/stránka.xsl">
    14 		<xslt basedir="${vstup}" destdir="${výstup}" includes="*.xml" extension=".xhtml" style="${šablona}/stránka.xsl">
    15 			<param name="konfigurák" expression="../${vstup}/web.conf"/>
    15 			<param name="konfigurák" expression="../${vstup}/"/>
    16 			<classpath location="/usr/share/java/saxonb-9.0.jar"/>
    16 			<classpath location="/usr/share/java/saxonb-9.0.jar"/>
    17 			<classpath location="${funkce}"/>
    17 			<classpath location="${funkce}"/>
    18 			<factory name="net.sf.saxon.TransformerFactoryImpl">
    18 			<factory name="net.sf.saxon.TransformerFactoryImpl">
    19 				<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>				
    19 				<attribute name="http://saxon.sf.net/feature/allow-external-functions" value="true"/>				
    20 			</factory>
    20 			</factory>
    21 		</xslt>
    21 		</xslt>
    22 	</target>
    22 	</target>
    23 	
    23 	
    24 	<target name="agregace" description="Vytvoří agregované výstupy: RSS, Atom, Sitemap.xml">
    24 	<target name="agregace" description="Vytvoří agregované výstupy: RSS, Atom, Sitemap.xml.">
    25 		<!-- TODO: sloučit, zjednodušit, parametrizovat -->
    25 		<!-- TODO: sloučit, zjednodušit, parametrizovat -->
    26 	
    26 	
    27 		<!-- Atom -->
    27 		<!-- Atom -->
    28 		<xslt in="${vstup}/web.conf" out="${výstup}/atom.xml" style="${šablona}/atom.xsl">
    28 		<xslt in="${vstup}/web.conf" out="${výstup}/atom.xml" style="${šablona}/atom.xsl">
    29 			<classpath location="/usr/share/java/saxonb-9.0.jar"/>
    29 			<classpath location="/usr/share/java/saxonb-9.0.jar"/>
    51 			</factory>
    51 			</factory>
    52 		</xslt>
    52 		</xslt>
    53 		
    53 		
    54 	</target>
    54 	</target>
    55 	
    55 	
    56 	<target name="kompiluj-funkce" description="">		
    56 	<target name="kompiluj-funkce" description="Přeloží funkce napsané v Javě.">		
    57 		<mkdir dir="${funkce}"/>
    57 		<mkdir dir="${funkce}"/>
    58 		<javac
    58 		<javac
    59 			srcdir="${šablona}/funkce/src"
    59 			srcdir="${šablona}/funkce/src"
    60 			destdir="${funkce}"			
    60 			destdir="${funkce}"			
    61 			includeAntRuntime="no">
    61 			includeAntRuntime="no">
    62 		</javac>
    62 		</javac>
    63 	</target>
    63 	</target>
    64 	
    64 	
       
    65 	<target name="statický-obsah" description="Kopíruje JS, CSS, obrázky atd.">
       
    66 		<copy todir="${výstup}">
       
    67 			<fileset dir="${vstup}" excludes="*.xml,*.inc,web.conf"/>
       
    68 		</copy>
       
    69 	</target>
       
    70 	
       
    71 	<target name="čisti" description="Smaže vygenerovaný obsah.">
       
    72 		<delete includeemptydirs="true">
       
    73 			<fileset dir="${výstup}" includes="**/*"/>
       
    74 			<fileset dir="${funkce}" includes="**/*"/>
       
    75 		</delete>
       
    76 	</target>
       
    77 	
    65 </project>
    78 </project>