Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / pom.xml @ 40551

History | View | Annotate | Download (20.8 KB)

1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
    <modelVersion>4.0.0</modelVersion>
4
    <artifactId>org.gvsig.desktop.plugin</artifactId>
5
    <packaging>pom</packaging>
6
    <name>${project.artifactId}</name>
7
    <description>Thus project group al core plugins of gvSIG.
8
This pom knows how to build and made a plugin for gvSIG. 
9
</description>
10
    <parent>
11
        <groupId>org.gvsig</groupId>
12
        <artifactId>org.gvsig.desktop</artifactId>
13
        <version>2.0.14-SNAPSHOT</version>
14
    </parent>
15

    
16
    <dependencyManagement>
17
        <dependencies>
18

    
19
          <dependency>
20
            <groupId>org.gvsig</groupId>
21
            <artifactId>org.gvsig.app.mainplugin</artifactId>
22
            <version>2.0.14-SNAPSHOT</version>
23
            <scope>provided</scope>
24
          </dependency>
25
          <dependency>
26
            <groupId>org.gvsig</groupId>
27
            <artifactId>org.gvsig.annotation.app.mainplugin</artifactId>
28
            <version>2.0.14-SNAPSHOT</version>
29
            <scope>provided</scope>
30
          </dependency>
31
          <dependency>
32
            <groupId>org.gvsig</groupId>
33
            <artifactId>org.gvsig.app.document.table.app.mainplugin</artifactId>
34
            <version>2.0.14-SNAPSHOT</version>
35
            <scope>provided</scope>
36
          </dependency>
37
          <dependency>
38
            <groupId>org.gvsig</groupId>
39
            <artifactId>org.gvsig.centerviewpoint.app.mainplugin</artifactId>
40
            <version>2.0.14-SNAPSHOT</version>
41
            <scope>provided</scope>
42
          </dependency>
43
          <dependency>
44
            <groupId>org.gvsig</groupId>
45
            <artifactId>org.gvsig.coreplugin.app.mainplugin</artifactId>
46
            <version>2.0.14-SNAPSHOT</version>
47
            <scope>provided</scope>
48
          </dependency>
49
          <dependency>
50
            <groupId>org.gvsig</groupId>
51
            <artifactId>org.gvsig.daltransform.app.mainplugin</artifactId>
52
            <version>2.0.14-SNAPSHOT</version>
53
            <scope>provided</scope>
54
          </dependency>
55
          <dependency>
56
            <groupId>org.gvsig</groupId>
57
            <artifactId>org.gvsig.datalocator.app.mainplugin</artifactId>
58
            <version>2.0.14-SNAPSHOT</version>
59
            <scope>provided</scope>
60
          </dependency>
61
          <dependency>
62
            <groupId>org.gvsig</groupId>
63
            <artifactId>org.gvsig.editing.app.mainplugin</artifactId>
64
            <version>2.0.14-SNAPSHOT</version>
65
            <scope>provided</scope>
66
          </dependency>
67
          <dependency>
68
            <groupId>org.gvsig</groupId>
69
            <artifactId>org.gvsig.exportto.app.mainplugin</artifactId>
70
            <version>2.0.14-SNAPSHOT</version>
71
            <scope>provided</scope>
72
          </dependency>
73
          <dependency>
74
            <groupId>org.gvsig</groupId>
75
            <artifactId>org.gvsig.geodb.app.mainplugin</artifactId>
76
            <version>2.0.14-SNAPSHOT</version>
77
            <scope>provided</scope>
78
          </dependency>
79
          <dependency>
80
            <groupId>org.gvsig</groupId>
81
            <artifactId>org.gvsig.mkmvnproject.app.mainplugin</artifactId>
82
            <version>2.0.14-SNAPSHOT</version>
83
            <scope>provided</scope>
84
          </dependency>
85
          <dependency>
86
            <groupId>org.gvsig</groupId>
87
            <artifactId>org.gvsig.installer.app.mainplugin</artifactId>
88
            <version>2.0.14-SNAPSHOT</version>
89
            <scope>provided</scope>
90
          </dependency>
91
          <dependency>
92
            <groupId>org.gvsig</groupId>
