docs: private void writeInfoPlist( File infoPlist, List files )
          throws MojoExecutionException
      {
  
          VelocityContext velocityContext = new VelocityContext();
  
          velocityContext.put( "mainClass", mainClass );
          velocityContext.put( "cfBundleExecutable", javaApplicationStub.getName());
          velocityContext.put( "vmOptions", vmOptions);
          velocityContext.put( "bundleName", bundleName );
  
          velocityContext.put( "iconFile", iconFile == null ? "GenericJavaApp.icns" : iconFile.getName() );
  
          velocityContext.put( "version", version );
  
          velocityContext.put( "jvmVersion", jvmVersion );
  
          StringBuffer jarFilesBuffer = new StringBuffer();
  
          jarFilesBuffer.append( "<array>" );
          for ( int i = 0; i < files.size(); i++ )
          {
              String name = (String) files.get( i );
              jarFilesBuffer.append( "<string>" );
              jarFilesBuffer.append( "$JAVAROOT/" ).append( name );
              jarFilesBuffer.append( "</string>" );
  
          }
          if ( additionalClasspath != null )
          {
              for ( int i = 0; i < additionalClasspath.size(); i++ )
              {
                  String pathElement = (String) additionalClasspath.get( i );
                  jarFilesBuffer.append( "<string>" );
                  jarFilesBuffer.append( pathElement );
                  jarFilesBuffer.append( "</string>" );
  
              }
          }
          jarFilesBuffer.append( "</array>" );
  
          velocityContext.put( "classpath", jarFilesBuffer.toString() );
  
          try
          {
  
              String encoding = detectEncoding(dictionaryFile, velocityContext);
  
              getLog().debug( "Detected encoding " + encoding + " for dictionary file " +dictionaryFile  );
  
              Writer writer = new OutputStreamWriter( new FileOutputStream(infoPlist), encoding );
  
              velocity.getEngine().mergeTemplate( dictionaryFile, encoding, velocityContext, writer );
  
              writer.close();
          }
          catch ( IOException e )
          {
              throw new MojoExecutionException( "Could not write Info.plist to file " + infoPlist, e );
          }
          catch ( ParseErrorException e )
          {
              throw new MojoExecutionException( "Error parsing " + dictionaryFile, e );
          }
          catch ( ResourceNotFoundException e )
          {
              throw new MojoExecutionException( "Could not find resource for template " + dictionaryFile, e );
          }
          catch ( MethodInvocationException e )
          {
              throw new MojoExecutionException(
                  "MethodInvocationException occured merging Info.plist template " + dictionaryFile, e );
          }
          catch ( Exception e )
          {
              throw new MojoExecutionException( "Exception occured merging Info.plist template " + dictionaryFile, e );
          }
  
      }