@@ -0,0 +1,1901 @@
+/*%0A * Copyright (C) 2009 Jayway AB%0A * Copyright (C) 2007-2008 JVending Masa%0A * Copyright (C) 2010 akwuinet A.G.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.jayway.maven.plugins.android.standalonemojos;%0A%0Aimport com.jayway.maven.plugins.android.AbstractIntegrationtestMojo;%0Aimport org.apache.maven.plugin.MojoExecutionException;%0Aimport org.apache.maven.plugin.MojoFailureException;%0A%0Aimport java.io.File;%0A%0A/**%0A * Redeploys the built apk file, or another specified apk, to a connected device.%0A * This simply tries to undeploy the APK and re-deploy it.%0A * @author clement.escoffier@akquinet.de%0A * @goal redeploy%0A * @requiresProject false%0A * @requiresDependencyResolution runtime%0A */%0Apublic class RedeployMojo extends AbstractIntegrationtestMojo %7B%0A%0A    /**%0A     * Optionally used to specify a different apk file to deploy to a connected emulator or usb device, instead of the%0A     * built apk from this project.%0A     *%0A     * @parameter expression=%22$%7Bandroid.file%7D%22%0A     */%0A    private File file;%0A%0A    public void execute() throws MojoExecutionException, MojoFailureException %7B%0A        if (file == null) %7B%0A            String packageToUndeploy = extractPackageNameFromAndroidManifest(androidManifestFile);%0A            undeployApk(packageToUndeploy);%0A            deployBuiltApk();%0A        %7D else %7B%0A            undeployApk(file);%0A            deployFile(file);%0A        %7D%0A    %7D%0A%0A%7D%0A

Fix issue-49. Add a simple redeploy mojo.