Revision 12353

View differences:

branches/v10/applications/appgvSIG/build.xml
23 23
	<property name="JavaSourceVersion" value="1.4"/>
24 24
	<property name="JavaTargetVersion" value="1.5"/>
25 25
	<property name="encoding" value="ISO_8859_1"/>
26
		
26

  
27 27
	<target name="init">
28 28
		<!-- Create the time stamp -->
29 29
		<tstamp/>
......
105 105
	</zip>
106 106
 <!--   <delete dir="${dist}"/> -->
107 107
  </target>
108
	
109
	<target name="make-binary-distribution"
110
			description="Prepare a binary distribution of the application. This increments the build number and then makes a global build"
111
			depends="buildNumber,build-all">		
112
	</target>
113
	
108

  
114 109
	<target name="batch-build"
115 110
			description="Global build for the whole gvSIG + extensions. Compiles all the sources and builds the application so that it's ready to execute"
116 111
			depends="init,get-fmap-libs,compile,create-jar,copy-libs,copy-data-files,move-to-andami">
117 112
	</target>
118
	
113

  
119 114
	<target name="compile" description="compile the source">
120 115
		<!-- Create the time stamp -->
121 116
		<tstamp/>
......
135 130
        	<classpath refid="appgvSIG.compile-classpath"/>
136 131
<!--        	<classpath refid="_fwAndami.compile-classpath"/> -->
137 132
		</javac>
138
	</target>	
133
	</target>
139 134

  
140 135
	<target name="create-jar" description="Creates the jar file">
141 136
		<mkdir dir="${dist}/lib"/>
142 137
		<jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}"/>
143 138
	</target>
144
	
139

  
145 140
	<target name="copy-libs"
146 141
		depends="get-fmap-libs">
147 142
		<mkdir dir="${dist}"/>
......
150 145
			<fileset dir="./lib" includes="*.jar,*.zip"/>
151 146
		</copy>
152 147
	</target>
153
	
148

  
154 149
	<target name="get-fmap-libs">
155 150
		<copy todir="${dist}/lib">
156 151
			<fileset dir="${fmapdir}/lib" includes="*.jar"/>
......
158 153
		<jar jarfile="${dist}/lib/fmap.jar" basedir="${fmapdir}/bin"/>
159 154
		<copy file="${dist}/lib/fmap.jar" todir="${extensionDir}/${plugin}/lib"/>
160 155
	</target>
161
	
156

  
162 157
	<target name="copy-data-files">
163 158
        <copy todir="${dist}">
164 159
                <fileset dir="config" includes="*" />
......
171 166
			<fileset dir="northimages/" includes="*"/>
172 167
		</copy>
173 168
    </target>
174
	
169

  
175 170
	<target name="move-to-andami" description="Moves the build directory to andami">
176 171
		<move todir="${extensionDir}/${plugin}/">
177 172
			<fileset dir="${dist}" includes="**/**"/>
......
184 179
		<delete dir="${build}"/>
185 180
<!--		<delete dir="${dist}"/> -->
186 181
	</target>
187
	
188
	
182

  
183

  
189 184
	<!-- the global build starts here -->
190 185
	<property name="andami" location="../_fwAndami"/>
191 186
	<property name="utiles" location="../libIverUtiles"/>
......
199 194
	<property name="gdbms" location="../libGDBMS"/>
200 195
	<property name="i18n" location="../libInternationalization"/>
201 196
	<property name="global.installBaseDir" location="${andami}"/>
202
	
197

  
198

  
199
    <target name="make-binary-distribution"
200
            description="Prepare a binary distribution of the application. This increments the build number and then makes a global build"
201
            depends="clean_andami_gvSIG,buildNumber,build-all">
202
    </target>
203

  
204
    <target name="clean_andami_gvSIG"
205
            description="clean up the gvSIG andami deploy">
206
        <delete dir="${andami}/gvSIG" failonerror="false"/>
207
    </target>
208

  
209

  
210

  
203 211
	<target name="buildNumber"
204 212
				description="Generates the build.number for the application">
205
		<propertyfile 
213
		<propertyfile
206 214
				file="build.number"
207 215
				comment="Build Number for ANT. Do not edit!">
208 216
			<entry  key="build.number" default="0" type="int" operation="+" pattern="0000"/>
......
212 220
	<target name="build-all"
213 221
				depends="debug-no,base,extensions"
214 222
				description="Global build for the whole gvSIG + extensions. Compiles all the sources and builds the application so that it's ready to execute" />
215
	
223

  
216 224
	<target name="eclipse-build-all"
217 225
					depends="debug-yes,base,extensions"
