2 Replies Latest reply on Jun 17, 2008 3:35 PM by Jay Balunas

    Seam in Maven - No artifacts being found

    beyarecords Novice

      Hi,
      I have constructed a Seam project using Maven 2, based on the information provided conscerning integration of Maven and Seam, but none of the artifacts are being found. What am I overlooking here?


      My dev platform is:



      Win XP SP1
      JDK1.6.0_06
      Maven 2.0.9




      My POM.xml reads as:



      <?xml version="1.0" encoding="UTF-8"?>
      <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>com.mycompany.app</groupId>
        <artifactId>mycompany-spring-app</artifactId>
        <parent>
          <groupId>org.jboss.seam</groupId>
          <artifactId>parent</artifactId>
          <version>2.0.3.CR1</version>
        </parent>
        <packaging>ejb</packaging>
        <version>1.0-SNAPSHOT</version>
        <name>mycompany-seam-app</name>
        <description>Seam Framework</description>
        <url>http://www.mycompany.com</url>
      
        <dependencies>
          <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.6</version>
            <optional>true</optional>
            <exclusions>
              <exclusion>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-seam</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-seam-ui</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-seam-remoting</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-seam-ioc</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-seam-pdf</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-seam-mail</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>jboss-seam-debug</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
          <build>
              <finalName>mycompany</finalName>
              <plugins>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-compiler-plugin</artifactId>
                  </plugin>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-surefire-plugin</artifactId>
                      <configuration>
                              <skip>true</skip>
                      </configuration>
                  </plugin>
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-site-plugin</artifactId>
                      <configuration>
                              <locales>en</locales>
                      </configuration>
                  </plugin>
              </plugins>
          </build>
          <repositories>
                  <repository>
                          <id>JBoss Maven Repo</id>
                          <name>JBoss Maven Repo</name>
                          <url>http://repository.jboss.com/maven2/</url>
                  </repository>
          </repositories>
      </project>




      The above POM has been constructed with Maven 2's transitive dependency support in mind, but for obvious reasons I would not want any artifacts bundled with my project which are already deployed in Jboss. Any comments on this would also be greatly appreciated.


      Many thanks in advance.


      Andrew

        • 1. Re: Seam in Maven - No artifacts being found
          Dietmar Scheidl Newbie

          In your dependencies ${project.groupId} and ${project.version} refer to your own groupId and version (com.mycompany.app and 1.0-SNAPSHOT).

          • 2. Re: Seam in Maven - No artifacts being found
            Jay Balunas Novice

            Could you post some of the output from the build.  I checked the http://repository.jboss.com/maven2/ repo and the 2.0.3.CR1 files appear to all be there.



            Try setting the the seam groupID and version as separate properties.  I'm not 100% sure but I think you are setting your projects groupId and version, not seams.  This would make it not be able to find them.


            <dependency>
               <groupId>${project.groupId}</groupId>
               <artifactId>jboss-seam-remoting</artifactId>
               <version>${project.version}</version>
            </dependency>



            You can either create a seam.version and a seam.groupID property and use those, or manually set them for each dependency like:



            <dependency>
               <groupId>org.jboss.seam</groupId>
               <artifactId>jboss-seam-remoting</artifactId>
               <version>2.0.3.CR1</version>
            </dependency>