5 Replies Latest reply on Jan 11, 2010 3:53 PM by fabricio.lemos

    Wrong project hierarchy with Maven Configuration

    fabricio.lemos

      I created a Seam Ear projet with Maven Configuration. The parent module pom is created with:

       

        <modules>
          <module>../</module>
          <module>../-ejb</module>
          <module>../-ear</module>
        </modules>

       

      assuming a tree hierarchy. But the projects are created is a flat hierarchy and doesn´t correspond to the pom, so when I build the parent with Maven I get:

       

      D:\workspaces\galileo\blank-parent>mvn package
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error building POM (may not be this project's POM).

       


      Project ID: unknown

       

      Reason: Could not find the model file 'D:\workspaces\galileo\pom.xml'. for proje
      ct unknown

       


      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.reactor.MavenExecutionException: Could not find the model file
      'D:\workspaces\galileo\pom.xml'. for project unknown
              at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)

       

       

      Is this a known bug?

       

      thanks in advance,

      Fabricio Lemos

        • 1. Re: Wrong project hierarchy with Maven Configuration
          fabricio.lemos
          By the way, I´m using Jboss 3.1  CR1. I did not have this problem with the previous version.
          • 2. Re: Wrong project hierarchy with Maven Configuration
            maxandersen

            Are the paths truly ../-ejb ? if yes, then it looks like it is missing the actual project name.

             

            i.e. it should be ../projectname, ../projectname-ejb and ../projectname-ear.

            • 3. Re: Wrong project hierarchy with Maven Configuration
              fabricio.lemos

              Yes, I think that this is what happening. Now I realized that if I add the Maven Configuration before I type the project name on the first screen and forget to type the Artifact Id at the M2 capabilities screen, the projects are created missing the project name on the artifactId.

               

              Thank you Max for the quick answer.

               

              Just another question:

               

              The web project is created with <packaging>ear</packaging>

              instead of <packaging>war</packaging>

               

              Did I miss anything again?

              • 4. Re: Wrong project hierarchy with Maven Configuration
                maxandersen

                Yes, I think that this is what happening. Now I realized that if I add the Maven Configuration before I type the project name on the first screen and forget to type the Artifact Id at the M2 capabilities screen, the projects are created missing the project name on the artifactId.

                Could you open a bug about this with steps to reproduce ? Sounds like we are not reading the project name consistently.

                 


                Just another question:

                 

                The web project is created with <packaging>ear</packaging>

                instead of <packaging>war</packaging>

                 

                Did I miss anything again?

                Snjezana would be better to answer that - I know she battled for some time to get the proper setup working.

                • 5. Re: Wrong project hierarchy with Maven Configuration
                  fabricio.lemos

                  Could you open a bug about this with steps to reproduce ? Sounds like we are not reading the project name consistently.

                   

                  Bug report created: https://jira.jboss.org/jira/browse/JBIDE-5656


                  Just another question:

                  The web project is created with <packaging>ear</packaging>
                  instead of <packaging>war</packaging>
                  Did I miss anything again?


                  Snjezana would be better to answer that - I know she battled for some time to get the proper setup working.


                   

                  At the M2 Capabilities screen I was setting the Packaging to EAR because I was creating an EAR project, but it seems that the Packaging of that screen is related to the web project (the one created without any suffix). So, if I keep the WAR Packaging, it is created OK. But I can´t imagine any situation where the web project should not be packaged as a WAR, so I think this field shouldn´t be editable.