Statistics
| Revision:

gvsig-tools / org.gvsig.maven.base / trunk / org.gvsig.maven.base / org.gvsig.maven.base.extension.pom / pom.xml @ 323

History | View | Annotate | Download (12.2 KB)

1
<?xml version="1.0" encoding="ISO-8859-1"?>
2

    
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5

    
6
    <modelVersion>4.0.0</modelVersion>
7
    <artifactId>org.gvsig.maven.base.extension.pom</artifactId>
8
    <packaging>pom</packaging>
9
    <name>org.gvsig.maven.base.extension.pom</name>
10
    <description> Base POM for all GvSIG extension projects. This pom knows
11
                how to build and made an extension for GvSIG. The property
12
                "build-dir" must be set up correctly.</description>
13

    
14
    <parent>
15
        <groupId>org.gvsig</groupId>
16
        <artifactId>org.gvsig.maven.base.pom</artifactId>
17
        <version>1.0.6-SNAPSHOT</version>
18
    </parent>
19
    <distributionManagement>
20
        <site>
21
            <id>gvsig-repository</id>
22
            <url>${site-repository}/</url>
23
        </site>
24
    </distributionManagement>
25

    
26
    <properties>
27
        <!-- Name of the folder where andami looks for plugins -->
28
        <extensions.dir.name>gvSIG/extensiones</extensions.dir.name>
29
        <!-- Name of the folder where andami can find the plugin for the 
30
            current extension -->
31
        <extension.install.dir.name>${extensions.dir.name}/${project.artifactId}</extension.install.dir.name>
32
        <!-- Name of the folder where andami can find the plugin for the 
33
            appgvSIG extensions -->
34
        <gvsig.extension.install.dir.name>${extensions.dir.name}/org.gvsig.app/</gvsig.extension.install.dir.name>
35

    
36
        <!-- Absolute gvSIG extensions installation folder -->
37
        <gvsig.extensions.dir>${gvsig.install.dir}/${extensions.dir.name}</gvsig.extensions.dir>
38
        <!-- Absolute current extension installation folder into gvSIG -->
39
        <extension.install.dir>${gvsig.install.dir}/${extension.install.dir.name}</extension.install.dir>
40
        <!-- Maven assembly plugin configuration file for the current extension, 
41
            relative to the extension folder. -->
42
        <extension.distribution.file>
43
            distribution/distribution.xml
44
                </extension.distribution.file>
45
        <!-- Extension installation library dependencies folder -->
46
        <library-dir>lib</library-dir>
47
    </properties>
48

    
49
    <profiles>
50
        <profile>
51
            <id>install-extension</id>
52
            <activation>
53
                <activeByDefault>true</activeByDefault>
54
                <property>
55
                    <name>install-extension</name>
56
                </property>
57
            </activation>
58
            <build>
59
                <plugins>
60
                    <!-- This plugin configuration is duplicated in the create-installer 
61
                        profile, because of ordering issues, as it must be run before the org.gvsig.installer.maven 
62
                        plugin -->
63
                    <plugin>
64
                        <artifactId>maven-assembly-plugin
65
                                                </artifactId>
66
                        <configuration>
67
                            <descriptors>
68
                                <descriptor>${extension.distribution.file}</descriptor>
69
                            </descriptors>
70
                            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
71
                            <appendAssemblyId>true</appendAssemblyId>
72
                        </configuration>
73
                        <executions>
74
                            <execution>
75
                                <id>make-assembly</id><!-- this is used for 
76
                                    inheritance merges -->
77
                                <phase>install</phase><!-- append to the 
78
                                    packaging phase. -->
79
                                <goals>
80
                                    <goal>attached</goal>
81
                                </goals>
82
                            </execution>
83
                        </executions>
84
                    </plugin>
85
                    <!-- This plugin configuration is duplicated in the create-installer 
86
                        profile, because of ordering issues, as it must be run before the org.gvsig.installer.maven 
87
                        plugin -->
88
                    <plugin>
89
                        <artifactId>maven-antrun-plugin</artifactId>
90
                        <executions>
91
                            <execution>
92
                                <id>copy-to-andami</id>
93
                                <phase>install</phase>
94
                                <configuration>
95
                                    <tasks>
96
                                        <property name="project.packaging"
97
                                            value="${project.packaging}" />
98
                                        <property name="gvsig.install.dir"
99
                                            value="${gvsig.install.dir}" />
100
                                        <property
101
                                            name="distribution-final-name"
102
                                            value="${project.build.finalName}" />
103
                                        <ant
104
                                            antfile="${base.tools.path}/ant/gvsig-extension-tasks.xml"
105
                                            target="make-extension-new"
106
                                            inheritRefs="true" />
107
                                    </tasks>
108
                                </configuration>
109
                                <goals>
110
                                    <goal>run</goal>
111
                                </goals>
112
                            </execution>
113
                        </executions>