218 226
					description="Builds the application, including extensions, producing debug info" />
219
	
227

  
220 228
	<target name="debug-yes">
221 229
		<property name="debug" value="on"/>
222 230
		<property name="debuglevel" value="lines, vars"/>
223 231
	</target>
224
	
232

  
225 233
	<target name="debug-no">
226 234
		<property name="debug" value="off"/>
227 235
	</target>
228
	
236

  
229 237
	<target name="eclipse-base" depends="debug-yes,base" />
230 238
	<target name="eclipse-extensions" depends="debug-yes,base,extensions" />
231
	
239

  
232 240
	<target name="base"
233 241
			description="Builds the application, excluding extensions">
234 242
		<property file="build.number"/>
......
314 322
			<property name="encoding" value="ISO_8859_1"/>
315 323
		</ant>
316 324
	</target>
317
	
325

  
318 326
	<property name="appcatalog" location="../appCatalogYNomenclatorClient"/>
319 327
	<property name="catalog" location="../extCatalogYNomenclator"/>
320 328
	<property name="dataloc" location="../extDataLocator"/>
......
334 342
	<property name="centerview" location="../extCenterViewToPoint"/>
335 343
	<property name="libui" location="../libUI"/>
336 344
	<property name="expressionField" location="../extExpresionField"/>
337
    <property name="annotations" location="../extAnnotations"/>   
338
    <property name="geobd" location="../extOracleSpatial"/>   
339
    <property name="jcrs" location="../extJCRS_binaries"/>   
345
    <property name="annotations" location="../extAnnotations"/>
346
    <property name="geobd" location="../extOracleSpatial"/>
347
    <property name="jcrs" location="../extJCRS_binaries"/>
340 348
    <property name="libArcIMS" location="../libArcIMS"/>
341
    <property name="Arcims" location="../extArcims"/>   
342
	
349
    <property name="Arcims" location="../extArcims"/>
350

  
343 351
	<target name="extensions" depends="base">
344 352
		<condition property="event.Dir" value="${event}" else="scripts/voidTarget">
345 353
			<available file="${event}" type="dir"/>
......
386 394
			<property name="debug" value="${debug}"/>
387 395
			<property name="debuglevel" value="${debuglevel}"/>
388 396
			<property name="encoding" value="ISO_8859_1"/>
389
		</ant> 
397
		</ant>
390 398
        <condition property="geobd.Dir" value="${geobd}" else="scripts/voidTarget">
391 399
            <available file="${geobd}" type="dir"/>
392 400
        </condition>
......
399 407
            <property name="debug" value="${debug}"/>
400 408
            <property name="debuglevel" value="${debuglevel}"/>
401 409
            <property name="encoding" value="ISO_8859_1"/>
402
        </ant>   
410
        </ant>
403 411
		<condition property="cad.Dir" value="${cad}" else="scripts/voidTarget">
404 412
			<available file="${cad}" type="dir"/>
405 413
		</condition>
......
470 478
		</condition>
471 479
		<ant dir="${dataloc.Dir}" target="import-build-number" inheritAll="false">
472 480
			<property name="buildNumberFile" location="build.number"/>
473
		</ant>		
481
		</ant>
474 482
		<ant dir="${dataloc.Dir}" target="batch-build" inheritAll="false">
475 483
  			<property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
476 484
  			<property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
496 504
		</condition>
497 505
		<ant dir="${geoprocessingExtensions.Dir}" target="import-build-number" inheritAll="false">
498 506
			<property name="buildNumberFile" location="build.number"/>
499
		</ant>		
507
		</ant>
500 508
		<ant dir="${geoprocessingExtensions.Dir}" target="batch-build" inheritAll="false">
501 509
  			<property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
502 510
  			<property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
535 543
		</condition>
536 544
		<ant dir="${wfs.Dir}" target="import-build-number" inheritAll="false">
537 545
			<property name="buildNumberFile" location="build.number"/>
538
		</ant>		
546
		</ant>
539 547
		<ant dir="${wfs.Dir}" target="batch-build" inheritAll="false">
540 548
  			<property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
541 549
  			<property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
548 556
		</condition>
549 557
		<ant dir="${centerview.Dir}" target="import-build-number" inheritAll="false">
550 558
			<property name="buildNumberFile" location="build.number"/>
551
		</ant>		
559
		</ant>
552 560
		<ant dir="${centerview.Dir}" target="batch-build" inheritAll="false">
553 561
  			<property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
554 562
  			<property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
562 570
		</condition>
563 571
		<ant dir="${scripting.Dir}" target="import-build-number" inheritAll="false">
