1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
| <project>
<modelVersion>4.0.0</modelVersion>
<groupId>myGroup</groupId>
<artifactId>myArtifact</artifactId>
<packaging>jar</packaging>
<name>myProject</name>
<version>2.0-SNAPSHOT</version>
<build>
<plugins>
<!-- plugin customAssembly: create an setup exe file from the generated jar file and all its dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-customAssembly-plugin</artifactId>
<configuration>
<installerCompilerPath>
C:/Program Files/Inno-Setup-5/ISCC.exe
</installerCompilerPath>
<installerScriptTemplate>
src/assembly/scriptIIS.vm
</installerScriptTemplate>
<installerScriptTemplateProperties>
<myKey>myValue</myKey>
</installerScriptTemplateProperties>
<descriptor>src/assembly/src.xml</descriptor>
<finalName>${project.name}</finalName>
<outputDirectory>
${project.build.directory}
</outputDirectory>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>customAssembly</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- plugin exec: execute the setup in silent mode -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>${project.name}.exe</executable>
<workingDirectory>
${project.build.directory}\installer
</workingDirectory>
<arguments>
<argument>/VERYSILENT</argument>
<argument>
/DIR=${project.build.directory}\installer\temp"
</argument>
</arguments>
</configuration>
</plugin>
<!-- plugin deploy: this stage is never performed. I think because it is out of the lifecycle? How to do? -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
</execution>
</executions>
<configuration>
<url>file://${localRepository}\myProject-exe</url>
<file>${project.build.directory}\installer\${project.name}.exe</file>
<version>${project.version}</version>
<groupId>myGroup</groupId>
<artifactId>myProject-exe</artifactId>
<packaging>jar</packaging>
</configuration>
</plugin>
</plugins>
</build>
</project> |
Partager