pom.xml 51.6 KB
Newer Older
M
Mathieu Bastian 已提交
1 2 3 4
<?xml version="1.0" encoding="UTF-8"?>
<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">
    <modelVersion>4.0.0</modelVersion>
5 6
    
    <!-- Parent POM -->
M
Mathieu Bastian 已提交
7 8 9
    <parent>
        <groupId>org.gephi</groupId>
        <artifactId>gephi-parent</artifactId>
M
Mathieu Bastian 已提交
10
        <version>0.9.0</version>
11
        <relativePath>../..</relativePath>
M
Mathieu Bastian 已提交
12 13
    </parent>

M
Mathieu Bastian 已提交
14
    <artifactId>gephi</artifactId>
M
Mathieu Bastian 已提交
15 16 17
    <packaging>nbm-application</packaging>
    <name>gephi-app</name>

18
    <!-- Dependencies -->
M
Mathieu Bastian 已提交
19 20 21 22 23
    <dependencies>
        <dependency>
            <groupId>org.netbeans.cluster</groupId>
            <artifactId>platform</artifactId>
            <type>pom</type>
M
Mathieu Bastian 已提交
24 25 26 27 28 29 30 31 32 33 34 35 36
            <exclusions>
                <exclusion>
                    <artifactId>org-jdesktop-layout</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-api-search</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-api-visual</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
37
                <exclusion>
M
Mathieu Bastian 已提交
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
                    <artifactId>org-netbeans-core-execution</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-core-netigso</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-core-osgi</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-core-output2</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-libs-osgi</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-libs-felix</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-libs-jsr223</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-libs-testng</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
69 70 71 72
                <exclusion>
                    <artifactId>org-netbeans-libs-junit4</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
M
Mathieu Bastian 已提交
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
                <exclusion>
                    <artifactId>org-netbeans-modules-core-kit</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-modules-netbinox</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-openide-compat</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-openide-options</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-openide-util-enumerations</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-modules-editor-mimelookup-impl</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-modules-print</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-modules-favorites</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-modules-javahelp</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-modules-sampler</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-modules-spi-actions</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
                <exclusion>
                    <artifactId>org-netbeans-modules-junitlib</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-api-htmlui</artifactId>
                    <groupId>org.netbeans.api</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>org-netbeans-modules-templatesui</artifactId>
                    <groupId>org.netbeans.modules</groupId>
                </exclusion>
                <exclusion>
                    <groupId>org.netbeans.external</groupId>
                    <artifactId>net-java-html</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.netbeans.external</groupId>
                    <artifactId>net-java-html-boot</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.netbeans.external</groupId>
                    <artifactId>net-java-html-boot-fx</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.netbeans.external</groupId>
                    <artifactId>net-java-html-boot-script</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.netbeans.external</groupId>
                    <artifactId>net-java-html-geo</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.netbeans.external</groupId>
                    <artifactId>net-java-html-json</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.netbeans.external</groupId>
                    <artifactId>net-java-html-sound</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.netbeans.external</groupId>
                    <artifactId>org-netbeans-html-ko4j</artifactId>
                </exclusion>
M
Mathieu Bastian 已提交
161
            </exclusions>
M
Mathieu Bastian 已提交
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>gephi-branding</artifactId>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-modules-nbjunit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>utils-longtask</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>project-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>graph-api</artifactId>
        </dependency>
184
        <dependency>
M
Mathieu Bastian 已提交
185
            <groupId>${project.groupId}</groupId>
186
            <artifactId>io-exporter-api</artifactId>
187 188
        </dependency>
        <dependency>
M
Mathieu Bastian 已提交
189 190
            <groupId>${project.groupId}</groupId>
            <artifactId>preview-api</artifactId>
191
        </dependency>
192
        <dependency>
M
Mathieu Bastian 已提交
193
            <groupId>${project.groupId}</groupId>
194
            <artifactId>io-exporter-preview</artifactId>
195
        </dependency>
M
Mathieu Bastian 已提交
196 197
        <dependency>
            <groupId>${project.groupId}</groupId>
198
            <artifactId>lib.validation</artifactId>
M
Mathieu Bastian 已提交
199
        </dependency>
200
        <dependency>
M
Mathieu Bastian 已提交
201 202
            <groupId>${project.groupId}</groupId>
            <artifactId>preview-export-ui</artifactId>
203
        </dependency>
