View Javadoc

1   package com.ashlux.mavenoc4jplugin;
2   
3   /**
4    * Start an application in OC4J.
5    *
6    * @goal startApplication
7    */
8   public class StartApplicationMojo extends AbstractOc4jMojo {
9     /**
10     * Application name when deploying the ear.
11     *
12     * @parameter expression="${oc4j.deploymentName}" default-value="${project.artifactId}"
13     */
14    private String applicationName;
15  
16    protected String buildCommand() {
17      String command = getJavaHome() + "/bin/java -jar " + getJ2eeHome() + "/" + getAdminJar() + " " +
18          getConnectionUri() + " " + getUsername() + " " + getPassword() +
19          " -start " + applicationName;
20      getLog().debug("Going to run command [" + command + "].");
21      return command;
22    }
23  
24    public String getApplicationName() {
25      return applicationName;
26    }
27  
28    public void setApplicationName(String applicationName) {
29      this.applicationName = applicationName;
30    }
31  }