5 Replies Latest reply on Sep 10, 2012 8:45 AM by fbricon

    JBoss Tools 3.3 on Indigo with M2E  src/main/resources Problem

    baz

      Hello,

      my current setup is

      Eclipse Indigo SR2

      JBoss Tools 3.3

       

      I created a maven project with a couple of modules. My resources go into the directory src/main/resources

      After importing this project, i detectet the problem, that my resources get not copied to the deployment.

      The build paths in eclipse project shows **/* as exclusion filter

       

      Searching the Internet revealed that this is a known problem

      m2e 1.2 should mend this.

      So i installed a fresh copy of eclipse and added only the newest versions of m2e(1.2.x) and m2e-wtp(1,6.x)

      With that setup, my resources get copied, and the exclusion filter for resources is used. This is one step further because

      the build paths in eclipse shows **/* as exclusion filter

       

      Next natural step for me was to try to install JBoss Tools on top on this working setup.

      Due to conflicts between the different m2e versions(the one installed and the other that should bi installed) this does not work.

       

      My question is: How could i get both of these now:

      a working m2e and a working JBoss Tools for Indigo

       

      The only option i see is: do not use JBoss Tools for now(for the current project)(this will  very, very hard to choose ) and wait a couple of month until there is a fresh version of JBoss Tools out without this kind of .......(choose a word for yourself;-))

      Ciao,

        • 1. Re: JBoss Tools 3.3 on Indigo with M2E  src/main/resources Problem
          fbricon

          The resource exclusion/ resource filtering thing is fixed since m2e 1.0, so you shouldn't see the problem in JBT 3.3.

          Depends how you imported the projects in your workspace. You need to import as maven projects.

           

          You can try either right-clicking on your project > Maven > Update Project Configuration or going to the Project menu > Clean... That should force the maven-resource-plugin to execute;

           

          As for installing JBT with m2e 1.2, you'll need to try the nightly builds of JBT 4.0 from http://download.jboss.org/jbosstools/builds/nightly/trunk/latest/all/repo/ or wait a couple weeks until we release JBT 4.0 Alpha1

          1 of 1 people found this helpful
          • 2. Re: JBoss Tools 3.3 on Indigo with M2E  src/main/resources Problem
            baz

            Fred, thanks for your time to answer.

            Fred Bricon schrieb:

             

            The resource exclusion/ resource filtering thing is fixed since m2e 1.0,

            I thought that it was But,

            i see the Problem, either with JBT 3.3 and with m2e 1.0 standalone

            Project/clean does not help. The same holds for: project > Maven > Update Project Configuration

            With m2e 1.2 the problem is gone.

            While trying to solve the problem, i have imported the projects as maven project several times. So this is sorted out

             

            My setup is under Win7 in case thats matters.

             

            We have decided to

            1. Set up a standard maven archefact with resource folders (and waiting for JBT 4.0

            2. For the current project we move the resources from src/main/resources to src/main/java as a little workaround

             

            Ciao,

            Carsten

            • 3. Re: JBoss Tools 3.3 on Indigo with M2E  src/main/resources Problem
              fbricon

              Can you try creating a project using the multi-javaee6-archetype from http://open-archetypes.github.com/maven-repo/snapshots/ 

               

              In Eclipse, first add the Open Archetypes catalog :

              • On the Archetypes Preferences page (Window > Preferences > Maven > Archetypes), click on the "Add Remote Catalog..." button
              • Click OK to close the dialog
              • Click OK to close the preferences

              Now you can create a new project, using the Maven wizard :

              • Create a new Maven project
              • Click Next to land on the Archetype page
              • Select the Open Archetypes (Snapshots) catalog
              • Check the "Include Snapshots" button
              • Select multi-javaee6-archetype and click Next
              • Enter the Group Id, Artifact Id and Version informations.

               

              You'll have maven modules created under a parent project. Select the <artifactId>-util project and run Junit Tests on it. There's one test based on reading a filtered resource file. And I know for a fact it's working :-)

              If it does work for you, then there might be something fishy in your own project that messes up m2e 1.0, but that is somehow fixed in 1.2. In that case, you'll have to provide us a sample project reproducing your issue.

              If the multi-javaee6-archetype test doesn't work for you, then something's wrong with your eclipse installation. I can only suggest to start from a clean eclipse JavaEE distro and start over.

              • 4. Re: JBoss Tools 3.3 on Indigo with M2E  src/main/resources Problem
                baz

                Hello Fred,

                when i tried to follow receipt i get an error in the last step:

                Unable to create project from archetype [org.openarchetypes:multi-javaee6-archetype:0.0.1-SNAPSHOT -> http://open-archetypes.github.com/maven-repo/snapshots]

                Archetype org.openarchetypes:multi-javaee6-archetype:0.0.1-SNAPSHOT is not configured

                    Property enable_openshift is missing.

                 

                The second try succed and your test is green

                 

                 

                However, after setting up Eclipse(with JBT 3.3) again,  all is working

                 

                While in the old installation, with the same project(i copied it from here to the newly created workspace) it does NOT work.  Very Strange

                 

                Thanks for your time answering my questions.

                 

                Ciao,

                Carsten

                • 5. Re: JBoss Tools 3.3 on Indigo with M2E  src/main/resources Problem
                  fbricon

                  Yeah the archetype error is due to a bug in m2e, fixed in upcoming m2e 1.2.

                   

                  Unfortunately, since your problem is very specific to your installation, it's gonna be hard figuring out why it's buggy.

                  Anyway, glad you found a way to get it to work.