code: private int removeExistingSignatures( File workDirectory )
              throws MojoExecutionException
      {
          getLog().info( "-- Remove existing signatures" );
  
          // cleanup tempDir if exists
          File tempDir = new File( workDirectory, "temp_extracted_jars" );
          ioUtil.removeDirectory( tempDir );
  
          // recreate temp dir
          ioUtil.makeDirectoryIfNecessary( tempDir );
  
          // process jars
          File[] jarFiles = workDirectory.listFiles( unprocessedJarFileFilter );
  
          for ( File jarFile : jarFiles )
          {
              if ( isJarSigned( jarFile ) )
              {
                  if ( !canUnsign )
                  {
                      throw new MojoExecutionException(
                              "neverUnsignAlreadySignedJar is set to true and a jar file [" + jarFile +
                                      " was asked to be unsign,\n please prefer use in this case an extension for " +
                                      "signed jars or not set to true the neverUnsignAlreadySignedJar parameter, Make " +
                                      "your choice:)" );
                  }
                  verboseLog( "Remove signature " + toProcessFile( jarFile ).getName() );
  
                  signTool.unsign( jarFile, isVerbose() );
              }
              else
              {
                  verboseLog( "Skip not signed " + toProcessFile( jarFile ).getName() );
              }
          }
  
          // cleanup tempDir
          ioUtil.removeDirectory( tempDir );
  
          return jarFiles.length; // FIXME this is wrong. Not all jars are signed.
      }
docs: Removes the signature of the files in the specified directory which satisfy the
  specified filter.
  
  @param workDirectory working directory used to unsign jars
  @return the number of unsigned jars
  @throws MojoExecutionException if could not remove signatures