M
Mathieu Bastian 已提交
204 205 206 207
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>utils</artifactId>
        </dependency>
208
        <dependency>
M
Mathieu Bastian 已提交
209 210
            <groupId>${project.groupId}</groupId>
            <artifactId>datalab-api</artifactId>
211
        </dependency>
M
Mathieu Bastian 已提交
212 213 214 215
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>visualization-api</artifactId>
        </dependency>
216
        <dependency>
M
Mathieu Bastian 已提交
217 218
            <groupId>${project.groupId}</groupId>
            <artifactId>preview-plugin</artifactId>
219
        </dependency>
M
Mathieu Bastian 已提交
220 221 222 223 224 225
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>db-drivers</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
226
            <artifactId>io-importer-api</artifactId>
M
Mathieu Bastian 已提交
227 228 229
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
230
            <artifactId>io-processor-plugin</artifactId>
M
Mathieu Bastian 已提交
231 232 233 234 235 236 237 238 239 240 241
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>processor-plugin-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>project-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
242
            <artifactId>ui-utils</artifactId>
M
Mathieu Bastian 已提交
243 244 245 246 247 248 249 250 251
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>ui-components</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>settings-upgrader</artifactId>
        </dependency>
252 253 254 255 256 257 258 259 260 261 262 263
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>statistics-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>statistics-plugin</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>statistics-plugin-ui</artifactId>
        </dependency>
264 265 266 267
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>timeline-api</artifactId>
        </dependency>
M
Mathieu Bastian 已提交
268 269 270
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>tools-api</artifactId>
271
        </dependency>       
M
Mathieu Bastian 已提交
272 273 274
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>algorithms-plugin</artifactId>
275
        </dependency>
M
Mathieu Bastian 已提交
276 277 278 279 280 281 282 283 284 285 286 287 288 289
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>gleem</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>mostrecentfiles-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-project</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
290
            <artifactId>visualization</artifactId>
M
Mathieu Bastian 已提交
291
        </dependency>
E
Eduardo Ramos 已提交
292
        <dependency>
M
Mathieu Bastian 已提交
293 294
            <groupId>${project.groupId}</groupId>
            <artifactId>tools-plugin</artifactId>
E
Eduardo Ramos 已提交
295
        </dependency>
M
Mathieu Bastian 已提交
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>welcome-screen</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-context</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-progress</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-branding</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>layout-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
318
            <artifactId>io-generator-api</artifactId>
M
Mathieu Bastian 已提交
319 320 321
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
322
            <artifactId>io-generator-plugin</artifactId>
M
Mathieu Bastian 已提交
323 324 325 326 327
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>generator-plugin-ui</artifactId>
        </dependency>
M
Mathieu Bastian 已提交
328
        <dependency>
M
Mathieu Bastian 已提交
329
            <groupId>${project.groupId}</groupId>
330
            <artifactId>io-exporter-plugin</artifactId>
M
Mathieu Bastian 已提交
331
        </dependency>
M
Mathieu Bastian 已提交
332 333 334
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-statistics</artifactId>
335
        </dependency>
336
        <dependency>
M
Mathieu Bastian 已提交
337 338
            <groupId>${project.groupId}</groupId>
            <artifactId>filters-api</artifactId>
339
        </dependency>
M
Mathieu Bastian 已提交
340
        <dependency>
M
Mathieu Bastian 已提交
341
            <groupId>${project.groupId}</groupId>
342
            <artifactId>ui-propertyeditor</artifactId>
M
Mathieu Bastian 已提交
343
        </dependency>
M
Mathieu Bastian 已提交
344 345 346 347 348 349 350 351
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>layout-plugin</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-generate</artifactId>
        </dependency>
352 353 354 355
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-datalab</artifactId>
        </dependency>
356
        <dependency>
M
Mathieu Bastian 已提交
357
            <groupId>${project.groupId}</groupId>
358
            <artifactId>appearance-api</artifactId>
M
Mathieu Bastian 已提交
359 360 361
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
362 363
            <artifactId>desktop-appearance</artifactId>
        </dependency>
M
Mathieu Bastian 已提交
364
        <dependency>
M
Mathieu Bastian 已提交
365
            <groupId>${project.groupId}</groupId>
366
            <artifactId>io-importer-plugin</artifactId>
M
Mathieu Bastian 已提交
367
        </dependency>
368
        <dependency>
M
Mathieu Bastian 已提交
369 370 371 372 373 374
            <groupId>${project.groupId}</groupId>
            <artifactId>filters-plugin</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>filters-impl</artifactId>