564 572
			<property name="buildNumberFile" location="build.number"/>
565
		</ant>		
573
		</ant>
566 574
		<ant dir="${scripting.Dir}" target="batch-build" inheritAll="false">
567 575
  			<property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
568 576
  			<property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
570 578
			<property name="debuglevel" value="${debuglevel}"/>
571 579
			<property name="encoding" value="ISO_8859_1"/>
572 580
		</ant>
573
    
581

  
574 582
 		<condition property="expressionField.Dir" value="${expressionField}" else="scripts/voidTarget">
575 583
			<available file="${expressionField}" type="dir"/>
576 584
		</condition>
577 585
		<ant dir="${expressionField.Dir}" target="import-build-number" inheritAll="false">
578 586
			<property name="buildNumberFile" location="build.number"/>
579
		</ant>		
587
		</ant>
580 588
		<ant dir="${expressionField.Dir}" target="batch-build" inheritAll="false">
581 589
  			<property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
582 590
  			<property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
584 592
			<property name="debuglevel" value="${debuglevel}"/>
585 593
			<property name="encoding" value="ISO_8859_1"/>
586 594
		</ant>
587
    
595

  
588 596
        <condition property="annotations.Dir" value="${annotations}" else="scripts/voidTarget">
589 597
            <available file="${annotations}" type="dir"/>
590
        </condition> 
598
        </condition>
591 599
       <ant dir="${annotations.Dir}" target="import-build-number" inheritAll="false">
592 600
            <property name="buildNumberFile" location="build.number"/>
593
        </ant>      
601
        </ant>
594 602
        <ant dir="${annotations.Dir}" target="batch-build" inheritAll="false">
595 603
            <property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
596 604
            <property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
598 606
            <property name="debuglevel" value="${debuglevel}"/>
599 607
            <property name="encoding" value="ISO_8859_1"/>
600 608
        </ant>
601
  
609

  
602 610
        <condition property="jcrs.Dir" value="${jcrs}" else="scripts/voidTarget">
603 611
            <available file="${jcrs}" type="dir"/>
604
        </condition> 
612
        </condition>
605 613
       <ant dir="${jcrs.Dir}" target="import-build-number" inheritAll="false">
606 614
            <property name="buildNumberFile" location="build.number"/>
607
        </ant>      
615
        </ant>
608 616
        <ant dir="${jcrs.Dir}" target="batch-build" inheritAll="false">
609 617
            <property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
610 618
            <property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
615 623

  
616 624
        <condition property="libArcIMS.Dir" value="${libArcIMS}" else="scripts/voidTarget">
617 625
            <available file="${libArcIMS}" type="dir"/>
618
        </condition> 
626
        </condition>
619 627
        <ant dir="${libArcIMS.Dir}" target="batch-build" inheritAll="false">
620 628
            <property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
621 629
            <property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
......
626 634

  
627 635
        <condition property="Arcims.Dir" value="${Arcims}" else="scripts/voidTarget">
628 636
            <available file="${Arcims}" type="dir"/>
629
        </condition> 
637
        </condition>
630 638
       <ant dir="${Arcims.Dir}" target="import-build-number" inheritAll="false">
631 639
            <property name="buildNumberFile" location="build.number"/>
632
        </ant>      
640
        </ant>
633 641
        <ant dir="${Arcims.Dir}" target="batch-build" inheritAll="false">
634 642
            <property name="JavaSourceVersion" value="${JavaSourceVersion}"/>
635 643
            <property name="JavaTargetVersion" value="${JavaTargetVersion}"/>
636 644
            <property name="debug" value="${debug}"/>
637 645
            <property name="debuglevel" value="${debuglevel}"/>
638 646
            <property name="encoding" value="ISO_8859_1"/>
639
        </ant>   
647
        </ant>
640 648
	</target>
641
	
649

  
642 650
	<target name="clean-all"
643 651
				depends="clean-base,clean-extensions"
644 652
				description="clean up" />
645
	
653

  
646 654
	<target name="clean-base"
647 655
		description="cleans the base components of gvSIG: appgvSIG + libs">
648 656
		<!-- Delete the ${build} and ${dist} directory trees -->
......
658 666
		<ant dir="${gvSIG}" target="clean"/>
659 667
		<ant dir="${libui}" target="clean"/>
660 668
	</target>
661
	
669

  
662 670
	<target name="clean-extensions"
663 671
		description="Clean the extensions">
664 672
		<condition property="event.Dir" value="${event}" else="scripts/voidTarget">
......
675 683
		<ant dir="${extdwg.Dir}" target="clean" inheritAll="false" />
