3 Replies Latest reply on Dec 7, 2011 12:05 PM by maxandersen

    Problem with Deployment to AS 7

    thomas.letsch

      Hi,

       

      I am using Eclipse Indigo with the M4 Release of JBoss Tools. When deploying my web application in eclipse to my JBoss AS 7.0.2 the WEB-INF/lib directory is not populated with dependent libraries.

       

      My Eclipse project is build with maven eclipse:eclipse. Here are some information:

       

       

      .setting/org.eclipse.wst.common.component:

      ...(all dependencies look the same)

      <dependent-module archiveName="commons-lang-2.5.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5.jar">

            <dependency-type>uses</dependency-type>

          </dependent-module>

      ...

       

      pom.xml:

      ...

          <dependency>
              <groupId>commons-lang</groupId>
              <artifactId>commons-lang</artifactId>
              <version>${commons-lang.version}</version>
          </dependency>

      ...

                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-eclipse-plugin</artifactId>
                      <version>2.8</version>
                      <inherited>true</inherited>
                      <configuration>
                          <downloadSources>true</downloadSources>
                          <useProjectReferences>false</useProjectReferences>
                          <workspace>C:\dev\workspaces\default</workspace>
                          <wtpversion>2.0</wtpversion>
                          <excludes>
                              <exclude>com.google.gwt:gwt-user</exclude>
                              <exclude>com.google.gwt:gwt-servlet</exclude>
                              <exclude>com.google.gwt:gwt-dev</exclude>
                          </excludes>
                          <additionalProjectnatures>
                              <projectnature>com.google.gwt.eclipse.core.gwtNature</projectnature>
                              <projectnature>com.google.gdt.eclipse.core.webAppNature</projectnature>
                          </additionalProjectnatures>
                          <additionalBuildcommands>
                              <buildCommand>
                                  <name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
                              </buildCommand>
                              <buildCommand>
                                  <name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
                              </buildCommand>
                              <buildCommand>
                                  <name>com.google.appengine.eclipse.core.projectValidator</name>
                              </buildCommand>
                          </additionalBuildcommands>
                          <classpathContainers>
                              <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
                              <classpathContainer>com.google.gwt.eclipse.core.GWT_CONTAINER</classpathContainer>
                          </classpathContainers>
                          <additionalConfig>
                              <file>
                                  <name>.settings/com.google.gdt.eclipse.core.prefs</name>
                                  <content><![CDATA[
                                          eclipse.preferences.version=2
                                          jarsExcludedFromWebInfLib=
                                          warSrcDir=src/main/webapp
                                          warSrcDirIsOutput=true
                                          ]]>
                                  </content>
                              </file>
                          </additionalConfig>
                          <buildOutputDirectory>${basedir}/src/main/webapp/WEB-INF/classes</buildOutputDirectory>
                      </configuration>
                  </plugin>

       

      Thanks,
      Thomas

        • 1. Re: Problem with Deployment to AS 7
          maxandersen

          Do not use mvn eclipse:eclipse.

           

          It generates incomplete/incorrect maven project metadata for use with Eclipse WTP.

           

          Use m2eclipse with m2e-wtp for a much better result. If you install JBoss Tools Maven plugins you get those for "free"

           

          If it also occur there then I'm very interested since then that is a serious bug.

          • 2. Re: Problem with Deployment to AS 7
            thomas.letsch

            Hi Max,

             

            thanks for the hint. Until now I considered m2eclipse as being not useable, any zests with slightly considered projects failed at some point.

             

            But now after configuring everything (took me some hours) deployment works absolute correct.

             

            R.,
            Thomas

            • 3. Re: Problem with Deployment to AS 7
              maxandersen

              Glad to hear - and yes m2eclipse have had its issues and we've been working hard on making that much better.

               

              If you find issues let us know and we'll do what we can to help