Statistics
| Revision:

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

History | View | Annotate | Download (20.4 KB)

1 40435 jjdelcerro
<?xml version="1.0" encoding="UTF-8"?>
2 40510 jjdelcerro
<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 40435 jjdelcerro
    <modelVersion>4.0.0</modelVersion>
4
    <artifactId>org.gvsig.desktop.plugin</artifactId>
5
    <packaging>pom</packaging>
6
    <name>${project.artifactId}</name>
7
    <description>
8
      Base POM for all gvSIG plugins projects.
9
      This pom knows how to build and made a plugin for gvSIG.
10
      The property "gvsig.product.folder.path" must be set up correctly.
11
    </description>
12
    <parent>
13
        <groupId>org.gvsig</groupId>
14
        <artifactId>org.gvsig.desktop</artifactId>
15 40510 jjdelcerro
        <version>2.0.10</version>
16 40435 jjdelcerro
    </parent>
17
18
    <dependencyManagement>
19
        <dependencies>
20
21
          <dependency>
22
            <groupId>org.gvsig</groupId>
23
            <artifactId>org.gvsig.app.mainplugin</artifactId>
24 40510 jjdelcerro
            <version>2.0.10</version>
25 40435 jjdelcerro
            <scope>provided</scope>
26
          </dependency>
27
          <dependency>
28
            <groupId>org.gvsig</groupId>
29
            <artifactId>org.gvsig.annotation.app.mainplugin</artifactId>
30 40510 jjdelcerro
            <version>2.0.10</version>
31 40435 jjdelcerro
            <scope>provided</scope>
32
          </dependency>
33
          <dependency>
34
            <groupId>org.gvsig</groupId>
35
            <artifactId>org.gvsig.app.document.table.app.mainplugin</artifactId>
36 40510 jjdelcerro
            <version>2.0.10</version>
37 40435 jjdelcerro
            <scope>provided</scope>
38
          </dependency>
39
          <dependency>
40
            <groupId>org.gvsig</groupId>
41
            <artifactId>org.gvsig.centerviewpoint.app.mainplugin</artifactId>
42 40510 jjdelcerro
            <version>2.0.10</version>
43 40435 jjdelcerro
            <scope>provided</scope>
44
          </dependency>
45
          <dependency>
46
            <groupId>org.gvsig</groupId>
47
            <artifactId>org.gvsig.coreplugin.app.mainplugin</artifactId>
48 40510 jjdelcerro
            <version>2.0.10</version>
49 40435 jjdelcerro
            <scope>provided</scope>
50
          </dependency>
51
          <dependency>
52
            <groupId>org.gvsig</groupId>
53
            <artifactId>org.gvsig.daltransform.app.mainplugin</artifactId>
54 40510 jjdelcerro
            <version>2.0.10</version>
55 40435 jjdelcerro
            <scope>provided</scope>
56
          </dependency>
57
          <dependency>
58
            <groupId>org.gvsig</groupId>
59
            <artifactId>org.gvsig.datalocator.app.mainplugin</artifactId>
60 40510 jjdelcerro
            <version>2.0.10</version>
61 40435 jjdelcerro
            <scope>provided</scope>
62
          </dependency>
63
          <dependency>
64
            <groupId>org.gvsig</groupId>
65
            <artifactId>org.gvsig.editing.app.mainplugin</artifactId>
66 40510 jjdelcerro
            <version>2.0.10</version>
67 40435 jjdelcerro
            <scope>provided</scope>
68
          </dependency>
69
          <dependency>
70
            <groupId>org.gvsig</groupId>
71
            <artifactId>org.gvsig.exportto.app.mainplugin</artifactId>
72 40510 jjdelcerro
            <version>2.0.10</version>
73 40435 jjdelcerro
            <scope>provided</scope>
74
          </dependency>
75
          <dependency>
76
            <groupId>org.gvsig</groupId>
77
            <artifactId>org.gvsig.geodb.app.mainplugin</artifactId>
78 40510 jjdelcerro
            <version>2.0.10</version>
79 40435 jjdelcerro
            <scope>provided</scope>
80
          </dependency>
81
          <dependency>
82
            <groupId>org.gvsig</groupId>
83
            <artifactId>org.gvsig.mkmvnproject.app.mainplugin</artifactId>
84 40510 jjdelcerro
            <version>2.0.10</version>
85 40435 jjdelcerro
            <scope>provided</scope>
86
          </dependency>
87
          <dependency>
88
            <groupId>org.gvsig</groupId>
