Project

General

Profile

« Previous | Next » 

Revision c14c8110

Added by Andreas Kohlbecker over 12 years ago

building windows installer integrated in mvn

View differences:

pom.xml
107 107
  <!-- **** PLUGINS **** -->
108 108
  <build>
109 109
     <resources>
110
         <!--
111
            ${basedir}/src/main/resources
112
          -->
110 113
         <resource>
111 114
             <!--
112 115
                 replace the project-version placeholder in the version.properties file.
......
128 131
               <excludes>
129 132
                   <exclude>version.properties</exclude>
130 133
               </excludes>
131
           </resource>
134
          </resource>
135
          <!--
136
            ${basedir}/src/main/installer/win32
137
          -->
138
         <resource>
139
             <targetPath>${project.build.directory}/installer</targetPath>
140
             <filtering>true</filtering>
141
             <directory>${basedir}/src/main/installer</directory>
142
             <includes>
143
                 <include>win32/program-folder/etc/CDMServer.conf</include>
144
                 <include>win32/setup.nsi</include>
145
             </includes>
146
         </resource>
147
         <resource>
148
               <targetPath>${project.build.directory}/installer</targetPath>
149
               <directory>${basedir}/src/main/installer</directory>
150
               <excludes>
151
                   <exclude>win32/program-folder/etc/CDMServer.conf</exclude>
152
                   <exclude>win32/setup.nsi</exclude>
153
               </excludes>
154
          </resource>
132 155
     </resources>
133 156
  <plugins>
134 157
    <!-- ====== IDE ====== -->
......
333 356
          </execution>
334 357
        </executions>
335 358
      </plugin>
359
      <!--
360
        Build windows installer
361
       -->
362
      <plugin>
363
        <groupId>org.codehaus.mojo</groupId>
364
        <artifactId>exec-maven-plugin</artifactId>
365
        <version>1.2.1</version>
366
        <executions>
367
          <execution>
368
            <phase>install</phase>
369
            <goals>
370
              <goal>exec</goal>
371
            </goals>
372
          </execution>
373
        </executions>
374
        <configuration>
375
          <executable>makensis</executable>
376
          <!-- optional -->
377
          <workingDirectory>/tmp</workingDirectory>
378
          <arguments>
379
            <argument>${project.basedir}/target/installer/win32/setup.nsi</argument>
380
          </arguments>
381
        </configuration>
382
      </plugin>
336 383
      <!-- ====== DEPLOY ====== -->
337 384
      <plugin>
338 385
        <groupId>org.apache.maven.plugins</groupId>
......
364 411
          </executions>
365 412
          <configuration>
366 413
              <fromDir>target</fromDir>
367
              <includes>*${project.version}*.deb,*${project.version}*.jar</includes>
414
              <includes>*${project.version}*.deb,*${project.version}*.jar,*${project.version}*.exe</includes>
368 415
              <url>scpexe://160.45.63.151/var/www/download/cdmserver/${project.version}</url>
369 416
              <serverId>wp5.e-taxonomy.eu</serverId>
370 417
          </configuration>
src/main/installer/win32/program-folder/etc/CDMServer.conf
1
wrapper.java.classpath.1=./lib/cdm-server-3.0.jar
1
wrapper.java.classpath.1=./lib/cdm-server-${project.version}.jar
2 2
wrapper.java.library.path.1=./lib/
3 3
wrapper.java.additional.1=-XX:PermSize=128m
4 4
wrapper.java.additional.2=-XX:MaxPermSize=192m
src/main/installer/win32/setup.nsi
13 13
# General Symbol Definitions
14 14
!define /date BUILD_TIMESTAMP "%Y%m%d-%H%M%S"
15 15
!define REGKEY "SOFTWARE\$(^Name)"
16
!define VERSION 3.0
17
!define PATCH_VERSION 2-${BUILD_TIMESTAMP}
16
!define VERSION ${project.version}
18 17
!define COMPANY "EDIT - European Distributed Institute of Taxonomy"
19 18
!define EDIT_PLATFORM "EDIT Platform for Cybertaxonomy"
20 19
!define URL http://wp5.e-taxonomy.eu/
......
24 23
!include Sections.nsh
25 24

  
26 25
# Files and Folders
27
!define OUT_FOLDER "..\..\..\..\target"
26
!define OUT_FOLDER "${project.build.directory}"
28 27
!define JAR_FILE_NAME "cdm-server-${VERSION}.jar"
29
!define JAR_FILE "..\..\..\..\target\${JAR_FILE_NAME}"
30
!define CDMLIBRARY_TEMPLATE "..\templates\.cdmLibrary"
28
!define JAR_FILE "${project.build.directory}\${JAR_FILE_NAME}"
29
!define CDMLIBRARY_TEMPLATE "${project.build.directory}\installer\templates\.cdmLibrary"
31 30

  
32 31
# Reserved Files
33 32
ReserveFile "${NSISDIR}\Plugins\StartMenu.dll"
......
42 41
Page instfiles
43 42

  
44 43
# Installer attributes
45
OutFile "${OUT_FOLDER}\EDIT CDM-Server-${VERSION}.${PATCH_VERSION}.exe"
44
OutFile "${OUT_FOLDER}\EDIT CDM-Server-${VERSION}-${BUILD_TIMESTAMP}.exe"
46 45
InstallDir "$PROGRAMFILES\EDIT CDM-Server"
47 46
CRCCheck on
48 47
XPStyle on
49 48
Icon "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
50 49
ShowInstDetails show
51 50
AutoCloseWindow false
52
LicenseData ..\..\..\..\LICENSE.TXT
51
LicenseData ${project.basedir}\LICENSE.TXT
53 52
VIProductVersion 3.0.0.0
54 53
VIAddVersionKey ProductName "$(^Name)"
55 54
VIAddVersionKey ProductVersion "${VERSION}"

Also available in: Unified diff