From what I've been able to tell in the past, it seems that the rule is if
your project has the <modules> element, then it has to be of packaging type
"pom".  It looks like you have an ear project that you want to include an
ejbModule and a warModule - I have done this in the past by  having a parent
pom, and the ear file essentially being a sibling of my other modules.  I
can still specify the ejbModule and webModule configurations in the ear.
That make sense?

On 8/31/06, Jeff Mutonho <[EMAIL PROTECTED]> wrote:

I'm getting the following error when I try to build an ear file.

[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: za.co.telkom.eportal:eportal-ear
POM Location: D:\MAVEN-WORK\eportal-ear\pom.xml
Validation Messages:

    [0]  Packaging 'ear' is invalid. Aggregator projects require 'pom' as
packag
ing.


Reason: Failed to validate POM


[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java
:365)

--
The pom that causing this is shown below:

<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
   <groupId>za.co.pragmaticus.eportal</groupId>
   <artifactId>pragmaticus-eportal</artifactId>
   <version>1.0.0</version>
  </parent>
  <artifactId>eportal-ear</artifactId>
  <name>pragmaticus ePortal</name>
  <packaging>ear</packaging>
  <version>1.0.0</version>
  <description>Eportal Ear</description>
  <profiles>
     <profile>
      <id>eportal-ejb</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>eportal-services</module>
        <module>eportal-messaging</module>
        <module>eportal-messaging-support</module>
        <module>eportal-domain</module>
        <module>eportal-exceptions</module>
      </modules>
    <build>
     <plugins>
       <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
          <displayName>Eportal EJB Module</displayName>
          <description>Eportal EJB Module</description>
          <version>1.0.0</version>
          <modules>
            <ejbModule>
              <groupId>za.co.pragmaticus.eportal</groupId>
              <artifactId>eportal-messaging</artifactId>
            </ejbModule>
          </modules>
          <earName>eportal-messaging</earName>
        </configuration>
       </plugin>
      </plugins>
    </build>
    </profile>
    <profile>
      <id>eportal-war</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>enableCiProfile</name>
          <value>true</value>
        </property>
      </activation>
      <modules>
       <module>eportal-services</module>
        <module>eportal-webservices</module>
        <module>eportal-domain</module>
        <module>eportal-exceptions</module>
        <module>eportal</module>
      </modules>
      <build>
     <plugins>
       <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
          <displayName>Eportal Web</displayName>
          <description>Eportal Web</description>
          <version>1.0.0</version>
          <modules>
            <webModule>
              <groupId>za.co.pragmaticus.eportal</groupId>
              <artifactId>eportal</artifactId>
              <contextRoot>/eportal</contextRoot>
            </webModule>
          </modules>
        </configuration>
       </plugin>
      </plugins>
    </build>
    </profile>
  </profiles>
</project>



Jeff  Mutonho

GoogleTalk : ejbengine
Skype        : ejbengine
Registered Linux user number 366042


Reply via email to