7 Replies Latest reply on Dec 3, 2009 6:12 PM by htfv

    Web Resources folder is empty

    htfv

      If I import a Maven Web-project in Eclipse 3.5.1 with JBoss Tools 3.1.0.M4 installed, I can see the "Web Resources : src/main/webapp" folder in Project Explorer, but it is always empty.

      The same problem was in Eclipse 3.5.0 with JBoss Tools 3.1.0.M3. m2eclipse 0.9.9 Development release was used in both cases. If I use Eclipse 3.4.2 + JBoss Tools 3.0.1 + m2eclipse 0.9.8, I can expand the "Web Resources : src/main/webapp" folder in Project Explorer and see the files from the src/main/webapp folder.

      Both Eclipse 3.5.1/JBoss Tools 3.1.0.M4 and Eclipse 3.4.2/JBoss Tools 3.0.1 generate the same .project, .classpath and .settings/* files. The only difference is that 3.1.0.M4 inserts the following line into org.eclipse.jdt.core.prefs and 3.0.1 does not:

      org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
      


      The problem can be reproduced by importing a simple POM; no other files are needed:

      <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/maven-v4_0_0.xsd">
      
       <modelVersion>4.0.0</modelVersion>
      
       <groupId>org.htfv.test</groupId>
       <artifactId>web-resources-test</artifactId>
       <version>0.0.1-SNAPSHOT</version>
       <packaging>war</packaging>
      
       <build>
       <plugins>
       <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <configuration>
       <source>1.6</source>
       <target>1.6</target>
       </configuration>
       </plugin>
       </plugins>
       </build>
      </project>
      


      Whose problem is this? Is this a problem of JBoss Tools, m2eclipse, or Eclipse? Do I do something wrong? Shall I file a bug against JBoss Tools or m2eclipse?

        • 1. Re: Web Resources folder is empty
          mareshkau

          I have tried to create test project with provided pom.xml and import it using m2eclipse and eclipse 3.5.1 to workspace. I can't see 'Web Resources' leaf at all. I am going to check it for last JBoss Tools.

          • 2. Re: Web Resources folder is empty
            mareshkau

            Web Resources folder not appears for when jboss tools m4, m2eclipse installed.

            • 3. Re: Web Resources folder is empty
              maxandersen

              too many overloaded terms here.

              I suggest you create a jira in JBIDE with screenshots or screencast showing how it looks in the working setup and how it doesn't work in the other setup.

              Then i'll figure out who "owns" it ;)

              • 4. Re: Web Resources folder is empty
                maxandersen

                btw. remember to have the WTP Maven integration installation from m2eclipse update site - without that no integration occurs.

                • 5. Re: Web Resources folder is empty
                  htfv

                  To have clean results, I decided to make a completely new installation of Eclipse. So I re-downloaded everything and unpacked into a new folder and... it worked. I compared contents of the new Eclipse folder with my usual environment and it turned out that I was using Eclipse 3.5.0 with JBoss Tools 3.1.0.M4 by mistake and not Eclipse 3.5.1. Silly me, I screwed up.

                  If you are still interested in steps to reproduce, here they are:


                  1. Download Eclipse 3.5.1 (Galileo SR1) for Java EE from http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-jee-galileo-SR1-win32.zip.

                  2. Unpack eclipse-jee-galileo-SR1-win32.zip to C:\Test-3.5.1.

                  3. Add the following parameter to C:\Test-3.5.1\eclipse\eclipse.ini (required for m2eclipse):
                    -vm
                    C:/Program Files (x86)/Java/jdk1.6.0_13/bin/javaw.exe


                  4. Run Eclipse by executing C:\Test-3.5.1\eclipse\eclipse.exe

                  5. Use C:\Test-3.5.1\workspace as workspace.

                  6. Install all components from http://download.eclipse.org/birt/update-site/2.5/.

                  7. Restart Eclipse when requested.

                  8. Install the following components from http://m2eclipse.sonatype.org/update-dev:

                    • Maven Integration/*
                    • Maven Projects Configurators/Maven Integration for WTP (Optional)
                    • Maven Projects Configurators/Project configurators for commonly used maven plugins (temporary)


                    • Restart Eclipse when requested.

                    • Install all components from http://download.jboss.org/jbosstools/updates/JBossTools-3.1.0.M4/.

                    • Restart Eclipse when requested.

                    • Create C:\Test-3.5.1\project\pom.xml with the following content:
                      <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/maven-v4_0_0.xsd">
                      
                       <modelVersion>4.0.0</modelVersion>
                      
                       <groupId>org.htfv.test</groupId>
                       <artifactId>web-resources-test</artifactId>
                       <version>0.0.1-SNAPSHOT</version>
                       <packaging>war</packaging>
                      
                       <build>
                       <plugins>
                       <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-compiler-plugin</artifactId>
                       <configuration>
                       <source>1.6</source>
                       <target>1.6</target>
                       </configuration>
                       </plugin>
                       </plugins>
                       </build>
                      </project>


                    • Select File/Import...

                    • Select Maven/Existing Maven Projects in the Import dialog, click Next.

                    • Specify C:\Test-3.5.1\project as root directory (/pom.xml shall be selected automatically) and click Finish.


                      After the last point I wanted to make the first screenshot, but it did work. The Web Resources node in Project Explorer may be expanded and contains files from src/main/webapp (the files are generated when the project is imported).

                      Sorry for taking your time and... thanks!


                  • 6. Re: Web Resources folder is empty
                    nickboldt

                    Just FYI, you don't have to add, select, install, restart, add, select, install, restart, add, select, install, restart to get JBT installed. Add the three update sites (in steps 6, 8, 10), pick the stuff you want from JBT (step 10), and let p2 resolve all the dependencies.

                    Then the process becomes much simpler: add, add, add, select, install, restart

                    See also: http://jboss.org/tools/download/update.html#fromzip

                    • 7. Re: Web Resources folder is empty
                      htfv

                      Well, I don't do this operation every day, so it's not a problem. It just fells safer :)