1 2 3 Previous Next 44 Replies Latest reply on Apr 3, 2007 6:46 AM by adrian.brock Go to original post
      • 30. Re: Migration to maven

         

        "alesj" wrote:
        "pgier" wrote:

        Try doing an "mvn -U -up" to make sure that you have everything up to date. If that doesn't work, the jbossxb version number that it's looking for should be picked up from the microcontainer parent. Make sure that this parent pom is up to date with svn and includes the jbossxb dependency in the dependencyManagement section.


        It was my mistake, my IDE doesn't update files in project's root directory (strange, but real ;-).
        Thanks for the help and also to Kevin, who also realized what the problem is.


        Eclipse doesn't either. I currently have to resynch outside eclipse then refresh
        which is a pain.

        That is why it is better to have a top level project call
        'build" instead of using the "root" of the project for the pom/build.

        • 31. Re: Migration to maven

           

          "Kevin.Conner@jboss.com" wrote:

          To rectify do the following
          - delete projects (not contents)
          - run mvn eclipse:eclipse from root
          - File->Import
          - Choose Existing Projects
          - Browse to root
          - Import generated projects


          This doesn't look like it is going to work unless you create your eclipse workspace
          somewhere else. I guess it wants to copy the project onto itself?

          The error I get is:
          Invalid project description.
           /home/ejort/microcontainer/aop-mc-int overlaps the location of another project: aop-mc-int
          


          I guess it wants to copy the project onto itself?

          I really don't understand why this is so difficult.
          With CVS and ant I used to use eclipse project sets with no problems,
          but that also doesn't work properly with the SVN eclipse plugin :-(

          • 32. Re: Migration to maven
            kconner

             

            "adrian@jboss.org" wrote:
            Ok I will try that, but since I hit the problem with a clean checkout of the
            Microcontainer and a build with Maven before creating the new eclipse
            projects, I don't know whether this entirely consistent? -)

            It should be if you ran the eclipse:eclipse and eclipse:add-maven-repo targets. Let me know how it goes.

            "adrian@jboss.org" wrote:
            src/resources/schema or src/resources/xml-tests in the container project would be examples. After an eclipse:eclipse these are invisible to tests
            run inside eclipse. They have type="src" instead of type="lib' in the .classpath

            I do not believe that matters. It may be that the path to the resource is different, perhaps because it is embedded.

            The normal maven structure would keep the test resources separate from the src resources whereas it appears that the MC structure embeds them. I could change the build to fix this if everyone agrees.

            Can you give me a specific test which fails to find the resource?

            • 33. Re: Migration to maven
              kconner

               

              "adrian@jboss.org" wrote:
              Eclipse doesn't either. I currently have to resynch outside eclipse then refresh which is a pain.

              There is no need for the parent pom to exist in the parent directory, it could be another project pulled in via a parent aggregator.
              I do not believe that the eclipse plugin will generate project information for it though, but at least you would be able to include it into your eclipse workspace.

              • 34. Re: Migration to maven
                kconner

                 

                "adrian@jboss.org" wrote:

                This doesn't look like it is going to work unless you create your eclipse workspace
                somewhere else. I guess it wants to copy the project onto itself?

                The error I get is:
                Invalid project description.
                 /home/ejort/microcontainer/aop-mc-int overlaps the location of another project: aop-mc-int
                


                Did you delete these projects first? If they are in the svn location then you should not delete the contents, just the workspace references.


                • 35. Re: Migration to maven
                  kconner

                   

                  "adrian@jboss.org" wrote:
                  This doesn't look like it is going to work unless you create your eclipse workspace somewhere else. I guess it wants to copy the project onto itself?

                  Is your workspace the same as you svn root?


                  • 36. Re: Migration to maven

                     

                    "adrian@jboss.org" wrote:

                    This doesn't look like it is going to work unless you create your eclipse workspace
                    somewhere else. I guess it wants to copy the project onto itself?

                    The error I get is:
                    Invalid project description.
                     /home/ejort/microcontainer/aop-mc-int overlaps the location of another project: aop-mc-int
                    


                    I guess it wants to copy the project onto itself?


                    The redundant workspace works.
                    Starting from scratch:
                    1) Checkout microcontainer
                    2) build with maven
                    3) run maven's eclipse:eclipse
                    4) Create a microcontainer-eclipse workspace
                    5) Import all the projects and set the M2_REPO variable

                    Tests are broken again though.

                    • 37. Re: Migration to maven

                       

                      "Kevin.Conner@jboss.com" wrote:
                      "adrian@jboss.org" wrote:
                      This doesn't look like it is going to work unless you create your eclipse workspace somewhere else. I guess it wants to copy the project onto itself?

                      Is your workspace the same as you svn root?


                      Yes. Always has been in the past.

                      • 38. Re: Migration to maven

                         

                        "Kevin.Conner@jboss.com" wrote:

                        Can you give me a specific test which fails to find the resource?


                        Go to the container project and find src/tests/org/jboss/test/ContainerAllTestSuite
                        Right click and run it as a junit test.

                        Example error:

                        junit.framework.AssertionFailedError: TestInstantiate.xml not found
                         at junit.framework.Assert.fail(Assert.java:47)
                         at org.jboss.test.ioc.test.AbstractIoCTest.findXML(AbstractIoCTest.java:87)
                         at org.jboss.test.ioc.test.AbstractIoCTest.unmarshal(AbstractIoCTest.java:73)
                         at org.jboss.test.ioc.test.AbstractIoCTest.unmarshal(AbstractIoCTest.java:57)
                         at org.jboss.test.javabean.test.InstantiateTestCase.testInstantiate(InstantiateTestCase.java:37)
                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:585)
                         at junit.framework.TestCase.runTest(TestCase.java:154)
                         at junit.framework.TestCase.runBare(TestCase.java:127)
                         at junit.framework.TestResult$1.protect(TestResult.java:106)
                         at junit.framework.TestResult.runProtected(TestResult.java:124)
                         at junit.framework.TestResult.run(TestResult.java:109)
                         at junit.framework.TestCase.run(TestCase.java:118)
                         at junit.framework.TestSuite.runTest(TestSuite.java:208)
                         at junit.framework.TestSuite.run(TestSuite.java:203)
                         at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
                         at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
                         at junit.framework.TestResult.runProtected(TestResult.java:124)
                         at junit.extensions.TestSetup.run(TestSetup.java:23)
                         at junit.framework.TestSuite.runTest(TestSuite.java:208)
                         at junit.framework.TestSuite.run(TestSuite.java:203)
                         at junit.framework.TestSuite.runTest(TestSuite.java:208)
                         at junit.framework.TestSuite.run(TestSuite.java:203)
                         at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
                         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
                         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
                         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
                         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
                         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
                        


                        All the xml parsing tests fail because it cannot find the xml url using getResource().

                        Now delete src/resources as a source folder and make it a class library,
                        i.e.
                        - <classpathentry kind="src" path="src/resources" including="schema/**" excluding="**/*.java"/>
                        + <classpathentry kind="lib" path="src/resources">
                        


                        100% success on tests

                        • 39. Re: Migration to maven
                          kconner

                           

                          "adrian@jboss.org" wrote:
                          Tests are broken again though.

                          Within eclipse or standalone?

                          I have a number of standalone failures/errors at present. Perhaps we could create a new topic to discuss :-)



                          • 40. Re: Migration to maven

                             

                            "Kevin.Conner@jboss.com" wrote:
                            "adrian@jboss.org" wrote:
                            Tests are broken again though.

                            Within eclipse or standalone?


                            Both.

                            They should all work in eclipse? - except some aop tests which need
                            a change to the classloader or weaving to work properly.

                            Until they work in eclipse, I'm not even going to try to fix the Maven run. :-)

                            • 41. Re: Migration to maven

                               

                              "Kevin.Conner@jboss.com" wrote:
                              "adrian@jboss.org" wrote:
                              Eclipse doesn't either. I currently have to resynch outside eclipse then refresh which is a pain.

                              There is no need for the parent pom to exist in the parent directory, it could be another project pulled in via a parent aggregator.
                              I do not believe that the eclipse plugin will generate project information for it though, but at least you would be able to include it into your eclipse workspace.


                              That is how we did common.
                              Microcontainer should really be the same.

                              • 42. Re: Migration to maven
                                kconner

                                 

                                "adrian@jboss.org" wrote:
                                All the xml parsing tests fail because it cannot find the xml url using getResource().

                                Now delete src/resources as a source folder and make it a class library,
                                i.e.
                                - <classpathentry kind="src" path="src/resources" including="schema/**" excluding="**/*.java"/>
                                + <classpathentry kind="lib" path="src/resources">
                                


                                Okay, this is caused because the resources you require are explicitly excluded from the source path.

                                If there are no objections then I will change the structure of the projects so that the test resources are not embedded within the compile resources. This should fix this issue.


                                • 43. Re: Migration to maven

                                  This thread is too entangled.
                                  I'm going to create seperate threads for each issue to be dealt with seperately.

                                  • 44. Re: Migration to maven
                                    1 2 3 Previous Next