89
            <artifactId>org.gvsig.installer.app.mainplugin</artifactId>
90 40510 jjdelcerro
            <version>2.0.10</version>
91 40435 jjdelcerro
            <scope>provided</scope>
92
          </dependency>
93
          <dependency>
94
            <groupId>org.gvsig</groupId>
95
            <artifactId>org.gvsig.symbology.app.mainplugin</artifactId>
96 40508 jjdelcerro
            <version>2.0.10-SNAPSHOT</version>
97 40435 jjdelcerro
            <scope>provided</scope>
98
          </dependency>
99
          <dependency>
100
            <groupId>org.gvsig</groupId>
101
            <artifactId>org.gvsig.i18n.app.mainplugin</artifactId>
102 40510 jjdelcerro
            <version>2.0.10</version>
103 40435 jjdelcerro
            <scope>provided</scope>
104
          </dependency>
105
          <dependency>
106
            <groupId>org.gvsig</groupId>
107
            <artifactId>org.gvsig.selectiontools.app.mainplugin</artifactId>
108 40510 jjdelcerro
            <version>2.0.10</version>
109 40435 jjdelcerro
            <scope>provided</scope>
110
          </dependency>
111
          <dependency>
112
            <groupId>org.gvsig</groupId>
113
            <artifactId>org.gvsig.geometrymeasurement.app.mainplugin</artifactId>
114 40510 jjdelcerro
            <version>2.0.10</version>
115 40435 jjdelcerro
            <scope>provided</scope>
116
          </dependency>
117
          <dependency>
118
            <groupId>org.gvsig</groupId>
119
            <artifactId>org.gvsig.newlayer.app.mainplugin</artifactId>
120 40510 jjdelcerro
            <version>2.0.10</version>
121 40435 jjdelcerro
            <scope>provided</scope>
122
          </dependency>
123
          <dependency>
124
            <groupId>org.gvsig</groupId>
125
            <artifactId>org.gvsig.help.app.mainplugin</artifactId>
126 40510 jjdelcerro
            <version>2.0.10</version>
127 40435 jjdelcerro
            <scope>provided</scope>
128
          </dependency>
129
130
        </dependencies>
131
    </dependencyManagement>
132
133
    <properties>
134
        <!-- Package info property values -->
135 40510 jjdelcerro
        <gvsig.package.info.codealias />
136 40487 jjdelcerro
        <gvsig.package.info.version>${project.version}</gvsig.package.info.version>
137 40435 jjdelcerro
        <gvsig.package.info.state>devel</gvsig.package.info.state>
138
        <gvsig.package.info.official>false</gvsig.package.info.official>
139
        <gvsig.package.info.operatingSystem>all</gvsig.package.info.operatingSystem>
140
        <gvsig.package.info.architecture>all</gvsig.package.info.architecture>
141
        <gvsig.package.info.javaVM>j1_5</gvsig.package.info.javaVM>
142 40464 jjdelcerro
        <gvsig.package.info.gvSIGVersion>2.1.0</gvsig.package.info.gvSIGVersion>
143 40435 jjdelcerro
        <gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.0.1</gvsig.package.info.dependencies>
144
        <gvsig.package.info.owner>gvSIG Association</gvsig.package.info.owner>
145
        <gvsig.package.info.sourcesURL>${project.scm.url}</gvsig.package.info.sourcesURL>
146
        <gvsig.package.info.webURL>http://www.gvsig.com</gvsig.package.info.webURL>
147 40510 jjdelcerro
        <gvsig.package.info.categories />
148 40457 jjdelcerro
        <gvsig.package.info.poolURL>http://downloads.gvsig.org/download/gvsig-desktop/pool</gvsig.package.info.poolURL>
149 40435 jjdelcerro
    </properties>
150
151
    <dependencies>
152
      <dependency>
153 40457 jjdelcerro
          <groupId>org.slf4j</groupId>
154
          <artifactId>slf4j-api</artifactId>
155
          <scope>provided</scope>
156
      </dependency>
157
      <dependency>
158
          <groupId>org.slf4j</groupId>
159
          <artifactId>slf4j-log4j12</artifactId>
160
          <scope>provided</scope>
161
      </dependency>
162
      <dependency>
163 40435 jjdelcerro
        <groupId>org.gvsig</groupId>
164
        <artifactId>org.gvsig.andami</artifactId>
165
        <scope>provided</scope>
166
      </dependency>
167
      <dependency>
168
        <groupId>org.gvsig</groupId>