375
        </dependency>
M
Mathieu Bastian 已提交
376 377 378
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>export-plugin-ui</artifactId>
M
Mathieu Bastian 已提交
379
        </dependency>
M
Mathieu Bastian 已提交
380 381 382 383
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-recent-files</artifactId>
        </dependency>
M
Mathieu Bastian 已提交
384
        <dependency>
M
Mathieu Bastian 已提交
385
            <groupId>${project.groupId}</groupId>
386
            <artifactId>desktop-io-export</artifactId>
M
Mathieu Bastian 已提交
387
        </dependency>
M
Mathieu Bastian 已提交
388 389 390 391 392 393 394 395 396 397
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>perspective-api</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>import-plugin-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
398
            <artifactId>desktop-banner</artifactId>
M
Mathieu Bastian 已提交
399 400 401 402
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>datalab-plugin</artifactId>
403
        </dependency>
404
        <dependency>
405 406
            <groupId>${project.groupId}</groupId>
            <artifactId>filters-plugin-ui</artifactId>
407
        </dependency>
M
Mathieu Bastian 已提交
408 409 410 411 412 413 414 415
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-layout</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-import</artifactId>
        </dependency>
416
        <dependency>
M
Mathieu Bastian 已提交
417 418
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-preview</artifactId>
419
        </dependency>
M
Mathieu Bastian 已提交
420 421
        <dependency>
            <groupId>${project.groupId}</groupId>
422
            <artifactId>appearance-plugin</artifactId>
M
Mathieu Bastian 已提交
423 424 425
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
426
            <artifactId>appearance-plugin-ui</artifactId>
427
        </dependency>
M
Mathieu Bastian 已提交
428 429 430
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-tools</artifactId>
431
        </dependency>
M
Mathieu Bastian 已提交
432 433 434
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-timeline</artifactId>
435
        </dependency>
M
Mathieu Bastian 已提交
436 437 438 439
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>directory-chooser</artifactId>
        </dependency>
440
        <dependency>
M
Mathieu Bastian 已提交
441 442
            <groupId>${project.groupId}</groupId>
            <artifactId>desktop-filters</artifactId>
443
        </dependency>
444 445
        <dependency>
            <groupId>${project.groupId}</groupId>
446
            <artifactId>core-library-wrapper</artifactId>
447 448 449
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
450
            <artifactId>ui-library-wrapper</artifactId>
451
        </dependency>
M
Mathieu Bastian 已提交
452 453 454 455
    </dependencies>

    <build>
        <plugins>
456
            
457
            <!-- Disable the ZIP goal. Also set up the location of the gephi.conf -->
M
Mathieu Bastian 已提交
458 459 460
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>nbm-maven-plugin</artifactId>
461 462 463 464
                <configuration>
                    <!-- Set up the gephi.conf for the final artifact -->
                    <etcConfFile>${basedir}/target/${brandingToken}.conf</etcConfFile>
                </configuration>
M
Mathieu Bastian 已提交
465 466
                <executions>
                    <execution>
467 468 469 470
                        <id>default-standalone-zip</id>
                        <phase>none</phase>       
                    </execution>
                </executions>
471
            </plugin>
472 473 474 475 476 477 478 479 480 481

            <!-- Do not generate a source jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <configuration>
                    <skipSource>true</skipSource>
                </configuration>
            </plugin>