93
            <artifactId>org.gvsig.symbology.app.mainplugin</artifactId>
94
            <version>2.0.10-SNAPSHOT</version>
95
            <scope>provided</scope>
96
          </dependency>
97
          <dependency>
98
            <groupId>org.gvsig</groupId>
99
            <artifactId>org.gvsig.i18n.app.mainplugin</artifactId>
100
            <version>2.0.14-SNAPSHOT</version>
101
            <scope>provided</scope>
102
          </dependency>
103
          <dependency>
104
            <groupId>org.gvsig</groupId>
105
            <artifactId>org.gvsig.selectiontools.app.mainplugin</artifactId>
106
            <version>2.0.14-SNAPSHOT</version>
107
            <scope>provided</scope>
108
          </dependency>
109
          <dependency>
110
            <groupId>org.gvsig</groupId>
111
            <artifactId>org.gvsig.geometrymeasurement.app.mainplugin</artifactId>
112
            <version>2.0.14-SNAPSHOT</version>
113
            <scope>provided</scope>
114
          </dependency>
115
          <dependency>
116
            <groupId>org.gvsig</groupId>
117
            <artifactId>org.gvsig.newlayer.app.mainplugin</artifactId>
118
            <version>2.0.14-SNAPSHOT</version>
119
            <scope>provided</scope>
120
          </dependency>
121
          <dependency>
122
            <groupId>org.gvsig</groupId>
123
            <artifactId>org.gvsig.help.app.mainplugin</artifactId>
124
            <version>2.0.14-SNAPSHOT</version>
125
            <scope>provided</scope>
126
          </dependency>
127

    
128
        </dependencies>
129
    </dependencyManagement>
130

    
131
    <properties>
132
        <!-- Package info property values -->
133
        <gvsig.package.info.codealias />
134
        <gvsig.package.info.version>${project.version}</gvsig.package.info.version>
135
        <gvsig.package.info.state>devel</gvsig.package.info.state>
136
        <gvsig.package.info.official>false</gvsig.package.info.official>
137
        <gvsig.package.info.operatingSystem>all</gvsig.package.info.operatingSystem>
138
        <gvsig.package.info.architecture>all</gvsig.package.info.architecture>
139
        <gvsig.package.info.javaVM>j1_5</gvsig.package.info.javaVM>
140
        <gvsig.package.info.gvSIGVersion>2.1.0</gvsig.package.info.gvSIGVersion>
141
        <gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.0.1</gvsig.package.info.dependencies>
142
        <gvsig.package.info.owner>gvSIG Association</gvsig.package.info.owner>
143
        <gvsig.package.info.sourcesURL>${project.scm.url}</gvsig.package.info.sourcesURL>
144
        <gvsig.package.info.webURL>http://www.gvsig.com</gvsig.package.info.webURL>
145
        <gvsig.package.info.categories />
146
        <gvsig.package.info.poolURL>http://downloads.gvsig.org/download/gvsig-desktop/pool</gvsig.package.info.poolURL>
147
    </properties>
148

    
149
    <dependencies>
150
      <dependency>
151
          <groupId>org.slf4j</groupId>
152
          <artifactId>slf4j-api</artifactId>
153
          <scope>provided</scope>
154
      </dependency>
155
      <dependency>
156
          <groupId>org.slf4j</groupId>
157
          <artifactId>slf4j-log4j12</artifactId>
158
          <scope>provided</scope>
159
      </dependency>
160
      <dependency>
161
        <groupId>org.gvsig</groupId>
162
        <artifactId>org.gvsig.andami</artifactId>
163
        <scope>provided</scope>
164
      </dependency>
165
      <dependency>
166
        <groupId>org.gvsig</groupId>
167
        <artifactId>org.gvsig.tools.lib</artifactId>
168
        <scope>provided</scope>
169
      </dependency>
170
    </dependencies>
171

    
172

    
173
    <build>
174
      <plugins>
175

    
176
            <plugin>
177
              <!-- load ".gvsig-devel.properties" -->
178
              <groupId>org.codehaus.mojo</groupId>
179
              <artifactId>properties-maven-plugin</artifactId>
180
              <configuration>
181
                  <files>