169
        <artifactId>org.gvsig.tools.lib</artifactId>
170
        <scope>provided</scope>
171
      </dependency>
172
    </dependencies>
173
174
175
    <build>
176
      <plugins>
177 40457 jjdelcerro
178
            <plugin>
179
              <!-- load ".gvsig-devel.properties" -->
180
              <groupId>org.codehaus.mojo</groupId>
181
              <artifactId>properties-maven-plugin</artifactId>
182 40435 jjdelcerro
              <configuration>
183 40457 jjdelcerro
                  <files>
184
                      <!-- Define gvsig.product.folder.path in this property -->
185
                      <file>${user.home}/.gvsig-devel.properties</file>
186
                      <file>${project.basedir}/gvsig-devel.properties</file>
187
                      <file>buildNumber.properties</file>
188
                  </files>
189
                  <quiet>true</quiet>
190 40435 jjdelcerro
              </configuration>
191
              <executions>
192 40457 jjdelcerro
                  <execution>
193
                            <id>default</id>
194
                      <phase>prepare-package</phase>
195
                      <goals>
196
                          <goal>read-project-properties</goal>
197
                      </goals>
198
                  </execution>
199
                  <execution>
200
                          <id>default-clean</id>
201
                    <phase>pre-clean</phase>
202
                    <goals>
203
                        <goal>read-project-properties</goal>
204
                    </goals>
205
                </execution>
206
              </executions>
207
            </plugin>
208
209
210
        </plugins>
211
    </build>
212
213
214
  <profiles>
215
      <profile>
216
        <id>gvsig-plugin</id>
217
        <activation>
218
          <file>
219
            <exists>buildNumber.properties</exists>
220
          </file>
221
        </activation>
222
        <build>
223
          <plugins>
224
225
            <plugin>
226
                <artifactId>maven-assembly-plugin</artifactId>
227
                <configuration>
228
                    <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
229
                    <appendAssemblyId>false</appendAssemblyId>
230
                </configuration>
231
                <executions>
232
                  <execution>
233
                    <id>gvsig-plugin-package</id>
234
                    <phase>package</phase>
235
                    <goals>
236
                        <goal>single</goal>
237
                    </goals>
238
                    <configuration>
239 40487 jjdelcerro
                      <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>
240 40457 jjdelcerro
                      <descriptors>
241
                        <descriptor>src/main/assembly/gvsig-plugin-package.xml</descriptor>
242
                      </descriptors>
243
                    </configuration>
244
                  </execution>
245
                </executions>
246
            </plugin>
247
248
            <plugin>
249
              <artifactId>maven-clean-plugin</artifactId>
250
              <configuration>
251
                <skip>false</skip>
252
                <failOnError>true</failOnError>
253
                <filesets>
254
                  <fileset>
255
                    <directory>${gvsig.product.folder.path}/gvSIG/extensiones/${project.artifactId}</directory>
256
                  </fileset>
257
                </filesets>
258
              </configuration>
259
              <executions>
260 40435 jjdelcerro
                <execution>
261 40457 jjdelcerro
                  <id>default-clean</id>
262
                  <phase>clean</phase>
263
                </execution>
264
              </executions>
265
            </plugin>
266
267
            <plugin>
268
              <groupId>org.codehaus.gmaven</groupId>
269
              <artifactId>gmaven-plugin</artifactId>
270
              <executions>
271 40464 jjdelcerro
272 40457 jjdelcerro
                <execution>
273 40464 jjdelcerro
                  <id>release</id>
274
                  <phase>install</phase>
275
                  <goals>
276
                    <goal>execute</goal>
277
                  </goals>
278
                  <configuration>
279
                    <source><![CDATA[
280
                      // use "mvn -Drelease install"
281
                      if( project.properties["release"] != null ) {
282
                        log.info("Increase build number.")
283
                        Properties props = new Properties()
284
                        File file = new File(project.basedir,"buildNumber.properties")
285
                        props.load(file.newDataInputStream())
286
                        value = (props.getProperty("buildNumber") as int) + 1
287
                        props.setProperty("buildNumber",value as String)
288
                        props.store(file.newWriter(), null)
289
                      }
290
                    ]]></source>
291
                  </configuration>
292
                </execution>
293
294
                <execution>
295 40457 jjdelcerro
                  <id>build-package-info</id>
296
                  <phase>prepare-package</phase>
297
                  <goals>
298
                    <goal>execute</goal>
299
                  </goals>
300
                  <configuration>
