Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extJCRS / build.xml @ 27527

History | View | Annotate | Download (5.2 KB)

1
<project name="extJCRS" default="generate-without-source" basedir=".">
2
    <description>
3
        Instala el plugin de JCrs en Andami.
4
    </description>
5
  <!-- set global properties for this build -->
6
  <property name="src" location="src"/>
7
  <property name="without_src"  location="without_src"/>
8
  <property name="src-test" location="src-test"/>
9
  <property name="build" location="bin"/>
10
  <property name="build-test" location="bin-test"/>
11
  <property name="dist"  location="dist"/>
12
  <property name="lib"  location="lib"/>
13
  <property name="plugin" value="org.gvsig.crs"/>
14
  <property name="extension-dir" location="../_fwAndami/gvSIG/extensiones"/>
15
  <property name="gvSIGlib-dir" value="${extension-dir}/com.iver.cit.gvsig/lib"/>
16
  <property name="andami-dir" location="../_fwAndami"/>
17

    
18
        <import file="../binaries/ant/utilities.xml"/>
19

    
20
  <target name="init">
21
    <!-- Create the time stamp -->
22
    <tstamp/>
23
          <echo>
24
                          Compiling ${ant.project.name}...</echo>
25
    <!-- Create the build directory structure used by compile -->
26
    <mkdir dir="${build}"/>
27
    <mkdir dir="${dist}"/>
28
  </target>
29

    
30
        <target name="update-referenced-libraries">
31
                <copy todir="${lib}" failonerror="false">
32
                        <fileset dir="${workspaceDir}/libJCRS/dist" includes="*.jar,*.zip"/>
33
                        <fileset dir="${workspaceDir}/libJCRS/lib" includes="*.jar,*.zip"/>
34
                </copy>
35

    
36
                <copy todir="${lib}" failonerror="false">
37
                        <fileset dir="${workspaceDir}/libProjection/dist" includes="org.cresques.ui.jar org.gvsig.projection.jar" />
38
                </copy>
39
        </target>
40

    
41
        
42
        
43
        <target name="buildNumber">  
44
          <propertyfile     file="build.number"
45
              comment="Build Number for ANT. Do not edit!">
46
            <entry key="build.number" default="0" type="int" operation="+" />
47
          </propertyfile>
48
          <property file="build.number" />
49
        </target>
50

    
51
  <target name="distribution" depends="buildNumber, copy-data-files, generate-without-source">
52
  </target>
53

    
54
  <target name="compile"
55
          description="compile the source" >
56
      <!-- Compile the Java code from ${src} to ${bin} -->
57
                <antcall target="gvSIG-import-build-number"/>
58
                <loadEclipseClasspath project="${basedir}"/>
59
                <gvSIG-javac
60
                        classpath="${eclipseClasspath}"
61
                />
62
      <!--<javac      srcdir="${src}"
63
                  destdir="${build}"
64
                  source="${JavaSourceVersion}"
65
                  target="${JavaTargetVersion}"
66
                  debug="${debug}"
67
                  debuglevel="${debuglevel}"
68
                  encoding="${encoding}"
69
                                     classpath="${extension-dir}/com.iver.cit.gvsig/lib/fmap.jar:${extension-dir}/com.iver.cit.gvsig/lib/com.iver.cit.gvsig.jar:../FMap/lib/cms.jar:../Andami/lib/iver-utiles.jar:../FMap/lib/gdbms-0.8-SNAPSHOT.jar:../Andami/andami.jar"/>
70
          -->
71
    </target>
72

    
73
  <target name="generate-without-source" description="generate the distribution without the source file" depends="update-referenced-libraries">
74
    <!-- Create the distribution directory -->
75
    <mkdir dir="${dist}"/>
76

    
77
          <copy file="config/about.htm" todir="${dist}" overwrite="yes"/>
78
          <loadproperties srcFile="build.number"/>
79
          <replace casesensitive="true"
80
                             file="${dist}/about.htm"
81
                             token="#build.number#"
82
                             value="${build.number}">
83
           </replace>
84

    
85
    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
86
    <jar jarfile="${dist}/${plugin}.jar" basedir="${build}"/>
87

    
88
          <copy file="config/config.xml" todir="${dist}"/>
89
          <copy file="build.number" todir="${dist}"/>
90

    
91
          <copy file="${dist}/${plugin}.jar" todir="lib/"/>
92
          <copy todir="${dist}/images">
93
                                <fileset dir="images/" includes="*"/>
94
                    </copy>
95
          <copy todir="${dist}">
96
            <fileset dir="config" includes="text*.properties"/>
97
                  <fileset dir="config" includes="esri.*"/>
98
                  <fileset dir="config" includes="iau2000.*"/>
99
                  <fileset dir="config" includes="usr.*"/>
100
    </copy>          
101
    <move todir="${extension-dir}/${plugin}/">
102
            <fileset dir="${dist}" includes="**/**"/>
103
    </move>
104

    
105
          <mkdir dir="${extension-dir}/${plugin}/data"/>
106
          <copy todir="${extension-dir}/${plugin}/data">
107
                      <fileset dir="data" includes="**/**"/>
108
          </copy>
109
        <copy todir="${gvSIGlib-dir}">
110
                <fileset dir="${lib}" includes="*" excludes="${plugin}.jar"/>
111
        </copy>
112

    
113
  </target>
114
          
115
        <target name="copy-data-files">
116
                        <copy file="config/config.xml" todir="${without_src}"/>
117
                        <copy file="build.number" todir="${without_src}"/>
118
                        <copy file="config/about.htm" todir="${without_src}"/>
119
                        <loadproperties srcFile="build.number"/>
120
                        <replace casesensitive="true"
121
                          file="${without_src}/about.htm"
122
                            token="#build.number#"
123
                          value="${build.number}"/>
124
                        <copy todir="${without_src}">
125
                                <fileset dir="config" includes="text*.properties"/>
126
                        </copy>
127
                        <copy todir="${without_src}/images">
128
                                <fileset dir="images/" includes="*"/>
129
                        </copy>
130
        </target>
131

    
132
        <target name="batch-build"
133
                        description="compile the sources, create the jar file"
134
                        depends="init,update-referenced-libraries,compile,generate-without-source">
135
        </target>
136

    
137
        <target name="clean"
138
                    description="cleans the build directories">
139
                <delete dir="${build}"/>
140
                <delete dir="${dist}"/>
141
        </target>
142
        
143
        <target name="run-tests" depends="batch-build,compile-tests">
144
                <antcall target="generic-run-tests">
145
                        <param name="TestSuite.Name" value="org.gvsig.crs.AllTests"/>
146
                </antcall>
147
        </target>
148
</project>
149

    
150