182
                      <!-- Define gvsig.product.folder.path in this property -->
183
                      <file>${user.home}/.gvsig-devel.properties</file>
184
                      <file>${env.HOME}/.gvsig-devel.properties</file>
185
                      <file>${project.basedir}/gvsig-devel.properties</file>
186
                      <file>buildNumber.properties</file>
187
                  </files>
188
                  <quiet>true</quiet>
189
              </configuration>
190
              <executions>
191
                  <execution>
192
                            <id>default</id>
193
                      <phase>prepare-package</phase>
194
                      <goals>
195
                          <goal>read-project-properties</goal>
196
                      </goals>
197
                  </execution>
198
                  <execution>
199
                          <id>default-clean</id>
200
                    <phase>pre-clean</phase>
201
                    <goals>
202
                        <goal>read-project-properties</goal>
203
                    </goals>
204
                </execution>
205
              </executions>
206
            </plugin>
207

    
208

    
209
        </plugins>
210
    </build>
211

    
212

    
213
  <profiles>
214
      <profile>
215
        <id>gvsig-plugin</id>
216
        <activation>
217
          <file>
218
            <exists>buildNumber.properties</exists>
219
          </file>
220
        </activation>
221
        <build>
222
          <plugins>
223

    
224
            <plugin>
225
                <artifactId>maven-assembly-plugin</artifactId>
226
                <configuration>
227
                    <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
228
                    <appendAssemblyId>false</appendAssemblyId>
229
                </configuration>
230
                <executions>
231
                  <execution>
232
                    <id>gvsig-plugin-package</id>
233
                    <phase>package</phase>
234
                    <goals>
235
                        <goal>single</goal>
236
                    </goals>
237
                    <configuration>
238
                      <finalName>gvSIG-desktop-${gvsig.package.info.gvSIGVersion}-${project.artifactId}-${gvsig.package.info.version}-${buildNumber}-${gvsig.package.info.state}-${gvsig.package.info.operatingSystem}-${gvsig.package.info.architecture}-${gvsig.package.info.javaVM}.gvspkg</finalName>
239
                      <descriptors>
240
                        <descriptor>src/main/assembly/gvsig-plugin-package.xml</descriptor>
241
                      </descriptors>
242
                    </configuration>
243
                  </execution>
244
                </executions>
245
            </plugin>
246

    
247
            <plugin>
248
              <artifactId>maven-clean-plugin</artifactId>
249
              <configuration>
250
                <skip>false</skip>
251
                <failOnError>true</failOnError>
252
                <filesets>
253
                  <fileset>
254
                    <directory>${gvsig.product.folder.path}/gvSIG/extensiones/${project.artifactId}</directory>
255
                  </fileset>
256
                </filesets>
257
              </configuration>
258
              <executions>
259
                <execution>
260
                  <id>default-clean</id>
261
                  <phase>clean</phase>
262
                </execution>
263
              </executions>
264
            </plugin>
265

    
266
            <plugin>
267
              <groupId>org.codehaus.gmaven</groupId>
268
              <artifactId>gmaven-plugin</artifactId>
269
              <executions>
270

    
271
                <execution>
272
                  <id>increase-build-number</id>
273
                  <phase>process-sources</phase>
274
                  <goals>
275
                    <goal>execute</goal>
276
                  </goals>
277
                  <configuration>
278
                    <source><![CDATA[
279
                      // use "mvn -Dincrease-build-number process-sources" 
280
                      if( project.properties["increase-build-number"] != null ) {
281
                              File file = new File(project.basedir,"buildNumber.properties")
282
                              if( ! file.exists() ) {
283
                            log.info("Skip increment build number (buildNumber.property not present).")
284
                          } else {
285
                                Properties props = new Properties()
286
                                
287
                                props.load(file.newDataInputStream())
288
                                value = (props.getProperty("buildNumber") as int) + 1
289
                                props.setProperty("buildNumber",value as String)
290
                                props.store(file.newWriter(), null)
291
                                log.info("Setting build number to " + value)
292
                              }
293
                      }
294
                    ]]></source>
295
                  </configuration>
296
                </execution>
297

    
298
                <execution>