301
                    <source><![CDATA[
302
                        if( project.properties["buildNumber"] == null) {
303
                          log.info("Skip build package.info (buildNumber.property not present).")
304
                          log.info("Skip build package.info index (buildNumber.property not present).")
305
                        } else {
306
                          package_info_file  = new File(project.basedir, "target/package.info")
307
                          log.info("Building package.info : " + package_info_file.getAbsolutePath())
308
                          Properties props = new Properties()
309
                          props.setProperty('code', project.artifactId)
310 40487 jjdelcerro
                          props.setProperty('code-alias', project.properties["gvsig.package.info.codealias"])
311 40457 jjdelcerro
                          props.setProperty('name', project.name)
312 40487 jjdelcerro
                          props.setProperty('version', project.properties["gvsig.package.info.version"])
313 40457 jjdelcerro
                          props.setProperty('description', project.description)
314
                          props.setProperty('owner', project.properties["gvsig.package.info.owner"])
315
                          props.setProperty('java-version', project.properties["gvsig.package.info.javaVM"])
316
                          props.setProperty('official', project.properties["gvsig.package.info.official"])
317
                          props.setProperty('type', "plugin")
318
                          props.setProperty('state', project.properties["gvsig.package.info.state"])
319
                          props.setProperty('operating-system', project.properties["gvsig.package.info.operatingSystem"])
320
                          props.setProperty('dependencies', project.properties["gvsig.package.info.dependencies"])
321
                          props.setProperty('sources-url', project.properties["gvsig.package.info.sourcesURL"])
322
                          props.setProperty('web-url', project.properties["gvsig.package.info.webURL"])
323
                          props.setProperty('architecture', project.properties["gvsig.package.info.architecture"])
324
                          props.setProperty('model-version', '1.0.1')
325
                          props.setProperty('categories', project.properties["gvsig.package.info.categories"])
326
                          props.setProperty('buildNumber', project.properties["buildNumber"])
327
                          props.setProperty('gvSIG-version', project.properties["gvsig.package.info.gvSIGVersion"])
328
329
                          props.store(package_info_file.newWriter(), null)
330
331
                          pkgname = "gvSIG-desktop-" +
332
                            project.properties["gvsig.package.info.gvSIGVersion"] + "-" +
333
                            project.artifactId + "-" +
334 40487 jjdelcerro
                            project.properties["gvsig.package.info.version"] + "-" +
335 40457 jjdelcerro
                            project.properties["buildNumber"] + "-" +
336
                            project.properties["gvsig.package.info.state"] + "-" +
337
                            project.properties["gvsig.package.info.operatingSystem"] + "-" +
338
                            project.properties["gvsig.package.info.architecture"] + "-" +
339
                            project.properties["gvsig.package.info.javaVM"]
340
                          package_info_file  = new File(project.basedir, "target/gvspki/"+project.artifactId+"/package.info")
341
                          log.info("Building package.info index " + package_info_file.getAbsolutePath())
342
                          package_info_file.getParentFile().mkdirs()
343
                          props.setProperty('download-url',
344
                            project.properties["gvsig.package.info.poolURL"] + "/" +
345
                            project.artifactId + "/" +
346
                            pkgname + ".gvspki"
347
                          )
348
                          props.store(package_info_file.newWriter(), null)
349
                        }
350
                    ]]></source>
351
                  </configuration>
352
                </execution>
353
354
                <execution>
355
                  <id>build-package-index</id>
356 40435 jjdelcerro
                  <phase>package</phase>
357
                  <goals>
358 40457 jjdelcerro
                    <goal>execute</goal>
359 40435 jjdelcerro
                  </goals>
360
                  <configuration>
361 40457 jjdelcerro
                    <source><![CDATA[
362 40459 jjdelcerro
                      ant = new AntBuilder()
363 40457 jjdelcerro
                      if( project.properties["buildNumber"] == null) {
364
                        log.info("Skip building package index (buildNumber.property not present).")
365
                      } else {
366
                        pkgname = "gvSIG-desktop-" +
367
                          project.properties["gvsig.package.info.gvSIGVersion"] + "-" +
368
                          project.artifactId + "-" +
369 40487 jjdelcerro
                          project.properties["gvsig.package.info.version"] + "-" +
370 40457 jjdelcerro
                          project.properties["buildNumber"] + "-" +
371
                          project.properties["gvsig.package.info.state"] + "-" +
372
                          project.properties["gvsig.package.info.operatingSystem"] + "-" +
373
                          project.properties["gvsig.package.info.architecture"] + "-" +
374
                          project.properties["gvsig.package.info.javaVM"]
375
376
                        log.info("Building package index " + pkgname + ".gvspki")
377 40459 jjdelcerro
                        package_index_source  = project.basedir.getAbsolutePath() + "/target/gvspki"
378
                        package_index_target  = project.basedir.getAbsolutePath() + "/target/" + pkgname + ".gvspki"
379
                        ant.zip(destfile: package_index_target, basedir: package_index_source)
380 40457 jjdelcerro
                      }
381
                    ]]></source>