676 684
		<condition property="jdbc.Dir" value="${jdbc}" else="scripts/voidTarget">
677 685
			<available file="${jdbc}" type="dir"/>
678
		</condition>		
679
		<ant dir="${jdbc.Dir}" target="clean" inheritAll="false" /> 
686
		</condition>
687
		<ant dir="${jdbc.Dir}" target="clean" inheritAll="false" />
680 688
        <condition property="geobd.Dir" value="${geobd}" else="scripts/voidTarget">
681 689
            <available file="${geobd}" type="dir"/>
682
        </condition>        
683
        <ant dir="${geobd.Dir}" target="clean" inheritAll="false" />   
690
        </condition>
691
        <ant dir="${geobd.Dir}" target="clean" inheritAll="false" />
684 692
		<condition property="cad.Dir" value="${cad}" else="scripts/voidTarget">
685 693
			<available file="${cad}" type="dir"/>
686 694
		</condition>
......
709 717
			<available file="${geoprocessing}" type="dir"/>
710 718
		</condition>
711 719
		<ant dir="${geoprocessing.Dir}" target="clean" inheritAll="false" />
712
 
720

  
713 721
        <condition property="geoprocessingExtensions.Dir" value="${geoprocessingExtensions}" else="scripts/voidTarget">
714 722
            <available file="${geoprocessingExtensions}" type="dir"/>
715 723
        </condition>
716 724
        <ant dir="${geoprocessingExtensions.Dir}" target="clean" inheritAll="false" />
717
   
725

  
718 726
		<condition property="georeferencing.Dir" value="${georeferencing}" else="scripts/voidTarget">
719 727
			<available file="${georeferencing}" type="dir"/>
720 728
		</condition>
......
738 746
        <condition property="expressionField.Dir" value="${expressionField}" else="scripts/voidTarget">
739 747
            <available file="${expressionField}" type="dir"/>
740 748
        </condition>
741
        <ant dir="${expressionField.Dir}" target="clean" inheritAll="false" />   
749
        <ant dir="${expressionField.Dir}" target="clean" inheritAll="false" />
742 750
        <condition property="annotations.Dir" value="${annotations}" else="scripts/voidTarget">
743 751
            <available file="${annotations}" type="dir"/>
744 752
        </condition>
745
        <ant dir="${annotations.Dir}" target="clean" inheritAll="false" />      
753
        <ant dir="${annotations.Dir}" target="clean" inheritAll="false" />
746 754
	</target>
747 755

  
748 756
	<!-- Those targets don't compile, they just generate the jars and copy files to
......
750 758
	<target name="install-all"
751 759
					depends="install-base,install-extensions"
752 760
					description="Generate jars and copy files to Andami for the whole application (gvSIG+libs+extensions). Compilation is supposed to be automatically done by Eclipse" />
753
		
761

  
754 762
	<target name="install-base"
755 763
				description="Generate jars and copy files to Andami for the application (gvSIG+libs). Compilation is supposed to be automatically done by Eclipse" >
756 764
		<property file="build.number"/>
......
769 777
		<ant dir="${fmap}" inheritAll="false"/>
770 778
		<ant dir="${gvSIG}" inheritAll="false"/>
771 779
	</target>
772
		
780

  
773 781
	<target name="install-extensions" depends="install-base"
774 782
			description="Generate jars and copy files to Andami for the extensions. Compilation is supposed to be automatically done by Eclipse" >
775 783
		<condition property="event.Dir" value="${event}" else="scripts/voidTarget">
......
842 850
		</condition>
843 851
		<ant dir="${dataloc.Dir}" target="import-build-number" inheritAll="false">
844 852
			<property name="buildNumberFile" location="build.number"/>
845
		</ant>		
853
		</ant>
846 854
		<ant dir="${dataloc.Dir}" inheritAll="false"/>
847 855
		<condition property="geoprocessing.Dir" value="${geoprocessing}" else="scripts/voidTarget">
848 856
			<available file="${geoprocessing}" type="dir"/>
......
856 864
		</condition>
857 865
		<ant dir="${geoprocessingExtensions.Dir}" target="import-build-number" inheritAll="false">
858 866
			<property name="buildNumberFile" location="build.number"/>
859
		</ant>		
867
		</ant>
860 868
		<ant dir="${geoprocessingExtensions.Dir}" inheritAll="false"/>
861 869
		<condition property="georeferencing.Dir" value="${georeferencing}" else="scripts/voidTarget">
862 870
			<available file="${georeferencing}" type="dir"/>
......
877 885
		</condition>
878 886
		<ant dir="${wfs.Dir}" target="import-build-number" inheritAll="false">
