@@ -0,0 +1,2706 @@
+package com.github.chrisprice.phonegapbuild.plugin;%0A%0Aimport org.apache.maven.plugin.AbstractMojo;%0Aimport org.apache.maven.plugin.MojoExecutionException;%0Aimport org.apache.maven.plugin.MojoFailureException;%0A%0Aimport com.github.chrisprice.phonegapbuild.api.data.HasResourceIdAndPath;%0Aimport com.github.chrisprice.phonegapbuild.api.data.me.MeResponse;%0Aimport com.github.chrisprice.phonegapbuild.api.data.resources.App;%0Aimport com.github.chrisprice.phonegapbuild.api.data.resources.Key;%0Aimport com.github.chrisprice.phonegapbuild.api.managers.AppsManager;%0Aimport com.github.chrisprice.phonegapbuild.api.managers.KeysManager;%0Aimport com.github.chrisprice.phonegapbuild.api.managers.MeManager;%0Aimport com.sun.jersey.api.client.WebResource;%0A%0A/**%0A * Delete any cloud apps or keys.%0A * %0A * @goal scorch%0A * @requiresProject false%0A */%0Apublic class ScorchMojo extends AbstractMojo %7B%0A%0A  /**%0A   * PhoneGap Build username%0A   * %0A   * @parameter expression=%22$%7Bphonegap-build.username%7D%22%0A   */%0A  private String username;%0A%0A  /**%0A   * PhoneGap Build password%0A   * %0A   * @parameter expression=%22$%7Bphonegap-build.password%7D%22%0A   */%0A  private String password;%0A%0A  private AppsManager appsManager = new AppsManager();%0A  private MeManager meManager = new MeManager();%0A  private KeysManager keysManager = new KeysManager();%0A%0A  public void execute() throws MojoExecutionException, MojoFailureException %7B%0A    getLog().debug(%22Authenticating.%22);%0A    WebResource webResource = meManager.createRootWebResource(username, password);%0A%0A    getLog().info(%22Requesting summary from cloud.%22);%0A    MeResponse me = meManager.requestMe(webResource);%0A%0A    HasResourceIdAndPath%3CApp%3E%5B%5D apps = me.getApps().getAll();%0A%0A    getLog().info(%22Found %22 + apps.length + %22 apps, starting delete.%22);%0A    for (HasResourceIdAndPath%3CApp%3E app : apps) %7B%0A      getLog().info(%22Deleting cloud app id %22 + app.getResourceId());%0A      appsManager.deleteApp(webResource, app.getResourcePath());%0A    %7D%0A%0A    HasResourceIdAndPath%3CKey%3E%5B%5D keys = me.getKeys().getIos().getAll();%0A%0A    getLog().info(%22Found %22 + keys.length + %22 keys, starting delete.%22);%0A    for (HasResourceIdAndPath%3CKey%3E key : keys) %7B%0A      getLog().info(%22Deleting cloud key id %22 + key.getResourceId());%0A      keysManager.deleteKey(webResource, key.getResourcePath());%0A    %7D%0A%0A  %7D%0A%0A  public void setUsername(String username) %7B%0A    this.username = username;%0A  %7D%0A%0A  public void setPassword(String password) %7B%0A    this.password = password;%0A  %7D%0A%0A  public void setAppsManager(AppsManager appsManager) %7B%0A    this.appsManager = appsManager;%0A  %7D%0A%0A  public void setMeManager(MeManager meManager) %7B%0A    this.meManager = meManager;%0A  %7D%0A%0A  public void setKeysManager(KeysManager keysManager) %7B%0A    this.keysManager = keysManager;%0A  %7D%0A%0A%7D%0A

Add scorch goal