299
                  <id>build-package-info</id>
300
                  <phase>prepare-package</phase>
301
                  <goals>
302
                    <goal>execute</goal>
303
                  </goals>
304
                  <configuration>
305
                    <source><![CDATA[
306
                        if( project.properties["buildNumber"] == null) {
307
                          log.info("Skip build package.info (buildNumber.property not present).")
308
                          log.info("Skip build package.info index (buildNumber.property not present).")
309
                        } else {
310
                          package_info_file  = new File(project.basedir, "target/package.info")
311
                          log.info("Building package.info : " + package_info_file.getAbsolutePath())
312
                          Properties props = new Properties()
313
                          props.setProperty('code', project.artifactId)
314
                          props.setProperty('code-alias', project.properties["gvsig.package.info.codealias"])
315
                          props.setProperty('name', project.name)
316
                          props.setProperty('version', project.properties["gvsig.package.info.version"])
317
                          props.setProperty('description', project.description)
318
                          props.setProperty('owner', project.properties["gvsig.package.info.owner"])
319
                          props.setProperty('java-version', project.properties["gvsig.package.info.javaVM"])
320
                          props.setProperty('official', project.properties["gvsig.package.info.official"])
321
                          props.setProperty('type', "plugin")
322
                          props.setProperty('state', project.properties["gvsig.package.info.state"])
323
                          props.setProperty('operating-system', project.properties["gvsig.package.info.operatingSystem"])
324
                          props.setProperty('dependencies', project.properties["gvsig.package.info.dependencies"])
325
                          props.setProperty('sources-url', project.properties["gvsig.package.info.sourcesURL"])
326
                          props.setProperty('web-url', project.properties["gvsig.package.info.webURL"])
327
                          props.setProperty('architecture', project.properties["gvsig.package.info.architecture"])
328
                          props.setProperty('model-version', '1.0.1')
329
                          props.setProperty('categories', project.properties["gvsig.package.info.categories"])
330
                          props.setProperty('buildNumber', project.properties["buildNumber"])
331
                          props.setProperty('gvSIG-version', project.properties["gvsig.package.info.gvSIGVersion"])
332

    
333
                          props.store(package_info_file.newWriter(), null)
334

    
335
                          pkgname = "gvSIG-desktop-" + 
336
                            project.properties["gvsig.package.info.gvSIGVersion"] + "-" + 
337
                            project.artifactId + "-" + 
338
                            project.properties["gvsig.package.info.version"] + "-" + 
339
                            project.properties["buildNumber"] + "-" + 
340
                            project.properties["gvsig.package.info.state"] + "-" + 
341
                            project.properties["gvsig.package.info.operatingSystem"] + "-" + 
342
                            project.properties["gvsig.package.info.architecture"] + "-" + 
343
                            project.properties["gvsig.package.info.javaVM"]
344
                          package_info_file  = new File(project.basedir, "target/gvspki/"+project.artifactId+"/package.info")
345
                          log.info("Building package.info index " + package_info_file.getAbsolutePath())
346
                          package_info_file.getParentFile().mkdirs()
347
                          props.setProperty('download-url', 
348
                            project.properties["gvsig.package.info.poolURL"] + "/" +
349
                            project.artifactId + "/" +
350
                            pkgname + ".gvspki"
351
                          )
352
                          props.store(package_info_file.newWriter(), null)
353
                        }
354
                    ]]></source>
355
                  </configuration>
356
                </execution>
357

    
358
                <execution>
359
                  <id>build-package-index</id>
360
                  <phase>package</phase>
361
                  <goals>
362
                    <goal>execute</goal>
363
                  </goals>
364
                  <configuration>
