docs: public void execute()
          throws MojoExecutionException
      {
  
          // Set up and create directories
          buildDirectory.mkdirs();
  
          File bundleDir = new File( buildDirectory, bundleName + ".app" );
          bundleDir.mkdirs();
  
          File contentsDir = new File( bundleDir, "Contents" );
          contentsDir.mkdirs();
  
          File resourcesDir = new File( contentsDir, "Resources" );
          resourcesDir.mkdirs();
  
          File javaDirectory = new File( resourcesDir, "Java" );
          javaDirectory.mkdirs();
  
          File macOSDirectory = new File( contentsDir, "MacOS" );
          macOSDirectory.mkdirs();
  
          // Copy in the native java application stub
          File stub = new File( macOSDirectory, javaApplicationStub.getName() );
          if(! javaApplicationStub.exists()) {
              String message = "Can't find JavaApplicationStub binary. File does not exist: " + javaApplicationStub;
  
              if(! isOsX() ) {
                  message += "\nNOTICE: You are running the osxappbundle plugin on a non OS X platform. To make this work you need to copy the JavaApplicationStub binary into your source tree. Then configure it with the 'javaApplicationStub' configuration property.\nOn an OS X machine, the JavaApplicationStub is typically located under /System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub";
              }
  
              throw new MojoExecutionException( message);
              
          } else {
              try
              {
                  FileUtils.copyFile( javaApplicationStub, stub );
              }
              catch ( IOException e )
              {
                  throw new MojoExecutionException(
                      "Could not copy file " + javaApplicationStub + " to directory " + macOSDirectory, e );
              }
          }
  
          // Copy icon file to the bundle if specified
          if ( iconFile != null )
          {
              try
              {
                  FileUtils.copyFileToDirectory( iconFile, resourcesDir );
              }
              catch ( IOException e )
              {
                  throw new MojoExecutionException( "Error copying file " + iconFile + " to " + resourcesDir, e );
              }
          }
  
          // Resolve and copy in all dependecies from the pom
          List files = copyDependencies( javaDirectory );
  
          // Create and write the Info.plist file
          File infoPlist = new File( bundleDir, "Contents/Info.plist" );
          writeInfoPlist( infoPlist, files );
  
          // Copy specified additional resources into the top level directory
          if (additionalResources != null && !additionalResources.isEmpty())
          {
              copyResources( additionalResources );
          }
  
  		if (copyElements != null && !copyElements.isEmpty())
  			copyElements();
  		
  		if(createApplicationSymbolicLink!=null &&createApplicationSymbolicLink.equals(Boolean.TRUE) && isOsX())
  			createApplicationSymbolicLink();
          
          if ( isOsX() )
          {
              // Make the stub executable
              Commandline chmod = new Commandline();
              try
              {
                  chmod.setExecutable( "chmod" );
                  chmod.createArgument().setValue( "755" );
                  chmod.createArgument().setValue( stub.getAbsolutePath() );
  
                  chmod.execute();
              }
              catch ( CommandLineException e )
              {
                  throw new MojoExecutionException( "Error executing " + chmod + " ", e );
              }
  
              String setFileStr = null;
              for (String setFilePath : SET_FILE_PATH) {
              	setFileStr = setFilePath;
              	if (new File(setFileStr).exists())
              		break;
              }
              // This makes sure that the .app dir is actually registered as an application bundle
              if ( new File( setFileStr ).exists() )
              {
                  Commandline setFile = new Commandline();
                  try
                  {
                      setFile.setExecutable(setFileStr);
                      setFile.createArgument().setValue( "-a B" );
                      setFile.createArgument().setValue( bundleDir.getAbsolutePath() );
  
                      setFile.execute();
                  }
                  catch ( CommandLineException e )
                  {
                      throw new MojoExecutionException( "Error executing " + setFile, e );
                  }
              }
              else
              {
                  getLog().warn( "Could  not set 'Has Bundle' attribute. " +SET_FILE_PATH +" not found, is Developer Tools installed?" );
              }
              // Create a .dmg file of the app
              Commandline dmg = new Commandline();
              try
              {
                  dmg.setExecutable( "hdiutil" );
                  dmg.createArgument().setValue( "create" );
                  dmg.createArgument().setValue( "-srcfolder" );
                  dmg.createArgument().setValue( buildDirectory.getAbsolutePath() );
                  dmg.createArgument().setValue( diskImageFile.getAbsolutePath() );
                  try
                  {
                      dmg.execute().waitFor();
                  }
                  catch ( InterruptedException e )
                  {
                      throw new MojoExecutionException( "Thread was interrupted while creating DMG " + diskImageFile, e );
                  }
              }
              catch ( CommandLineException e )
              {
                  throw new MojoExecutionException( "Error creating disk image " + diskImageFile, e );
              }
              if(internetEnable) {
                  try {
  
                      Commandline internetEnable = new Commandline();
  
                      internetEnable.setExecutable("hdiutil");
                      internetEnable.createArgument().setValue("internet-enable" );
                      internetEnable.createArgument().setValue("-yes");
                      internetEnable.createArgument().setValue(diskImageFile.getAbsolutePath());
  
                      internetEnable.execute();
                  } catch (CommandLineException e) {
                      throw new MojoExecutionException("Error internet enabling disk image: " + diskImageFile, e);
                  }
              }
              projectHelper.attachArtifact(project, "dmg", null, diskImageFile);
          }
  
  		if (createApplicationSymbolicLink != null && createApplicationSymbolicLink.equals(Boolean.TRUE))
  			removeApplicationLink();
          
          zipArchiver.setDestFile( zipFile );
          try
          {
              String[] stubPattern = {buildDirectory.getName() + "/" + bundleDir.getName() +"/Contents/MacOS/"
                                      + javaApplicationStub.getName()};
              
  
              zipArchiver.addDirectory( buildDirectory.getParentFile(), new String[]{buildDirectory.getName() + "/**"},
              		stubPattern);
  
              DirectoryScanner scanner = new DirectoryScanner();
              scanner.setBasedir( buildDirectory.getParentFile() );
              scanner.setIncludes(stubPattern);
              scanner.scan();
  
              String[] stubs = scanner.getIncludedFiles();
              for ( int i = 0; i < stubs.length; i++ )
              {
                  String s = stubs[i];
                  zipArchiver.addFile( new File( buildDirectory.getParentFile(), s ), s, 0755 );
              }
  
              zipArchiver.createArchive();
              projectHelper.attachArtifact(project, "zip", null, zipFile);
          }
          catch ( ArchiverException e )
          {
              throw new MojoExecutionException( "Could not create zip archive of application bundle in " + zipFile, e );
          }
          catch ( IOException e )
          {
              throw new MojoExecutionException( "IOException creating zip archive of application bundle in " + zipFile,
                                                e );
          }
  
  
      }