2 Replies Latest reply on May 23, 2008 10:09 AM by Michael Brackx

    root-2.0.2.GA.pom type ejb?

    Michael Brackx Newbie

      Should the root pom not specify type ejb for jboss-seam artifact?


      Currently the dependency is as follows:


            <dependency>
              <groupId>org.jboss.seam</groupId>
              <artifactId>jboss-seam</artifactId>
              <version>2.0.2.GA</version>
            </dependency>
      



      IMHO it should be


            <dependency>
              <groupId>org.jboss.seam</groupId>
              <artifactId>jboss-seam</artifactId>
              <version>2.0.2.GA</version>
              <type>ejb</type>
            </dependency>
      



      as jboss-seam is definied as


        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam</artifactId>
        <parent>
          <groupId>org.jboss.seam</groupId>
          <artifactId>parent</artifactId>
          <version>2.0.2.GA</version>
        </parent>
        <packaging>ejb</packaging>
      



      (compiling without the type ejb works because the extension is the same as for the default type jar)

        • 1. Re: root-2.0.2.GA.pom type ejb?
          Siarhei Dudzin Apprentice

          Did you notice it is actually inside <dependencyManagement>?

          • 2. Re: root-2.0.2.GA.pom type ejb?
            Michael Brackx Newbie

            Yes, I did notice the it is inside dependencyManagement.


            Let me be more verbose as to why i think there is a problem.


            As a user of seam you need to specify which version's you are using. This can be done by using the seam root as parent (or by using the maven 2.0.9 import).


            Currently I would have to use something like this


            <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/xsd/maven-4.0.0.xsd">
                 <modelVersion>4.0.0</modelVersion>
                 <groupId>seam.forum</groupId>
                 <artifactId>test</artifactId>
                 
                 <parent>
                      <groupId>org.jboss.seam</groupId>
                      <artifactId>root</artifactId>
                    <version>2.0.2.GA</version>
                 </parent>
                 
                 <dependencies>
                      <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam</artifactId>
                      </dependency>
                 </dependencies>
            </project>
            



            However, this makes me dependent on an artifact org.jboss.seam:jboss-seam:jar:2.0.2.GA
            IMHO, this is incorrect, as this artifact is not defined anywhere.
            The artifact defined is actually org.jboss.seam:jboss-seam:ejb:2.0.2.GA
            It does work (in this case) as the types ejb and jar both have the extension jar.


            If I want to be dependent on org.jboss.seam:jboss-seam:ejb:2.0.2.GA, I am forced to specify the version again.
            The following pom is not valid, because there is no version specified in the root pom for org.jboss.seam:jboss-seam:ejb


            <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/xsd/maven-4.0.0.xsd">
                 <modelVersion>4.0.0</modelVersion>
                 <groupId>seam.forum</groupId>
                 <artifactId>test</artifactId>
                 
                 <parent>
                      <groupId>org.jboss.seam</groupId>
                      <artifactId>root</artifactId>
                    <version>2.0.2.GA</version>
                 </parent>
                 
                 <dependencies>
                      <dependency>
                         <groupId>org.jboss.seam</groupId>
                         <artifactId>jboss-seam</artifactId>
                         <type>ejb</type>
                      </dependency>
                 </dependencies>
            </project>