0 Replies Latest reply on Jun 3, 2011 1:52 PM by ndrw_cheung

    Compiling sso-agent component : problem with pom as dependency type

    ndrw_cheung

      Hi. I tried to compile the sso-agent portal-component (i.e the folder jboss-epp-5.1-src\portal-components\sso\agent in the source code) in EPP5.1.0. This module, amongst other dependencies, depends on the artifact with artifactId "exo.portal.component.web". The original pom.xml in its parent directory (jboss-epp-5.1-src\portal-components\sso) has the following:


      <org.exoplatform.portal.version>5.0.1-epp-GA</org.exoplatform.portal.version>

      so I changed it to

      <org.exoplatform.portal.version>5.1.0-epp-GA</org.exoplatform.portal.version>

       

      However, in version 5.1.0, the artifact in question (i.e. "exo.portal.component.web") compiles to a .pom file instead of to a jar file (as opposed to the 5.0.1 version). The content in the .pom file is as follows:

       

      <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">

        <parent>

          <groupId>org.exoplatform.portal</groupId>

          <artifactId>exo.portal.component</artifactId>

          <version>5.1.0-epp-GA</version>

        </parent>

       

        <modelVersion>4.0.0</modelVersion>

        <artifactId>exo.portal.component.web</artifactId>

      <packaging>pom</packaging>

        <name>GateIn Portal Component Web</name>

       

        <modules>

           <module>controller</module>

           <module>security</module>

           <module>server</module>

           <module>resources</module>

           <module>api</module>

        </modules>

      </project>

       

       

      (Note: the modules "controller", "security", "server", "resources", "api" all compiled successfully and stored in the respective target folders).

       

      So, in the jboss-epp-5.1-src\portal-components\sso\agent\pom.xml file, I changed the dependency from:

      <dependency>

                  <groupId>org.exoplatform.portal</groupId>

                  <artifactId>exo.portal.component.web</artifactId>

              </dependency>

       

      to the following:

       

      <dependency>

                  <groupId>org.exoplatform.portal</groupId>

                  <artifactId>exo.portal.component.web</artifactId>

      <type>pom</type>

      <version>5.1.0-epp-GA</version>

              </dependency>

       

       

      The problem is that when I do "mvn install" in the jboss-epp-5.1-src\portal-components\sso\agent folder, it cannot find packages that are now hidden inside the modules (for example, the "security" module that is defined in the .pom file).

       

      My question is: How do I fix this problem and tell maven to find the packages in the modules as defined in the .pom file?

       

      Any help is appreciated.

       

        -Andrew