PageRenderTime 19ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/maven-amps-plugin/src/main/java/com/atlassian/maven/plugins/amps/pdk/TestInstallMojo.java

https://bitbucket.org/mmeinhold/amps
Java | 30 lines | 27 code | 3 blank | 0 comment | 1 complexity | bdf844063e6b1c5cdce5bb40d785bf8b MD5 | raw file
 1package com.atlassian.maven.plugins.amps.pdk;
 2
 3import com.atlassian.maven.plugins.amps.PdkParams;
 4import com.atlassian.maven.plugins.amps.product.ProductHandler;
 5
 6import org.apache.maven.plugin.MojoExecutionException;
 7import org.apache.maven.plugin.MojoFailureException;
 8import org.apache.maven.plugins.annotations.Mojo;
 9
10@Mojo(name = "test-install")
11public class TestInstallMojo extends AbstractPdkMojo
12{
13    public void execute() throws MojoExecutionException, MojoFailureException
14    {
15        if(shouldBuildTestPlugin())
16        {
17            ensurePluginKeyExists();
18            final ProductHandler product = createProductHandler(getProductId());
19            getMavenGoals().installPlugin(new PdkParams.Builder()
20                    .testPlugin(true)
21                    .pluginKey(pluginKey)
22                    .server(server)
23                    .port(getHttpPort(product))
24                    .contextPath(getContextPath(product))
25                    .username(username)
26                    .password(password)
27                    .build());
28        }
29    }
30}