jarsigner is not working on JDK 1.7
<p>We are using JDK 1.7 for our project, it was working fine till last week but now it is failing with below error,</p>

<p><strong>jarsigner: unable to sign jar: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake</strong></p>

<p>I came to know that this issue is due to the protocol used to communicate with time-stamp server, but I am not sure how to pass the parameter to jdk through pom.xml to enforce it to use TLSv1.2</p>

<p><strong>My Pom.xml file</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;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"&gt;

    &lt;parent&gt;
        &lt;groupId&gt;com.project.dews.common&lt;/groupId&gt;
        &lt;artifactId&gt;CommonPom&lt;/artifactId&gt;
        &lt;version&gt;2.2-SNAPSHOT&lt;/version&gt;
        &lt;relativePath&gt;..&lt;/relativePath&gt;
    &lt;/parent&gt;

    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;artifactId&gt;UserNameApplet&lt;/artifactId&gt;
    &lt;version&gt;2.2-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
    &lt;name&gt;User Name Applet&lt;/name&gt;
    &lt;build&gt;
    &lt;plugins&gt;
        &lt;plugin&gt;
            &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
            &lt;configuration&gt;
                &lt;archive&gt;
                    &lt;addMavenDescriptor&gt;false&lt;/addMavenDescriptor&gt;
                    &lt;manifestEntries&gt;
                        &lt;Trusted-Library&gt;true&lt;/Trusted-Library&gt;
                        &lt;Permissions&gt;all-permissions&lt;/Permissions&gt;
                        &lt;Codebase&gt;*&lt;/Codebase&gt;
                        &lt;Caller-Allowable-Codebase&gt;*&lt;/Caller-Allowable-Codebase&gt;
                    &lt;/manifestEntries&gt;
                &lt;/archive&gt;
            &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
        &lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-jarsigner-plugin&lt;/artifactId&gt;
            &lt;executions&gt;
                &lt;execution&gt;
                    &lt;goals&gt;
                        &lt;goal&gt;sign&lt;/goal&gt;
                        &lt;!--&lt;goal&gt;verify&lt;/goal&gt;--&gt;
                    &lt;/goals&gt;
                    &lt;phase&gt;package&lt;/phase&gt;
                    &lt;configuration&gt;
                        &lt;keystore&gt;src/main/keystore/keystore.ks&lt;/keystore&gt;
                        &lt;alias&gt;85034585a-17b9-4a50-53e79d3a86345&lt;/alias&gt;
                        &lt;storepass&gt;password&lt;/storepass&gt;
                        &lt;keypass&gt;password&lt;/keypass&gt;
                        &lt;arguments&gt;
                            &lt;argument&gt;-tsa&lt;/argument&gt;
                            &lt;argument&gt;https://timestamp.geotrust.com/tsa&lt;/argument&gt;
                        &lt;/arguments&gt;
                        &lt;!--&lt;verbose&gt;true&lt;/verbose&gt;--&gt;
                        &lt;!--&lt;certs&gt;true&lt;/certs&gt;--&gt;
                    &lt;/configuration&gt;
                &lt;/execution&gt;
            &lt;/executions&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
&lt;/build&gt;
&lt;/project&gt;
</code></pre>

<p><strong>Build Error</strong></p>

<pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jarsigner-plugin:1.4:sign (default) on project UserNameApplet: Failed executing 'cmd.exe /X /C ""C:\JAVA 7\jdk1.7.0_71\jre\..\bin\jarsigner.exe" -keystore src/main/keystore/keystore.ks -storepass ***** -tsa https://timestamp.geotrust.com/tsa -keypass ***** C:\2.X_Dev_Code_SVN\Project\Common\Applet\target\UserNameApplet-2.1-SNAPSHOT.jar 85034585a-17b9-4a50-53e79d3a86345"' - exitcode 1 -&gt; 
        [INFO] jarsigner: unable to sign jar:    javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
</code></pre>

<p>I tried disabling TLSv1.0 and TLSv1.1 from java control Panel as well as disabled it using jdk.tls.disabledAlgorithms= SSLv2Hello, SSLv3, TLSv1, TLSv1.1
from java.security but I failed on both the cases and also for me I need to fix the issue only from the pom.xml. </p>

<p>Any suggestion to solve this problem would be much appreciated.</p>