<?xml version="1.0" encoding="UTF-8"?>
<project>
  <parent>
    <artifactId>bku</artifactId>
    <groupId>at.gv.egiz</groupId>
    <version>1.1.2-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>at.gv.egiz</groupId>
  <artifactId>BKUWebStart</artifactId>
  <packaging>jar</packaging>
  <name>BKU Web Start</name>
  <version>1.0-SNAPSHOT</version>
  <url>http://danu-lin.iaik.tugraz.at:8080/jnlp</url>
  <description>Web Start Bürgerkartenumgebung (BKU) MOCCA-lokal</description>

  <build>

    <finalName>BKUWebStart</finalName>
    <plugins>

      <!-- target/jnlp does not yet exist..
      <plugin>
        <groupId>org.codehaus.mojo.webstart</groupId>
        <artifactId>webstart-maven-plugin</artifactId>
        <executions>
           <execution>
              <goals>
                 <goal>unsign</goal>
              </goals>
              <phase>package</phase>
           </execution>
        </executions>
        <configuration>
          <jarPath>${project.build.directory}/jnlp/lib/iaik_jce_full_signed-3.16.jar</jarPath>
          <jarPath>${project.build.directory}/jnlp/lib/iaik_ecc_signed-2.15.jar</jarPath>
          <verbose>true</verbose>
        </configuration>
      </plugin>
      -->

      <!--plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <overlays>
            <overlay>
              <groupId>at.gv.egiz</groupId>
              <artifactId>BKULocal</artifactId>
              <type>war</type>
              <targetPath>classes/BKULocal</targetPath>
            </overlay>
          </overlays>
        </configuration>
      </plugin-->

       <plugin>
         <!-- unpack BKULocal prior to webstart jar generation to include -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <includeGroupIds>at.gv.egiz</includeGroupIds>
              <includeArtifactIds>BKULocal</includeArtifactIds>
              <includeTypes>war</includeTypes>
              <!--
              <includes>**/*.class</includes>
              <excludes>**/*.properties</excludes>
              -->
              <outputDirectory>${project.build.directory}/classes/BKULocalWar</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo.webstart</groupId>
        <artifactId>webstart-maven-plugin</artifactId>
        <executions>
           <execution>
              <goals>
                 <goal>jnlp</goal> <!-- use jnlp, jnlp-inline or jnlp-single as appropriate -->
              </goals>
              <phase>package</phase>
           </execution>
        </executions>
        <configuration>
           <!--outputDirectory></outputDirectory--> <!-- not required?? -->

           <!--
           Set to true to exclude all transitive dependencies. Default is false.
           -->
           <excludeTransitive>false</excludeTransitive>

           <!-- The path where the libraries are stored within the jnlp structure. not required. by default the libraries are within the working directory -->
           <libPath>lib</libPath>

           <!-- [optional] transitive dependencies filter - if omitted, all transitive dependencies are included -->
           <dependencies>
             <!-- Note that only groupId and artifactId must be specified here. because of a limitation of the Include/ExcludesArtifactFilter -->
             <includes>
                <include>commons-logging:commons-logging</include>
                <include>log4j:log4j</include>
                <include>at.gv.egiz:utils</include>
                <include>javax.activation:activation</include>
                <include>iaik:iaik_ecc</include>
                <include>iaik:iaik_jce</include>
                <include>iaik:iaik_xsect_unsigned</include>
                <include>org.mortbay.jetty:jetty</include>
                <include>org.mortbay.jetty:jetty-util</include>
                <include>org.mortbay.jetty:servlet-api</include>
             </includes>
             <!-- excludes>
                <exclude></exclude>
             <excludes-->
           </dependencies>

           <!--resourcesDirectory>${project.basedir}/src/main/jnlp/resources</resourcesDirectory--> <!-- default value -->

           <!-- JNLP generation -->
           <jnlp>
             <!-- default values -->
             <!--inputTemplateResourcePath>${project.basedir}</inputTemplateResourcePath-->
             <inputTemplate>src/main/jnlp/template.xml</inputTemplate> <!-- relative to inputTemplateResourcePath -->
             <outputFile>mocca.jnlp</outputFile> <!-- defaults to launch.jnlp -->

             <!-- used to automatically identify the jar containing the main class. -->
             <!-- this is perhaps going to change -->
             <mainClass>at.gv.egiz.bku.webstart.BKULauncher</mainClass>

             <j2seVersion>1.6+</j2seVersion>
             <!--offlineAllowed>true</offlineAllowed-->
             <!--allPermissions>true</allPermissions-->
           </jnlp>

           <!-- SIGNING -->
           <!-- defining this will automatically sign the jar and its dependencies, if necessary -->
           <sign>
             <alias>test-applet signer</alias>
             <keystore>${project.basedir}/keystore.ks</keystore>
             <storepass>storepass</storepass>  <!-- ${storepass} -->
             <keypass>keypass</keypass> <!-- we need to override passwords easily from the command line. ${keypass} -->
             <!--storetype>fillme</storetype-->

             <!--validity>fillme</validity-->

             <!-- only required for generating the keystore -->
             <!--dnameCn>fillme</dnameCn>
             <dnameOu>fillme</dnameOu>
             <dnameO>fillme</dnameO>
             <dnameL>fillme</dnameL>
             <dnameSt>fillme</dnameSt>
             <dnameC>fillme</dnameC-->

             <verify>true</verify> <!-- verify that the signing operation succeeded -->

             <!-- KEYSTORE MANAGEMENT -->
             <keystoreConfig>
               <delete>false</delete> <!-- delete the keystore -->
               <gen>false</gen>       <!-- optional shortcut to generate the store. -->
             </keystoreConfig>
           </sign>

           <!-- BUILDING PROCESS -->

           <pack200>false</pack200>
           <gzip>false</gzip> <!-- default force when pack200 false, true when pack200 selected ?? -->

           <!-- causes a version attribute to be output in each jar resource element, optional, default is false -->
           <outputJarVersions>true</outputJarVersions>

            <!-- unsign IAIK-JCE (webstart error:  JAR-Ressourcen in JNLP-Datei sind nicht von demselben Zertifikat signiert) -->
            <unsignAlreadySignedJars>true</unsignAlreadySignedJars>

           <!--install>false</install--> <!-- not yet supported -->
           <verbose>true</verbose>

        </configuration>
      </plugin>


     


    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>at.gv.egiz</groupId>
      <artifactId>BKULocal</artifactId>
      <version>1.0.5-SNAPSHOT</version>
      <type>war</type>
    </dependency>
    <dependency>
      <artifactId>utils</artifactId>
      <groupId>at.gv.egiz</groupId>
      <version>1.1.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <artifactId>iaik_jce</artifactId>
      <groupId>iaik</groupId>
      <version>3.16</version>
    </dependency>
    <dependency>
      <artifactId>iaik_ecc</artifactId>
      <groupId>iaik</groupId>
      <version>2.15</version>
    </dependency>
    <dependency>
      <artifactId>iaik_xsect_unsigned</artifactId>
      <groupId>iaik</groupId>
      <version>1.14</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
      <version>6.1.15</version>
    </dependency>
  </dependencies>






</project>