382 40435 jjdelcerro
                  </configuration>
383
                </execution>
384
385 40457 jjdelcerro
                <execution>
386
                  <id>install-plugin</id>
387
                  <phase>install</phase>
388
                  <goals>
389
                    <goal>execute</goal>
390
                  </goals>
391
                  <configuration>
392
                    <source><![CDATA[
393 40459 jjdelcerro
                      ant = new AntBuilder()
394 40457 jjdelcerro
                      pkgname = "gvSIG-desktop-" +
395
                        project.properties["gvsig.package.info.gvSIGVersion"] + "-" +
396
                        project.artifactId + "-" +
397 40487 jjdelcerro
                        project.properties["gvsig.package.info.version"] + "-" +
398 40457 jjdelcerro
                        project.properties["buildNumber"] + "-" +
399
                        project.properties["gvsig.package.info.state"] + "-" +
400
                        project.properties["gvsig.package.info.operatingSystem"] + "-" +
401
                        project.properties["gvsig.package.info.architecture"] + "-" +
402
                        project.properties["gvsig.package.info.javaVM"]
403 40435 jjdelcerro
404 40457 jjdelcerro
                      source = project.basedir.getAbsolutePath() + "/target/" + pkgname + ".gvspkg.zip"
405
                      target = project.properties["gvsig.product.folder.path"] + "/gvSIG/extensiones/"
406
407
                      log.info("Install plugin to " + target)
408 40459 jjdelcerro
                      ant.unzip(src: source, dest: target)
409 40457 jjdelcerro
410
                      target = new File(project.properties["gvsig.product.folder.path"] +
411
                        "/install/" +
412
                        project.artifactId + "/" +
413
                        pkgname + ".gvspkg")
414
                      target.getParentFile().mkdirs()
415
416
                      log.info("Copy plugin package from " + source + " to " + target)
417 40459 jjdelcerro
                      ant.copy(file:source, tofile:target.getAbsolutePath())
418 40457 jjdelcerro
419
                      source  = project.basedir.getAbsolutePath() + "/target/" + pkgname + ".gvspki"
420
                      target = project.properties["gvsig.product.folder.path"] +
421
                        "/install/" +
422
                        project.artifactId + "/" +
423
                        pkgname + ".gvspki"
424
                      log.info("Copy plugin package index from " + source + " to " + target)
425 40459 jjdelcerro
                      ant.copy(file:source, tofile:target)
426 40457 jjdelcerro
427
                    ]]></source>
428
                  </configuration>
429
                </execution>
430
431 40435 jjdelcerro
              </executions>
432 40457 jjdelcerro
            </plugin>
433 40435 jjdelcerro
434 40457 jjdelcerro
          </plugins>
435
        </build>
436
      </profile>
437 40435 jjdelcerro
438 40457 jjdelcerro
  </profiles>
439
440 40435 jjdelcerro
    <modules>
441
      <module>org.gvsig.app</module>
442
      <module>org.gvsig.coreplugin.app</module>
443
      <module>org.gvsig.centerviewpoint.app</module>
444
      <module>org.gvsig.app.document.table.app</module>
445
      <module>org.gvsig.geometrymeasurement.app</module>
446
      <module>org.gvsig.datalocator.app</module>
447
      <module>org.gvsig.help.app</module>
448
      <module>org.gvsig.selectiontools.app</module>
449
      <module>org.gvsig.i18n.app</module>
450
      <module>org.gvsig.symbology.app</module>
451
      <module>org.gvsig.geodb.app</module>
452
      <module>org.gvsig.annotation.app</module>
453
      <module>org.gvsig.daltransform.app</module>
454
      <module>org.gvsig.exportto.app</module>
455
      <module>org.gvsig.editing.app</module>
456
      <module>org.gvsig.installer.app</module>
457
      <module>org.gvsig.newlayer.app</module>
458
      <module>org.gvsig.mkmvnproject.app</module>
459
    </modules>
460
461
</project>