title: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project duke tutoring
body: <pre><code>Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project dukes-tutoring-war: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy failed: Failed to create deployer with implementation class org.codehaus.cargo.container.glassfish.GlassFish4xInstalledLocalDeployer for the parameters (container [id = [glassfish4x]], deployer type [installed]). InvocationTargetException: The container configuration directory "/home/yogesh/Downloads/glassfish4/glassfish4/glassfish/domains" does not exist. Please configure the container before attempting to perform any local deployment. Read more on: http://cargo.codehaus.org/Local+Configuration -&gt; [Help 1]
  
  To see the full stack trace of the errors, re-run Maven with the -e switch.
  Re-run Maven using the -X switch to enable full debug logging.
  
  For more information about the errors and possible solutions, please read the following articles:
  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
  
  After correcting the problems, you can resume the build with the command
    mvn &lt;goals&gt; -rf :dukes-tutoring-war
  </code></pre>
  
  <p>my pom.xml fromdukes-tutoring-war ---------</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;artifactId&gt;dukes-tutoring&lt;/artifactId&gt;
          &lt;groupId&gt;org.glassfish.javaeetutorial&lt;/groupId&gt;
          &lt;version&gt;7.0.5&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;org.glassfish.javaeetutorial&lt;/groupId&gt;
      &lt;artifactId&gt;dukes-tutoring-war&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;dukes-tutoring-war&lt;/name&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
              &lt;artifactId&gt;dukes-tutoring-common&lt;/artifactId&gt;
              &lt;version&gt;${project.version}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven.exec.plugin.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;create-tutoring-realm&lt;/id&gt;
                          &lt;phase&gt;compile&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;exec&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;skip&gt;false&lt;/skip&gt;
                      &lt;executable&gt;/home/yogesh/Downloads/glassfish4/glassfish/bin/asadmin${glassfish.executables.suffix}&lt;/executable&gt;
                      &lt;arguments&gt;
                          &lt;argument&gt;create-auth-realm&lt;/argument&gt;
                          &lt;argument&gt;--classname&lt;/argument&gt;
                          &lt;argument&gt;com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm&lt;/argument&gt;
                          &lt;argument&gt;--property&lt;/argument&gt;
                          &lt;argument&gt;jaas-context=jdbcRealm:datasource-jndi='java:global/TutoringDataSource':user-table=tutoring.PERSON:user-name-column=email:password-column=password:group-table=tutoring.PERSON:group-name-column=DTYPE:digest-algorithm=none&lt;/argument&gt;
                          &lt;argument&gt;tutoringRealm&lt;/argument&gt;
                      &lt;/arguments&gt;
                      &lt;successCodes&gt;
                          &lt;successCode&gt;0&lt;/successCode&gt;
                          &lt;successCode&gt;1&lt;/successCode&gt;
                      &lt;/successCodes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The pom in examples folder for <code>&lt;glassfish.home.prefix&gt;</code> settings </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;org.glassfish.javaeetutorial&lt;/groupId&gt;
      &lt;artifactId&gt;javaeetutorial&lt;/artifactId&gt;
      &lt;version&gt;7.0.5&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;name&gt;javaeetutorial&lt;/name&gt;
  
      &lt;scm&gt;
          &lt;connection&gt;scm:svn:https://svn.java.net/svn/javaeetutorial~svn/tags/javaeetutorial-7.0.0&lt;/connection&gt;
          &lt;developerConnection&gt;scm:svn:https://svn.java.net/svn/javaeetutorial~svn/tags/javaeetutorial-7.0.0&lt;/developerConnection&gt;
      &lt;/scm&gt;
      &lt;issueManagement&gt;
          &lt;system&gt;IssueTracker&lt;/system&gt;
          &lt;url&gt;http://java.net/jira/browse/JAVAEETUTORIAL&lt;/url&gt;
      &lt;/issueManagement&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;javaee.api.version&gt;7.0&lt;/javaee.api.version&gt;
          &lt;maven.compiler.plugin.version&gt;3.1&lt;/maven.compiler.plugin.version&gt;
          &lt;maven.source.plugin.version&gt;2.2.1&lt;/maven.source.plugin.version&gt;
          &lt;maven.clean.plugin.version&gt;2.5&lt;/maven.clean.plugin.version&gt;
          &lt;maven.war.plugin.version&gt;2.3&lt;/maven.war.plugin.version&gt;
          &lt;maven.acr.plugin.version&gt;1.0&lt;/maven.acr.plugin.version&gt;
          &lt;maven.ear.plugin.version&gt;2.8&lt;/maven.ear.plugin.version&gt;
          &lt;maven.ejb.plugin.version&gt;2.3&lt;/maven.ejb.plugin.version&gt;
          &lt;maven.jar.plugin.version&gt;2.4&lt;/maven.jar.plugin.version&gt;
          &lt;maven.rar.plugin.version&gt;2.3&lt;/maven.rar.plugin.version&gt;
          &lt;maven.license.plugin.version&gt;1.10.b1&lt;/maven.license.plugin.version&gt;
          &lt;maven.release.plugin.version&gt;2.4.1&lt;/maven.release.plugin.version&gt;
          &lt;maven.exec.plugin.version&gt;1.2.1&lt;/maven.exec.plugin.version&gt;
          &lt;junit.version&gt;4.11&lt;/junit.version&gt;
          &lt;eclipselink.version&gt;2.5.0&lt;/eclipselink.version&gt;
          &lt;glassfish.embedded.version&gt;4.0&lt;/glassfish.embedded.version&gt;
          &lt;cargo.plugin.version&gt;1.4.4&lt;/cargo.plugin.version&gt;
          &lt;glassfish.domain.name&gt;domain1&lt;/glassfish.domain.name&gt;
          &lt;glassfish.home&gt;${glassfish.home.prefix}/glassfish4&lt;/glassfish.home&gt;
          &lt;integration.container.id&gt;glassfish4x&lt;/integration.container.id&gt;
      &lt;/properties&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;windows&lt;/id&gt;
              &lt;activation&gt;
                  &lt;os&gt;
                      &lt;family&gt;windows&lt;/family&gt;
                  &lt;/os&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;glassfish.home.prefix&gt;c:/&lt;/glassfish.home.prefix&gt;
                  &lt;glassfish.executables.suffix&gt;.bat&lt;/glassfish.executables.suffix&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;unix&lt;/id&gt;
              &lt;activation&gt;
                  &lt;os&gt;
                      &lt;family&gt;unix&lt;/family&gt;
                  &lt;/os&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;glassfish.home.prefix&gt;/home/yogesh/Downloads/glassfish4&lt;/glassfish.home.prefix&gt;
                  &lt;glassfish.executables.suffix /&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;sdk&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;glassfish.home&gt;${basedir}/../../../&lt;/glassfish.home&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;development&lt;/id&gt;
              &lt;activation&gt;
                  &lt;file&gt;
                      &lt;exists&gt;${basedir}/../bundle&lt;/exists&gt;
                  &lt;/file&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;glassfish.home&gt;${glassfish.home.prefix}/glassfish4&lt;/glassfish.home&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;standalone&lt;/id&gt;
              &lt;properties&gt;
                  &lt;glassfish.home&gt;${basedir}/target/cargo/installs/glassfish&lt;/glassfish.home&gt;
                  &lt;cargo.maven.containerUrl&gt;http://dlc.sun.com.edgesuite.net/glassfish/4.0/promoted/latest-glassfish.zip&lt;/cargo.maven.containerUrl&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;modules&gt;
          &lt;module&gt;archetypes&lt;/module&gt;
          &lt;module&gt;batch&lt;/module&gt;
          &lt;module&gt;case-studies&lt;/module&gt;
          &lt;module&gt;cdi&lt;/module&gt;
          &lt;module&gt;concurrency&lt;/module&gt;
          &lt;module&gt;connectors&lt;/module&gt;
          &lt;module&gt;ejb&lt;/module&gt;
          &lt;module&gt;jaxrs&lt;/module&gt;
          &lt;module&gt;jaxws&lt;/module&gt;
          &lt;module&gt;jms&lt;/module&gt;
          &lt;module&gt;persistence&lt;/module&gt;
          &lt;module&gt;security&lt;/module&gt;
          &lt;module&gt;web&lt;/module&gt;
      &lt;/modules&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;snapshot-repository.java.net&lt;/id&gt;
              &lt;name&gt;Java.net Snapshot Repository for Maven&lt;/name&gt;
              &lt;url&gt;https://maven.java.net/content/repositories/staging/&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;releases-repository.java.net&lt;/id&gt;
              &lt;name&gt;Java.net releases Repository for Maven&lt;/name&gt;
              &lt;url&gt;https://maven.java.net/content/repositories/releases/&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;build&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${maven.compiler.plugin.version}&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${maven.source.plugin.version}&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${maven.clean.plugin.version}&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${maven.war.plugin.version}&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
                      &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${cargo.plugin.version}&lt;/version&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
                  &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
                  &lt;inherited&gt;true&lt;/inherited&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;deploy&lt;/id&gt;
                          &lt;phase&gt;integration-test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;redeploy&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;container&gt;
                          &lt;containerId&gt;${integration.container.id}&lt;/containerId&gt;
                          &lt;type&gt;installed&lt;/type&gt;
                          &lt;home&gt;${glassfish.home}&lt;/home&gt;
                      &lt;/container&gt;
                      &lt;configuration&gt;
                          &lt;type&gt;existing&lt;/type&gt;
                          &lt;home&gt;${glassfish.home}/glassfish/domains&lt;/home&gt;
                          &lt;properties&gt;
                              &lt;cargo.glassfish.domain.name&gt;${glassfish.domain.name}&lt;/cargo.glassfish.domain.name&gt;
                              &lt;!--cargo.remote.username&gt;&lt;/cargo.remote.username--&gt;
                              &lt;cargo.remote.password /&gt;
                          &lt;/properties&gt;
                      &lt;/configuration&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven.compiler.plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.mycila.maven-license-plugin&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-license-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven.license.plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;header&gt;common/license.txt&lt;/header&gt;
                      &lt;excludes&gt;
                          &lt;exclude&gt;common/**&lt;/exclude&gt;
                          &lt;exclude&gt;**/META-INF/**&lt;/exclude&gt;
                          &lt;exclude&gt;**/WEB-INF/**&lt;/exclude&gt;
                          &lt;exclude&gt;**/nbactions.xml&lt;/exclude&gt;
                          &lt;exclude&gt;**/nb-configuration.xml&lt;/exclude&gt;
                          &lt;exclude&gt;**/glassfish-resources.xml&lt;/exclude&gt;
                          &lt;exclude&gt;**/simple-flow-flow.xml&lt;/exclude&gt;
                      &lt;/excludes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven.release.plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;!--
                       During release:perform, enable the "sdk" profile
                      --&gt;
                      &lt;releaseProfiles&gt;sdk&lt;/releaseProfiles&gt;
                      &lt;autoVersionSubmodules&gt;true&lt;/autoVersionSubmodules&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;${javaee.api.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>my glassfish4 location: /home/yogesh/Downloads/glassfish4 
  apache maven location: /opt/apache-maven-3.3.9 </p>