879 887
			<property name="buildNumberFile" location="build.number"/>
880
		</ant>		
888
		</ant>
881 889
		<ant dir="${wfs.Dir}" inheritAll="false"/>
882 890
		<condition property="centerview.Dir" value="${centerview}" else="scripts/voidTarget">
883 891
			<available file="${centerview}" type="dir"/>
884 892
		</condition>
885 893
		<ant dir="${centerview.Dir}" target="import-build-number" inheritAll="false">
886 894
			<property name="buildNumberFile" location="build.number"/>
887
		</ant>		
895
		</ant>
888 896
		<ant dir="${centerview.Dir}" inheritAll="false"/>
889 897
		<condition property="scripting.Dir" value="${scripting}" else="scripts/voidTarget">
890 898
			<available file="${scripting}" type="dir"/>
891 899
		</condition>
892 900
		<ant dir="${scripting.Dir}" target="import-build-number" inheritAll="false">
893 901
			<property name="buildNumberFile" location="build.number"/>
894
		</ant>		
902
		</ant>
895 903
		<ant dir="${scripting.Dir}" inheritAll="false"/>
896 904

  
897 905
		<condition property="expressionField.Dir" value="${expressionField}" else="scripts/voidTarget">
......
899 907
		</condition>
900 908
		<ant dir="${expressionField.Dir}" target="import-build-number" inheritAll="false">
901 909
			<property name="buildNumberFile" location="build.number"/>
902
		</ant>		
910
		</ant>
903 911
		<ant dir="${expressionField.Dir}" inheritAll="false"/>
904 912

  
905 913
	    <condition property="annotations.Dir" value="${annotations}" else="scripts/voidTarget">
906 914
	        <available file="${annotations}" type="dir"/>
907
	    </condition> 
915
	    </condition>
908 916
	   <ant dir="${annotations.Dir}" target="import-build-number" inheritAll="false">
909 917
	        <property name="buildNumberFile" location="build.number"/>
910
	    </ant>      
918
	    </ant>
911 919
	    <ant dir="${annotations.Dir}" inheritAll="false"/>
912
	
920

  
913 921
	    <condition property="jcrs.Dir" value="${jcrs}" else="scripts/voidTarget">
914 922
	        <available file="${jcrs}" type="dir"/>
915
	    </condition> 
923
	    </condition>
916 924
	   <ant dir="${jcrs.Dir}" target="import-build-number" inheritAll="false">
917 925
	        <property name="buildNumberFile" location="build.number"/>
918
	    </ant>      
926
	    </ant>
919 927
	    <ant dir="${jcrs.Dir}" inheritAll="false"/>
920 928

  
921 929
	    <condition property="libArcIMS.Dir" value="${libArcIMS}" else="scripts/voidTarget">
922 930
	        <available file="${libArcIMS}" type="dir"/>
923
	    </condition> 
931
	    </condition>
924 932
	    <ant dir="${libArcIMS.Dir}" inheritAll="false"/>
925 933

  
926 934
	    <condition property="Arcims.Dir" value="${Arcims}" else="scripts/voidTarget">
927 935
	        <available file="${Arcims}" type="dir"/>
928
	    </condition> 
936
	    </condition>
929 937
	   <ant dir="${Arcims.Dir}" target="import-build-number" inheritAll="false">
930 938
	        <property name="buildNumberFile" location="build.number"/>
931
	    </ant>      
939
	    </ant>
932 940
	    <ant dir="${Arcims.Dir}" inheritAll="false"/>
933
      
941

  
934 942
	</target>
935 943

  
936
	
937
	
944

  
945

  
938 946
	<!-- The download targets are still no working well (or maybe not working at all...) -->
939 947
	<target name="download"
940 948
			description="Not working yet. Downloads all the projects from the CVS HEAD"
......
944 952
	<target name="download-base" description="Not working yet. It will download the base projects required to build gvSIG">
945 953
		<property name="downloadDir" value="tmp-download"/>
946 954
		<mkdir dir="${downloadDir}" />
947
		
955

  
948 956
		<!-- andami -->
949 957
		<cvs
950 958
			dest="${downloadDir}"
......
954 962
		<move todir="${andami}">
955 963
			<fileset dir="${downloadDir}/gvSIG-project/frameworks/_fwAndami"/>
956 964
		</move>
957
		
965

  
958 966
		<!-- we have to do the same for the rest of the projects -->
959 967
	</target>
960
	
968

  
961 969
	<target name="download-extensions" description="Not working yet. It will download the extensions">
962 970
	</target>
963 971

  

Also available in: Unified diff