0 Replies Latest reply on Apr 2, 2012 7:58 AM by skunjumohamed

    jboss-as-maven-plugin 7 deploy exploded directory

    skunjumohamed

      Hi,

       

      I am trying to deploy an exploded EAR application with the traditional J2EE structure (with Jar+EJB+War inside EAR) using maven, using the plugin, jboss-as-maven-plugin version 7.1.0.Beta1b. I could not find a goal that supports deploying exploded directory in the plugin reference.

       

      The current plugin configuration that successfully deploys a .ear file is as below.

       

       

      <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-ear-plugin</artifactId>

                      <version>2.6</version>

                      <configuration>

                          <version>6</version>

                          <defaultLibBundleDir>lib</defaultLibBundleDir>

                          <modules>

                           <webModule>

                             <groupId>${project.groupId}</groupId>

                             <artifactId>${webmodule.name}</artifactId>

                             <contextRoot>/myWebApp</contextRoot>

                           </webModule>

                          </modules>

                      </configuration>

                  </plugin>

       

      The current JBoss AS 7 Plugin is

               

                <plugin>

                     <groupId>org.jboss.as.plugins</groupId>

                     <artifactId>jboss-as-maven-plugin</artifactId>

                     <version>7.1.0.Beta1b</version>

                     <inherited>true</inherited>

                     <configuration>

                          <hostname>localhost</hostname>

                          <port>9999</port>

                          <filenames>${project.build.finalName}.ear</filenames>

                     </configuration>

                      <executions>

                          <execution>

                              <phase>package</phase>

                              <goals>

                                  <goal>deploy</goal>

                              </goals>

                          </execution>

                      </executions>

                  </plugin>

       

       

      The above plugins generates and deploys the ear file.

       

      Now I want to deploy the exploded directory. For that purpose, I have modified the maven-ear-plugin as follows (added two elements, unpackTypes and workDirectory)

       

      <plugin>

                      <groupId>org.apache.maven.plugins</groupId>

                      <artifactId>maven-ear-plugin</artifactId>

                      <version>2.6</version>

                      <configuration>

                          <version>6</version>

                          <defaultLibBundleDir>lib</defaultLibBundleDir>

                          <unpackTypes>war,ejb</unpackTypes>

                          <workDirectory>target/${project.build.finalName}.ear</workDirectory>

                          <modules>

                           <webModule>

                             <groupId>${project.groupId}</groupId>

                             <artifactId>${webmodule.name}</artifactId>

                             <contextRoot>/myWebApp</contextRoot>

                           </webModule>

                          </modules>

                      </configuration>

                  </plugin>

       

      But it fails and complains (No such file or directory).

       

      Can some one guide me on how to deploy the exploded directory in this case ?

       

      Thanks,

      Shameer