482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508
            <!-- Copy ressources gephi.conf and Info.plist with filtering (replacing 'project.version' by the actual version -->
            <plugin> 
                <artifactId>maven-resources-plugin</artifactId> 
                <executions> 
                    <execution> 
                        <id>generate-app-conf-file</id> 
                        <phase>generate-resources</phase> 
                        <goals> 
                            <goal>copy-resources</goal> 
                        </goals> 
                        <configuration> 
                            <outputDirectory>${basedir}/target/</outputDirectory> 
                            <resources> 
                                <resource> 
                                    <directory>src/main/resources</directory> 
                                    <includes> 
                                        <include>${brandingToken}.conf</include>
                                        <include>Info.plist</include>
                                    </includes> 
                                    <filtering>true</filtering> 
                                </resource> 
                            </resources>
                            <escapeString>\</escapeString>
                        </configuration> 
                    </execution> 
                </executions> 
            </plugin>
509 510 511 512
        </plugins>
    </build>

    <profiles>
513 514
        <!-- The deployment profile is built for daily releases. It builds the standalone 
        zip and the autoupdate site. It can be used with deploy-dmg to include the dmg as well. -->
515
        <profile>
M
Mathieu Bastian 已提交
516
            <id>deployment</id>
M
Mathieu Bastian 已提交
517 518 519 520
            
            <!-- Localization dependency -->
            <dependencies>
                <dependency>
521 522
                    <groupId>nl.cloudfarming.client</groupId>
                    <artifactId>lib-platform-l10n</artifactId>
M
Mathieu Bastian 已提交
523
                    <version>${gephi.platform.localization.version}</version>
524
                </dependency>
M
Mathieu Bastian 已提交
525 526
            </dependencies>
            
527 528
            <build>
                <plugins>
529 530 531 532 533 534 535 536 537 538 539 540 541 542
                    <!-- Avoid jar goal -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>none</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    
M
Mathieu Bastian 已提交
543
                    <!-- Enable artifact deploy -->
544
                    <plugin>
M
Mathieu Bastian 已提交
545 546
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
547
                        <configuration>
M
Mathieu Bastian 已提交
548
                            <skipNexusStagingDeployMojo>false</skipNexusStagingDeployMojo>
549
                        </configuration>
550
                    </plugin>
551
                    
552 553 554 555
                    <!-- Permits NbModuleSuite to be run in integration-test phase: -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
M
Mathieu Bastian 已提交
556
                        <configuration>
557 558 559 560 561 562
                            <systemPropertyVariables>
                                <all.clusters>${all.clusters}</all.clusters>
                                <branding.token>${brandingToken}</branding.token>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
563

M
Mathieu Bastian 已提交
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
                    <!-- Unpack the localization dependency -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unpack</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>unpack-dependencies</goal>
                                </goals>
                                <configuration>
                                    <includeGroupIds>org.netbeans</includeGroupIds>
                                    <includeArtifactIds>platform-localization</includeArtifactIds>
                                    <outputDirectory>
                                        ${project.build.directory}/${brandingToken}
                                    </outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
585 586 587 588 589 590 591 592 593 594
                </plugins>
            </build>
        </profile>

        <!-- Profile used along with deployment to create the autoupdate site -->
        <profile>
            <id>create-autoupdate</id>
            <build>
                <plugins>
                    <!-- NBM Plugin settings. Enable the autoupdate generation -->
595
                    <plugin>
596 597
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>nbm-maven-plugin</artifactId>
598 599
                        <executions>
                            <execution>
600 601 602 603
                                <id>autoupdate</id>
                                <goals>
                                    <goal>autoupdate</goal>
                                </goals>
604
                                <configuration>
605
                                    <outputDirectory>${project.build.directory}/site</outputDirectory>
606
                                </configuration>
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Profile used along with deployment to create the sources artifact -->
        <profile>
            <id>create-sources</id>
            <build>
                <plugins>
                    <!-- Attach parent's sources artifact -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>pre-integration-test</phase>
627
                                <goals>
628
                                    <goal>attach-artifact</goal>
629
                                </goals>
630 631 632 633 634 635 636 637 638
                                <configuration>
                                    <artifacts>
                                        <artifact>
                                            <file>${basedir}/../../target/${brandingToken}-${project.version}-sources.tar.gz</file>
                                            <type>tar.gz</type>
                                            <classifier>sources</classifier>
                                        </artifact>
                                    </artifacts>
                                </configuration>
639 640 641
                            </execution>
                        </executions>
                    </plugin>
642 643 644
                </plugins>
            </build>
        </profile>
645

646 647 648 649 650
        <!-- Profile used along with deployment to create the tar.gz artifact -->
        <profile>
            <id>create-targz</id>
            <build>
                <plugins>
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
                    <!-- Assembler to produce linux's tar.gz -->
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>linux-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <tarLongFileMode>gnu</tarLongFileMode>
                                    <finalName>${brandingToken}-${project.version}</finalName>
                                    <descriptors>
                                        <descriptor>src/assemble/linux.xml</descriptor>
                                    </descriptors>
                                    <attach>false</attach>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

673
                    <!-- Attach tar.gz artifact -->
674 675
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
676
                        <artifactId>build-helper-maven-plugin</artifactId>
677
                        <executions>
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693
                            <execution>
                                <id>attach-linux</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attach-artifact</goal>
                                </goals>
                                <configuration>
                                    <artifacts>
                                        <artifact>
                                            <file>${basedir}/target/${brandingToken}-${project.version}-linux.tar.gz</file>
                                            <type>tar.gz</type>
                                            <classifier>linux</classifier>
                                        </artifact>
                                    </artifacts>
                                </configuration>
                            </execution>
694
                        </executions>
695
                    </plugin>
696 697 698 699 700 701
                </plugins>
            </build>
        </profile>
        
        <!-- Profile used along with deployment to create the dmg archive -->
        <profile>
M
Mathieu Bastian 已提交
702
            <id>create-dmg</id>
703 704
            <build>
                <plugins>
705
                    
706 707 708 709 710 711 712
                    <!-- Create the Mac OS X application bundle and dmg file -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>create-app-bundle</id>
713
                                <phase>package</phase>
714 715 716 717 718
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <target>
M
Mathieu Bastian 已提交
719
                                        <!-- Clean -->
720 721
                                        <delete includeEmptyDirs="true" failonerror="false">
                                            <fileset dir="${project.build.directory}/${gephi.appbundle.name}.app"/>
M
Mathieu Bastian 已提交
722 723
                                            <fileset dir="${project.build.directory}/${gephi.app.title}"/>
                                            <fileset dir="${project.build.directory}/${project.artifactId}-${project.version}.dmg"/>
724
                                        </delete>
M
Mathieu Bastian 已提交
725
                                
M
Mathieu Bastian 已提交
726
                                        <!-- Create folders -->
727 728
                                        <mkdir dir="${project.build.directory}/${gephi.appbundle.name}.app"/>
                                        <mkdir dir="${project.build.directory}/${gephi.appbundle.name}.app/Contents/MacOS"/>
729
                                        
M
Mathieu Bastian 已提交
730
                                        <!-- Copy application -->
731 732 733
                                        <copy todir="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Resources/${brandingToken}">
                                            <fileset dir="${project.build.directory}/${brandingToken}"/>
                                        </copy>
M
Mathieu Bastian 已提交
734
                                
M
Mathieu Bastian 已提交
735
                                        <!-- Copy logo and configuration files -->
736 737
                                        <copy tofile="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Resources/${brandingToken}.icns" file="src/main/app-resources/${brandingToken}.icns" />
                                        <copy tofile="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Info.plist" file="${project.build.directory}/Info.plist"/>
M
Mathieu Bastian 已提交
738
                                
M
Mathieu Bastian 已提交
739
                                        <!-- Move bin/gephi script into MacOS/gephi and modify the script so it founds its resources -->
M
Mathieu Bastian 已提交
740 741 742
                                        <move file="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Resources/${brandingToken}/bin/${brandingToken}" todir="${project.build.directory}/${gephi.appbundle.name}.app/Contents/MacOS"/>
                                        <replace file="${project.build.directory}/${gephi.appbundle.name}.app/Contents/MacOS/${brandingToken}" token="`dirname &quot;$PRG&quot;`" value="`dirname &quot;$PRG&quot;`&quot;/../Resources/gephi/bin&quot;"/>
                                        <chmod file="${project.build.directory}/${gephi.appbundle.name}.app/Contents/MacOS/${brandingToken}" perm="ugo+rx"/>
M
Mathieu Bastian 已提交
743

M
Mathieu Bastian 已提交
744 745 746 747 748 749 750 751 752 753
                                        <!-- Download and untar JRE -->
                                        <exec dir="${project.build.directory}" executable="curl">
                                            <arg line="-L"/>
                                            <arg line="-C"/>
                                            <arg line="-"/>
                                            <arg line="-b"/>
                                            <arg line="&quot;oraclelicense=accept-securebackup-cookie&quot;"/>
                                            <arg line="-O"/>
                                            <arg line="${gephi.bundle.jre.url}/${gephi.bundle.jre.version}.tar.gz"/>
                                        </exec>
754 755 756 757 758 759 760 761
                                        
                                        <!-- Unzip archive -->
                                        <mkdir dir="${project.build.directory}/${gephi.appbundle.name}.app/Contents/PlugIns"/>
                                        <exec dir="${project.build.directory}" executable="tar">
                                            <arg line="-zxf"/>
                                            <arg line="${gephi.bundle.jre.version}.tar.gz"/>
                                            <arg line="-C ${gephi.appbundle.name}.app/Contents/PlugIns"/>
                                        </exec>
M
Mathieu Bastian 已提交
762

763
                                        <!-- Remove quarantine bit set recursively on JRE -->
764
                                        <exec dir="${project.build.directory}" os="Mac OS X" executable="xattr">
765 766 767 768 769
                                            <arg line="-rd"/>
                                            <arg line="com.apple.quarantine"/>
                                            <arg line="${gephi.appbundle.name}.app/Contents/PlugIns"/>
                                        </exec>

M
Mathieu Bastian 已提交
770 771 772 773 774 775 776 777 778 779 780 781
                                        <!-- Get the JRE folder name -->
                                        <path id="jre_name">
                                            <dirset dir="${project.build.directory}/${gephi.appbundle.name}.app/Contents/PlugIns" includes="jre*" />
                                        </path>
                                        <property name="bundle.jre.path" refid="jre_name" />
                                        <basename property="bundle.jre.name" file="${bundle.jre.path}"/>

                                        <!-- Configure relative JRE path into gephi.conf -->
                                        <replace file="${project.build.directory}/${gephi.appbundle.name}.app/Contents/Resources/${brandingToken}/etc/${brandingToken}.conf" token="#jdkhome=&quot;/path/to/jdk&quot;" value="jdkhome=&quot;../../PlugIns/${bundle.jre.name}/Contents/Home&quot;"/>
                                        <chmod file="${project.build.directory}/${gephi.appbundle.name}.app/Contents/PlugIns/**" perm="+x" type="both"/>

                                        <!-- Fix JRE by replacing libjli.dylib symlink with real file -->
782 783
                                        <delete file="${project.build.directory}/${gephi.appbundle.name}.app/Contents/PlugIns/${bundle.jre.name}/Contents/MacOS/libjli.dylib"/>
                                        <copy file="${project.build.directory}/${gephi.appbundle.name}.app/Contents/PlugIns/${bundle.jre.name}/Contents/Home/lib/jli/libjli.dylib" todir="${project.build.directory}/${gephi.appbundle.name}.app/Contents/PlugIns/${bundle.jre.name}/Contents/MacOS"/>
M
Mathieu Bastian 已提交
784

785 786 787 788 789 790 791 792 793
                                        <!-- Codesign JRE -->
                                        <exec dir="${project.build.directory}" os="Mac OS X" executable="codesign">
                                            <arg value="-fs"/> 
                                            <arg value="${gephi.codesign.identity}"/> 
                                            <arg value="-v"/> 
                                            <arg value="${gephi.appbundle.name}.app/Contents/PlugIns/${bundle.jre.name}/"/> 
                                        </exec>
            
                                        <!-- Codesign app -->
794 795 796 797 798 799 800
                                        <exec dir="${project.build.directory}" os="Mac OS X" executable="codesign">
                                            <arg value="-fs"/> 
                                            <arg value="${gephi.codesign.identity}"/> 
                                            <arg value="-v"/> 
                                            <arg value="${gephi.appbundle.name}.app"/> 
                                        </exec>
                                        
801
                                        <!-- Create application folder and add Applications dynamic link -->   
M
Mathieu Bastian 已提交
802 803 804 805
                                        <mkdir dir="${project.build.directory}/${gephi.app.title}"/>
                                        <move file="${project.build.directory}/${gephi.appbundle.name}.app" todir="${project.build.directory}/${gephi.app.title}/" />
                                        <symlink link="${project.build.directory}/${gephi.app.title}/Applications" resource="/Applications" failonerror="false" />
                                        
806
                                        <!-- Create DMG (Mac OS X) --> 
807 808 809 810
                                        <exec dir="${project.build.directory}" os="Mac OS X" executable="hdiutil">
                                            <arg value="create"/> 
                                            <arg value="-noanyowners"/> 
                                            <arg value="-imagekey"/> 
811
                                            <arg value="zlib-level=9"/> 
812
                                            <arg value="-srcfolder"/> 
M
Mathieu Bastian 已提交
813
                                            <arg value="${project.build.directory}/${gephi.app.title}"/> 
814 815
                                            <arg value="${project.artifactId}-${project.version}.dmg"/>
                                        </exec>
M
Mathieu Bastian 已提交
816

817
                                        <!-- Create DMG (Linux), only for testing -->  
818
                                        <exec dir="${project.build.directory}" os="Linux" executable="genisoimage">
819 820 821 822 823 824 825 826 827 828 829
                                            <arg value="-V"/> 
                                            <arg value="${gephi.appbundle.name}"/>
                                            <arg value="-U"/>
                                            <arg value="-D"/>
                                            <arg value="-l"/>
                                            <arg value="-allow-multidot"/>
                                            <arg value="-max-iso9660-filenames"/>
                                            <arg value="-relaxed-filenames"/>
                                            <arg value="-no-iso-translate"/>
                                            <arg value="-r"/>
                                            <arg value="-o"/>
M
Mathieu Bastian 已提交
830
                                            <arg value="${project.artifactId}-${project.version}.dmg"/>
831
                                            <arg value="-root"/>
M
Mathieu Bastian 已提交
832 833
                                            <arg value="${project.build.directory}/${gephi.app.title}"/>
                                            <arg value="${project.build.directory}/${gephi.app.title}"/>
834 835 836 837 838 839
                                        </exec>
                                    </target>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
840
                    
841
                    <!-- Attach the final DMG for deployment -->
842 843 844 845 846 847
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-dmg</id>
848
                                <phase>package</phase>
849 850 851 852 853
                                <goals>
                                    <goal>attach-artifact</goal>
                                </goals>
                                <configuration>
                                    <artifacts>
854
                                        <artifact>
855 856
                                            <file>${project.build.directory}/${project.artifactId}-${project.version}.dmg</file>
                                            <type>dmg</type>
857
                                            <classifier>macos</classifier>
858 859 860 861 862 863
                                        </artifact>
                                    </artifacts>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
M
Mathieu Bastian 已提交
864 865 866
                </plugins>
            </build>
        </profile>
867
        
868
        <!-- Profile activated for windows release in addition of deployement. Create the installer. -->
M
Mathieu Bastian 已提交
869
        <profile>
870
            <id>create-exe</id>
M
Mathieu Bastian 已提交
871 872
            <build>
                <plugins>
873 874
                    
                    <!-- Copy and filter the InnoSetup config file, as well as icons -->
875 876 877 878 879 880 881 882 883 884
                    <plugin> 
                        <artifactId>maven-resources-plugin</artifactId> 
                        <executions> 
                            <execution> 
                                <id>generate-iss-file</id> 
                                <phase>generate-resources</phase> 
                                <goals> 
                                    <goal>copy-resources</goal> 
                                </goals> 
                                <configuration> 
M
Mathieu Bastian 已提交
885
                                    <outputDirectory>${basedir}/target</outputDirectory> 
886 887 888 889 890 891 892 893 894 895 896 897 898
                                    <resources> 
                                        <resource> 
                                            <directory>src/main/app-resources</directory> 
                                            <includes> 
                                                <include>${brandingToken}.iss</include>
                                            </includes> 
                                            <filtering>true</filtering> 
                                        </resource>
                                        <resource> 
                                            <directory>src/main/app-resources</directory> 
                                            <includes> 
                                                <include>${brandingToken}.ico</include>
                                                <include>${brandingToken}file128.png</include>
899
                                                <include>COPYING.txt</include>
900 901 902 903 904 905 906
                                            </includes> 
                                            <filtering>false</filtering> 
                                        </resource> 
                                    </resources> 
                                </configuration> 
                            </execution> 
                        </executions> 
907 908 909 910 911 912 913
                    </plugin>   
                    
                    <!-- Execute InnoSetup with the gephi.iss script -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
914 915 916 917 918 919 920
                            <execution>
                                <id>replace-windows-icon</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
921
                                    <!-- Target that replaces the icon for the launcher exe with our own icon. -->
922
                                    <target name="replaceWindowsLauncherIcon" description="Replace the icon for the Windows launcher exe">
923
                                        <!-- Windows -->
924
                                        <echo message="Replacing icon of Windows launcher executable."/>
925
                                        <exec dir="src/main/app-resources" executable="ReplaceVistaIcon.exe" resolveexecutable="true" osfamily="windows">
926 927
                                            <arg line="${project.build.directory}/${brandingToken}/bin/${brandingToken}.exe gephi.ico 0"/>
                                        </exec>
928
                                        <exec dir="src/main/app-resources" executable="ReplaceVistaIcon.exe" resolveexecutable="true" osfamily="windows">
929 930
                                            <arg line="${project.build.directory}/${brandingToken}/bin/${brandingToken}.exe gephifile.ico 1"/>
                                        </exec>
931
                                        <exec dir="src/main/app-resources" executable="ReplaceVistaIcon.exe" resolveexecutable="true" osfamily="windows">
932 933
                                            <arg line="${project.build.directory}/${brandingToken}/bin/${brandingToken}64.exe gephi.ico 0"/>
                                        </exec>
934
                                        <exec dir="src/main/app-resources" executable="ReplaceVistaIcon.exe" resolveexecutable="true" osfamily="windows">
935 936
                                            <arg line="${project.build.directory}/${brandingToken}/bin/${brandingToken}64.exe gephifile.ico 1"/>
                                        </exec>
937 938 939 940 941 942 943 944 945 946 947 948 949 950 951

                                        <!-- Linux (assuming the right wine configuration) -->
                                        <echo message="Replacing icon of Windows launcher executable."/>
                                        <exec dir="src/main/app-resources" executable="replacevistaicon" os="Linux">
                                            <arg line="${project.build.directory}/${brandingToken}/bin/${brandingToken}.exe gephi.ico 0"/>
                                        </exec>
                                        <exec dir="src/main/app-resources" executable="replacevistaicon" os="Linux">
                                            <arg line="${project.build.directory}/${brandingToken}/bin/${brandingToken}.exe gephifile.ico 1"/>
                                        </exec>
                                        <exec dir="src/main/app-resources" executable="replacevistaicon" os="Linux">
                                            <arg line="${project.build.directory}/${brandingToken}/bin/${brandingToken}64.exe gephi.ico 0"/>
                                        </exec>
                                        <exec dir="src/main/app-resources" executable="replacevistaicon" os="Linux">
                                            <arg line="${project.build.directory}/${brandingToken}/bin/${brandingToken}64.exe gephifile.ico 1"/>
                                        </exec>
952 953 954
                                    </target>
                                </configuration>
                            </execution>
955 956
                            <execution>
                                <id>create-windows-installer</id>
957
                                <phase>package</phase>
958 959 960 961
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
962
                                    <target name="createInstaller" description="Create Windows installer with InnoSetup">
963
                                        <echo message="Creating windows installer with InnoSetup"/>
M
Mathieu Bastian 已提交
964
                                        <delete file="${project.artifactId}-${project.version}.setup.exe" failonerror="false"/>
965
                                        
966
                                        <!-- Windows -->
967 968
                                        <exec dir="${project.build.directory}" executable="${gephi.innosetup.path}/Compil32.exe" osfamily="windows">
                                            <arg line="/cc &quot;${brandingToken}.iss&quot;" /> 
969
                                        </exec>
970 971

                                        <!-- Linux (assuming the right wine configuration) -->
972 973 974
                                        <exec dir="${project.build.directory}" executable="iscc" os="Linux">
                                            <arg line="${brandingToken}.iss" /> 
                                        </exec>
975 976 977 978 979 980
                                    </target>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    
981
                    <!-- Attach the final exe installer for deployment -->
982
                    <plugin>
983 984
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
985 986
                        <executions>
                            <execution>
987 988
                                <id>attach-exe</id>
                                <phase>package</phase>
989
                                <goals>
990
                                    <goal>attach-artifact</goal>
991 992
                                </goals>
                                <configuration>
993 994 995 996
                                    <artifacts>
                                        <artifact>
                                            <file>${project.build.directory}/${project.artifactId}-${project.version}.setup.exe</file>
                                            <type>exe</type>
997
                                            <classifier>windows</classifier>
998 999
                                        </artifact>
                                    </artifacts>
1000 1001 1002
                                </configuration>
                            </execution>
                        </executions>
M
Mathieu Bastian 已提交
1003
                    </plugin>
1004 1005 1006
                </plugins>
            </build>
        </profile>
1007 1008 1009 1010 1011 1012

        <!-- Profile that pushes the /site folder to GitHub's gh-pages -->
        <profile>
            <id>push-site</id>
            <build>
                <plugins>
1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032
                    <!-- Copy parent's site into target/site -->
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>site</phase>
                                <configuration>
                                    <target>
                                        <copy todir="${project.build.directory}/site">
                                            <fileset dir="${basedir}/../../target/site"/>
                                        </copy>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

1033
                    <!-- Publish site folder to GitHub's gh-pages branch -->
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <configuration>
                            <message>Creating site for ${project.version}</message>
                            <path>${project.version}</path>
                            <merge>true</merge>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <phase>site</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
M
Mathieu Bastian 已提交
1054 1055
    </profiles>
</project>