java/nekurak.net-web/build.xml
changeset 57 7162ed62c9ab
parent 26 fc3e84d87e01
child 76 40b228296815
     1.1 --- a/java/nekurak.net-web/build.xml	Thu Feb 11 03:13:57 2010 +0100
     1.2 +++ b/java/nekurak.net-web/build.xml	Sun Mar 07 21:19:35 2010 +0100
     1.3 @@ -12,60 +12,106 @@
     1.4      <import file="nbproject/build-impl.xml"/>
     1.5      <!--
     1.6  
     1.7 -    There exist several targets which are by default empty and which can be 
     1.8 -    used for execution of your tasks. These targets are usually executed 
     1.9 -    before and after some main targets. They are: 
    1.10 +    There exist several targets which are by default empty and which can be
    1.11 +    used for execution of your tasks. These targets are usually executed
    1.12 +    before and after some main targets. They are:
    1.13  
    1.14 -      -pre-init:                 called before initialization of project properties 
    1.15 -      -post-init:                called after initialization of project properties 
    1.16 -      -pre-compile:              called before javac compilation 
    1.17 -      -post-compile:             called after javac compilation 
    1.18 +      -pre-init:                 called before initialization of project properties
    1.19 +      -post-init:                called after initialization of project properties
    1.20 +      -pre-compile:              called before javac compilation
    1.21 +      -post-compile:             called after javac compilation
    1.22        -pre-compile-single:       called before javac compilation of single file
    1.23        -post-compile-single:      called after javac compilation of single file
    1.24        -pre-compile-test:         called before javac compilation of JUnit tests
    1.25        -post-compile-test:        called after javac compilation of JUnit tests
    1.26        -pre-compile-test-single:  called before javac compilation of single JUnit test
    1.27        -post-compile-test-single: called after javac compilation of single JUunit test
    1.28 -      -pre-dist:                 called before archive building 
    1.29 -      -post-dist:                called after archive building 
    1.30 -      -post-clean:               called after cleaning build products 
    1.31 +      -pre-dist:                 called before archive building
    1.32 +      -post-dist:                called after archive building
    1.33 +      -post-clean:               called after cleaning build products
    1.34        -pre-run-deploy:           called before deploying
    1.35        -post-run-deploy:          called after deploying
    1.36  
    1.37 -    Example of pluging an obfuscator after the compilation could look like 
    1.38 +    Example of pluging an obfuscator after the compilation could look like
    1.39  
    1.40 -        <target name="-post-compile">
    1.41 -            <obfuscate>
    1.42 -                <fileset dir="${build.classes.dir}"/>
    1.43 -            </obfuscate>
    1.44 -        </target>
    1.45 +	<target name="-post-compile">
    1.46 +	    <obfuscate>
    1.47 +		<fileset dir="${build.classes.dir}"/>
    1.48 +	    </obfuscate>
    1.49 +	</target>
    1.50  
    1.51 -    For list of available properties check the imported 
    1.52 -    nbproject/build-impl.xml file. 
    1.53 +    For list of available properties check the imported
    1.54 +    nbproject/build-impl.xml file.
    1.55  
    1.56  
    1.57      Other way how to customize the build is by overriding existing main targets.
    1.58 -    The target of interest are: 
    1.59 +    The target of interest are:
    1.60  
    1.61        init-macrodef-javac:    defines macro for javac compilation
    1.62        init-macrodef-junit:   defines macro for junit execution
    1.63        init-macrodef-debug:    defines macro for class debugging
    1.64        do-dist:                archive building
    1.65 -      run:                    execution of project 
    1.66 -      javadoc-build:          javadoc generation 
    1.67 +      run:                    execution of project
    1.68 +      javadoc-build:          javadoc generation
    1.69  
    1.70 -    Example of overriding the target for project execution could look like 
    1.71 +    Example of overriding the target for project execution could look like
    1.72  
    1.73 -        <target name="run" depends="<PROJNAME>-impl.jar">
    1.74 -            <exec dir="bin" executable="launcher.exe">
    1.75 -                <arg file="${dist.jar}"/>
    1.76 -            </exec>
    1.77 -        </target>
    1.78 +	<target name="run" depends="<PROJNAME>-impl.jar">
    1.79 +	    <exec dir="bin" executable="launcher.exe">
    1.80 +		<arg file="${dist.jar}"/>
    1.81 +	    </exec>
    1.82 +	</target>
    1.83  
    1.84 -    Notice that overridden target depends on jar target and not only on 
    1.85 -    compile target as regular run target does. Again, for list of available 
    1.86 -    properties which you can use check the target you are overriding in 
    1.87 -    nbproject/build-impl.xml file. 
    1.88 +    Notice that overridden target depends on jar target and not only on
    1.89 +    compile target as regular run target does. Again, for list of available
    1.90 +    properties which you can use check the target you are overriding in
    1.91 +    nbproject/build-impl.xml file.
    1.92  
    1.93      -->
    1.94 +
    1.95 +    <target name="-pre-dist">
    1.96 +	<property name="zdrojaky-archiv-soubor" value="web/nekurak.net-src.zip"/>
    1.97 +	<property name="zdrojaky-archiv-komentar" value="Kódování: UTF-8 | Autor: František Kučera | Web: http://frantovo.cz/ | Licence: GNU Affero GPL, verze 3"/>
    1.98 +	<property name="hashovani" value="SHA-512"/>
    1.99 +
   1.100 +	<zip basedir="../../.." excludes="nekurak.net/html/**
   1.101 +      nekurak.net/.hg/**
   1.102 +      nekurak.net/.hgignore
   1.103 +      nekurak.net/.hgtags
   1.104 +      nekurak.net/java/nekurak.net-mvn/**
   1.105 +      nekurak.net/java/nekurak.net-ear/nbproject/private/**
   1.106 +      nekurak.net/java/nekurak.net-ear/dist/**
   1.107 +      nekurak.net/java/nekurak.net-ear/build/**
   1.108 +      nekurak.net/java/nekurak.net-web/nbproject/private/**
   1.109 +      nekurak.net/java/nekurak.net-web/dist/**
   1.110 +      nekurak.net/java/nekurak.net-web/build/**
   1.111 +      nekurak.net/java/nekurak.net-lib/nbproject/private/**
   1.112 +      nekurak.net/java/nekurak.net-lib/dist/**
   1.113 +      nekurak.net/java/nekurak.net-lib/build/**
   1.114 +      nekurak.net/java/nekurak.net-ejb/nbproject/private/**
   1.115 +      nekurak.net/java/nekurak.net-ejb/dist/**
   1.116 +      nekurak.net/java/nekurak.net-ejb/build/**
   1.117 +      nekurak.net/java/nekurak.net-web/${zdrojaky-archiv-soubor}
   1.118 +      nekurak.net/java/nekurak.net-web/${zdrojaky-archiv-soubor}.${hashovani}
   1.119 +      nekurak.net/licence/agpl-3.0.pdf
   1.120 +      nekurak.net/licence/agpl-3.0.tex"
   1.121 +      includes="nekurak.net/**"
   1.122 +      comment="${zdrojaky-archiv-komentar}"
   1.123 +      encoding="UTF-8"
   1.124 +      destfile="${zdrojaky-archiv-soubor}"/>
   1.125 +	<checksum file="${zdrojaky-archiv-soubor}" algorithm="${hashovani}" pattern="{0}  {1}"/>
   1.126 +
   1.127 +	<manifest file="src/conf/MANIFEST.MF" mode="replace">
   1.128 +	    <attribute name="Manifest-Version" value="1.0"/>
   1.129 +	    <section name="Frantovo.cz">
   1.130 +		<attribute name="Kompiloval" value="${user.name}"/>
   1.131 +		<attribute name="java-version" value="${java.version}"/>
   1.132 +		<attribute name="java-vm-version" value="${java.vm.version}"/>
   1.133 +		<attribute name="os-name" value="${os.name}"/>
   1.134 +		<attribute name="os-arch" value="${os.arch}"/>
   1.135 +		<attribute name="os-version" value="${os.version}"/>
   1.136 +	    </section>
   1.137 +	</manifest>
   1.138 +    </target>
   1.139 +
   1.140  </project>