365
                    <source><![CDATA[
366
                      ant = new AntBuilder()
367
                      if( project.properties["buildNumber"] == null) {
368
                        log.info("Skip building package index (buildNumber.property not present).")
369
                      } else {
370
                        pkgname = "gvSIG-desktop-" + 
371
                          project.properties["gvsig.package.info.gvSIGVersion"] + "-" + 
372
                          project.artifactId + "-" + 
373
                          project.properties["gvsig.package.info.version"] + "-" + 
374
                          project.properties["buildNumber"] + "-" + 
375
                          project.properties["gvsig.package.info.state"] + "-" + 
376
                          project.properties["gvsig.package.info.operatingSystem"] + "-" + 
377
                          project.properties["gvsig.package.info.architecture"] + "-" + 
378
                          project.properties["gvsig.package.info.javaVM"]
379

    
380
                        log.info("Building package index " + pkgname + ".gvspki")
381
                        package_index_source  = project.basedir.getAbsolutePath() + "/target/gvspki"
382
                        package_index_target  = project.basedir.getAbsolutePath() + "/target/" + pkgname + ".gvspki"
383
                        ant.zip(destfile: package_index_target, basedir: package_index_source)
384
                      }
385
                    ]]></source>
386
                  </configuration>
387
                </execution>
388

    
389
                <execution>
390
                  <id>install-plugin</id>
391
                  <phase>install</phase>
392
                  <goals>
393
                    <goal>execute</goal>
394
                  </goals>
395
                  <configuration>
396
                    <source><![CDATA[
397
                      ant = new AntBuilder()
398
                      pkgname = "gvSIG-desktop-" + 
399
                        project.properties["gvsig.package.info.gvSIGVersion"] + "-" + 
400
                        project.artifactId + "-" + 
401
                        project.properties["gvsig.package.info.version"] + "-" + 
402
                        project.properties["buildNumber"] + "-" + 
403
                        project.properties["gvsig.package.info.state"] + "-" + 
404
                        project.properties["gvsig.package.info.operatingSystem"] + "-" + 
405
                        project.properties["gvsig.package.info.architecture"] + "-" + 
406
                        project.properties["gvsig.package.info.javaVM"]
407

    
408
                      source = project.basedir.getAbsolutePath() + "/target/" + pkgname + ".gvspkg.zip"
409
                      target = project.properties["gvsig.product.folder.path"] + "/gvSIG/extensiones/"
410

    
411
                      log.info("Install plugin to " + target)
412
                      ant.unzip(src: source, dest: target)
413

    
414
                      target = new File(project.properties["gvsig.product.folder.path"] + 
415
                        "/install/" + 
416
                        project.artifactId + "/" +
417
                        pkgname + ".gvspkg")
418
                      target.getParentFile().mkdirs()
419

    
420
                      log.info("Copy plugin package from " + source + " to " + target)
421
                      ant.copy(file:source, tofile:target.getAbsolutePath())
422

    
423
                      source  = project.basedir.getAbsolutePath() + "/target/" + pkgname + ".gvspki"
424
                      target = project.properties["gvsig.product.folder.path"] + 
425
                        "/install/" + 
426
                        project.artifactId + "/" +
427
                        pkgname + ".gvspki"
428
                      log.info("Copy plugin package index from " + source + " to " + target)
429
                      ant.copy(file:source, tofile:target)
430

    
431
                    ]]></source>
432
                  </configuration>
433
                </execution>
434

    
435
              </executions>
436
            </plugin>
437

    
438
          </plugins>
439
        </build>
440
      </profile>
441

    
442
  </profiles>
443

    
444
    <modules>
445
      <module>org.gvsig.app</module>
446
      <module>org.gvsig.coreplugin.app</module>
447
      <module>org.gvsig.centerviewpoint.app</module>
448
      <module>org.gvsig.app.document.table.app</module>
449
      <module>org.gvsig.geometrymeasurement.app</module>
450
      <module>org.gvsig.datalocator.app</module>
451
      <module>org.gvsig.help.app</module>
452
      <module>org.gvsig.selectiontools.app</module>
453
      <module>org.gvsig.i18n.app</module>
454
      <module>org.gvsig.symbology.app</module>
455
      <module>org.gvsig.geodb.app</module>
456
      <module>org.gvsig.annotation.app</module>
457
      <module>org.gvsig.daltransform.app</module>
458
      <module>org.gvsig.exportto.app</module>
459
      <module>org.gvsig.editing.app</module>
460
      <module>org.gvsig.installer.app</module>
461
      <module>org.gvsig.newlayer.app</module>
462
      <module>org.gvsig.mkmvnproject.app</module>
463
    </modules>
464

    
465
</project>