114
                    </plugin>
115
                    <plugin>
116
                        <artifactId>maven-clean-plugin</artifactId>
117
                        <configuration>
118
                            <filesets>
119
                                <fileset>
120
                                    <directory>${extension.install.dir}</directory>
121
                                    <includes>
122
                                        <include>**</include>
123
                                    </includes>
124
                                </fileset>
125
                            </filesets>
126
                        </configuration>
127
                    </plugin>
128
                </plugins>
129
            </build>
130
        </profile>
131
        <profile>
132
            <id>create-installer</id>
133
            <build>
134
                <plugins>
135
                    <plugin>
136
                        <groupId>org.codehaus.mojo</groupId>
137
                        <artifactId>buildnumber-maven-plugin</artifactId>
138
                        <version>1.0-beta-2</version>
139
                        <executions>
140
                            <execution>
141
                                <phase>validate</phase>
142
                                <goals>
143
                                    <goal>create</goal>
144
                                </goals>
145
                            </execution>
146
                        </executions>
147
                        <configuration>
148
                            <format>{0,number,#}</format>
149
                            <items>
150
                                <item>buildNumber</item>
151
                            </items>
152
                            <doCheck>false</doCheck>
153
                            <doUpdate>false</doUpdate>
154
                        </configuration>
155
                    </plugin>
156
                    <!-- This plugin configuration is duplicated in the install-extension 
157
                        profile, because of ordering issues, as it must be run before the org.gvsig.installer.maven 
158
                        plugin -->
159
                    <plugin>
160
                        <artifactId>maven-assembly-plugin
161
                        </artifactId>
162
                        <configuration>
163
                            <descriptors>
164
                                <descriptor>${extension.distribution.file}</descriptor>
165
                            </descriptors>
166
                            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
167
                            <appendAssemblyId>true</appendAssemblyId>
168
                        </configuration>
169
                        <executions>
170
                            <execution>
171
                                <id>make-assembly</id><!-- this is used for 
172
                                    inheritance merges -->
173
                                <phase>install</phase><!-- append to the 
174
                                    packaging phase. -->
175
                                <goals>
176
                                    <goal>attached</goal>
177
                                </goals>
178
                            </execution>
179
                        </executions>
180
                    </plugin>
181
                    <!-- This plugin configuration is duplicated in the install-extension 
182
                        profile, because of ordering issues, as it must be run before the org.gvsig.installer.maven 
183
                        plugin -->
184
                    <plugin>
185
                        <artifactId>maven-antrun-plugin</artifactId>
186
                        <executions>
187
                            <execution>
188
                                <id>copy-to-andami</id>
189
                                <phase>install</phase>
190
                                <configuration>
191
                                    <tasks>
192
                                        <property name="project.packaging"
193
                                            value="${project.packaging}" />
194
                                        <property name="gvsig.install.dir"
195
                                            value="${gvsig.install.dir}" />
196
                                        <property
197
                                            name="distribution-final-name"
198
                                            value="${project.build.finalName}" />
199
                                        <ant
200
                                            antfile="${base.tools.path}/ant/gvsig-extension-tasks.xml"
201
                                            target="make-extension-new"
202
                                            inheritRefs="true" />
203
                                    </tasks>
204
                                </configuration>
205
                                <goals>
206
                                    <goal>run</goal>
207
                                </goals>
208
                            </execution>
209
                        </executions>
210
                    </plugin>
211
                    <!-- Create the package.info file for the plugin and 
212
                        installer info in the compile phase, and create the plugin installer in the 
213
                        install phase. -->
214
                    <plugin>
215
                        <groupId>org.gvsig</groupId>
216
                        <artifactId>org.gvsig.installer.maven</artifactId>
217
                        <configuration>
218
                            <pluginsFolder>${gvsig.install.dir}/gvSIG/extensiones</pluginsFolder>
219
                            <bundleFolder>${gvsig.install.dir}/install</bundleFolder>
220
                            <buildNumber>${buildNumber}</buildNumber>
221
                            <state>devel</state>
222
                            <official>true</official>
223
                            <operatingSystem>all</operatingSystem>
224
                            <architecture>all</architecture>
225
                            <javaVM>j1_5</javaVM>
226
                            <gvSIGVersion>2.0.0</gvSIGVersion>
227
                        </configuration>
228
                        <executions>
229
                            <execution>
230
                                <id>write-info</id>
231
                                <phase>compile</phase>
232
                                <goals>
233
                                    <goal>write-info</goal>
234
                                </goals>
235
                            </execution>
236
                            <execution>
237
                                <id>create-installer</id>
238
                                <phase>install</phase>
239
                                <goals>
240
                                    <goal>create-installer</goal>
241
                                </goals>
242
                            </execution>
243
                        </executions>
244
                    </plugin>
245
                </plugins>
246
            </build>
247
        </profile>
248
    </profiles>
249
</project>