HELLo,
here' smy pom.xml fo rmy ear project (which uses ejb as jars)
<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>ExpenseControl</groupId>
<artifactId>project</artifactId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>${ear.name}</artifactId>
<name>EAR project</name>
<packaging>ear</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<modules>
<ejbModule>
<groupId>ExpenseControl</groupId>
<artifactId>ejbs</artifactId>
<bundleFileName>
ejb3-app-1.0-SNAPSHOT.jar
</bundleFileName>
</ejbModule>
<webModule>
<groupId>ExpenseControl</groupId>
<artifactId>web</artifactId>
<bundleFileName>
ejb3-web.war
</bundleFileName>
</webModule>
</modules>
<outputDirectory>${deploy.directory}</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>ExpenseControl</groupId>
<artifactId>ejbs</artifactId>
<version>1.0</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>ExpenseControl</groupId>
<artifactId>web</artifactId>
<version>1.0</version>
<type>war</type>
</dependency>
</dependencies>
</project>
i have listed the ejb as a dependency even in the .ear file....
it has worked fine for me... i have other .ear built with maven2, all in the
same way.
can you post your ear project pom.xml as well as parent pom.xml?
hth
marco
On 10/3/06, Owen Jacobson <[EMAIL PROTECTED]> wrote:
Sorry it took a while to get back to this -- was on a trip all
weekend. Thanks for the suggestions...
However, setting the dependency type to <type>ejb</type> causes maven
to throw an exception when parsing the ear's POM:
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: com.example.hibernate.ejb3:example-ear
POM Location: /home/ojacobson/hibernate-bug/example-ear/pom.xml
Validation Messages:
[0] 'dependencies.dependency.version' is missing for
com.example.hibernate.ejb3:sessions
Reason: Failed to validate POM
In the parent POM this dependency is declared as
<dependency>
<groupId>com.example.hibernate.ejb3</groupId>
<artifactId>sessions</artifactId>
<version>1.0-SNAPSHOT</version>
<type>ejb</type>
</dependency>
which looks okay according to the pom.xml guide. Any ideas?
On 9/30/06, Marco Mistroni <[EMAIL PROTECTED]> wrote:
> Hello,
> sorry i didnt read properly ur email...
> i m packaging my apps too as ear project..... and ejbs are packaged as
jar
> here's my pom.xml for ear
>
> <modelVersion>4.0.0</modelVersion>
> <artifactId>${ear.name}</artifactId>
> <name>EAR project</name>
> <packaging>ear</packaging>
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-ear-plugin</artifactId>
> <configuration>
> <modules>
> <ejbModule>
> <groupId>ExpenseControl</groupId>
> <artifactId>ejbs</artifactId>
> <bundleFileName>
> ejb3-app-1.0-SNAPSHOT.jar
> </bundleFileName>
> </ejbModule>
> <webModule>
> <groupId>ExpenseControl</groupId>
> <artifactId>web</artifactId>
> <bundleFileName>
> ejb3-web.war
> </bundleFileName>
> </webModule>
> </modules>
>
> <outputDirectory>${deploy.directory}</outputDirectory>
>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> <dependencies>
> <dependency>
> <groupId>ExpenseControl</groupId>
> <artifactId>ejbs</artifactId>
> <version>1.0</version>
> <type>ejb</type>
> </dependency>
> <dependency>
> <groupId>ExpenseControl</groupId>
> <artifactId>web</artifactId>
> <version>1.0</version>
> <type>war</type>
> </dependency>
> </dependencies>
>
>
> this is actually a jar project
>
> <ejbModule>
> <groupId>ExpenseControl</groupId>
> <artifactId>ejbs</artifactId>
> <bundleFileName>
> ejb3-app-1.0-SNAPSHOT.jar
> </bundleFileName>
> </ejbModule>
>
>
> hth
> marco
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]