public void execute() throws MojoExecutionException {
        if (!xcrunCommandLine.exists()) {
            throw new MojoExecutionException("Invalid path for xcrun: " + xcrunCommandLine.getAbsolutePath());
        }
        if (appName == null) {
            throw new MojoExecutionException("AppName must be defined.");
        }

        CommandExecutor executor = CommandExecutor.Factory.createDefaultCommmandExecutor();
        executor.setLogger(this.getLog());
        List<String> commands = new ArrayList<String>();
        commands.add("-sdk");
        commands.add("iphoneos");
        commands.add("PackageApplication");
        commands.add("-v");

        File appDirectory = new File(buildDirectory, xcodeConfiguration + "-iphoneos");

        File appFile = new File(appDirectory, appName + ".app");

        commands.add(appFile.getAbsolutePath());
        commands.add("-o");

        File artifactsDir = new File(buildDirectory, "artifacts");
        artifactsDir.mkdirs();

        File ipaFile = new File(artifactsDir, appName + ".ipa");
        commands.add(ipaFile.getAbsolutePath());

        getLog().info(xcrunCommandLine.getAbsolutePath() + " " + commands.toString());

        try {
            executor.executeCommand(xcrunCommandLine.getAbsolutePath(), commands, true);

        } catch (ExecutionException e) {
            getLog().error(executor.getStandardOut());
            getLog().error(executor.getStandardError());
            throw new MojoExecutionException("Error while executing: ", e);
        }

        ZipCreator creator = new ZipCreator(appDirectory);
        File zipFile = new File(artifactsDir, appName + ".app.dSYM.zip");

        try {
            creator.createZipFromDirectory(new File(appDirectory, appName + ".app.dSYM"), zipFile);
        } catch (IOException e) {
            throw new MojoExecutionException("Error while creating dSYM Zip: ", e);
        }
    }