summaryrefslogtreecommitdiff
path: root/BKUWebStartPackage/pom.xml
blob: 4cf033aaa43015cbbeac2dba97ae1482dc7b45b2 (plain)
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
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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<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>
  <parent>
    <artifactId>bku</artifactId>
    <groupId>at.gv.egiz</groupId>
    <version>1.2.4</version>
  </parent>
  <groupId>at.gv.egiz</groupId>
  <artifactId>BKUWebStartPackage</artifactId>
  <version>1.2.4</version>
  <packaging>pom</packaging>
  <name>BKU Web Start Package</name>
  <description>B├╝rgerkartenumgebung</description>
  <url>http://mocca.egovlabs.gv.at/</url>

  <build>
    <plugins>
      <plugin>
        <artifactId>webstart-maven-plugin</artifactId>
        <groupId>org.codehaus.mojo.webstart</groupId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>jnlp-download-servlet</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <outputDirectoryName>webstart</outputDirectoryName>

          <excludeTransitive>false</excludeTransitive>

          <jnlpFiles>
            <jnlpFile>
              <templateFilename>template.xml</templateFilename>
              <outputFilename>mocca.jnlp</outputFilename>
              <jarResources>
                <jarResource>
                  <groupId>at.gv.egiz</groupId>
                  <artifactId>BKUWebStart</artifactId>
                  <version>${project.version}</version>
                  <mainClass>at.gv.egiz.bku.webstart.Launcher</mainClass>
                </jarResource>
              </jarResources>
            </jnlpFile>
          </jnlpFiles>

          <sign>
            <alias>test-applet signer</alias>
            <keystore>${project.basedir}/src/main/jnlp/keystore.ks</keystore>
            <storepass>storepass</storepass>
            <keypass>keypass</keypass>
            <verify>true</verify>
            <keystoreConfig>
              <delete>false</delete>
              <gen>false</gen>
            </keystoreConfig>
          </sign>

          <unsign>true</unsign>
          <verifyjar>false</verifyjar>

          <pack200>false</pack200>
          <gzip>false</gzip>
          <outputJarVersions>false</outputJarVersions>
          <verbose>true</verbose>

        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptors>
            <descriptor>${basedir}/src/main/assemblies/zip-webstart.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <dependencies>
    <dependency>
      <artifactId>BKUWebStart</artifactId>
      <groupId>at.gv.egiz</groupId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>pkcs11-sign</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>webstart-maven-plugin</artifactId>
            <groupId>org.codehaus.mojo.webstart</groupId>
            <!-- use pkcs11-patched webstart-maven-plugin-->
            <version>1.0-beta-1-mocca</version>
            <configuration>
              <sign>
                <keystore>NONE</keystore>
                <storetype>PKCS11</storetype>
                <providerClass>iaik.pkcs.pkcs11.provider.IAIKPkcs11</providerClass>
                <alias>a-sit</alias>
                <storepass>${pkcs11-pass}</storepass>
                <verify>true</verify>
                <keystoreConfig>
                  <delete>false</delete>
                  <gen>false</gen>
                </keystoreConfig>
              </sign>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <!-- development profile -->
      <id>local-webstart</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>webstart-maven-plugin</artifactId>
            <groupId>org.codehaus.mojo.webstart</groupId>
            <configuration>
              <jnlpFiles>
                <jnlpFile>
                  <templateFilename>template-local.xml</templateFilename>
                  <outputFilename>mocca-local.jnlp</outputFilename>
                  <jarResources>
                    <jarResource>
                      <groupId>at.gv.egiz</groupId>
                      <artifactId>BKUWebStart</artifactId>
                      <version>${project.version}</version>
                      <mainClass>at.gv.egiz.bku.webstart.Launcher</mainClass>
                    </jarResource>
                  </jarResources>
                </jnlpFile>
              </jnlpFiles>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>non-webstart</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <groupId>org.apache.maven.plugins</groupId>
            <configuration>
              <archive>
                <manifest>
                  <addClasspath>true</addClasspath>
                  <mainClass>at.gv.egiz.bku.webstart.Launcher</mainClass>
                </manifest>
                <manifestEntries>
                  <mode>development</mode>
                  <url>${pom.url}</url>
                  <SplashScreen-Image>at/gv/egiz/bku/webstart/splash.png</SplashScreen-Image>
                </manifestEntries>
              </archive>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <!-- TODO somehow provide javaws.jar on manifest class-path -->
    </profile>
  </profiles>
</project>