Thanks Lee.
This mailing list rocks!!!
I noticed one thing. When my project is generated the ear contains an
application.xml which looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>ear</display-name>
<description></description>
<module>
<java>ejb-0.0.1.jar</java>
</module>
</application>
This not correct it should be <ejb> instead of <java>.
ear/pom.xml looks like this
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>myapp.app</groupId>
<artifactId>ear</artifactId>
<packaging>ear</packaging>
<version>0.0.1</version>
<description></description>
<parent>
<groupId>myapp.app</groupId>
<artifactId>app</artifactId>
<version>0.0.1</version>
</parent>
<dependencies>
<dependency>
<groupId>myapp.app</groupId>
<artifactId>ejb</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<modules>
<javaModule>
<groupId>myapp.app</groupId>
<artifactId>ejb</artifactId>
<includeInApplicationXml>true</includeInApplicationXml>
</javaModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</project>
If i add <type> ejb </type> in the pom.xml for dependency ejb it says
"INFO] Artifact[myapp.app:ejb:jar] is not a dependency of the project."
any idea what should i do?
Thks & Rgds
Kohinoor
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Lee Meador
Sent: Thursday, February 16, 2006 4:37 PM
To: Maven Users List
Subject: Re: Maven2 EAR
It's looking for the jar in your repository. If you do
mvn install
It will build the ejb jar and put it in the repository and when it gets
to doing the ear, it will be there to use.
-- Lee Meador
On 2/16/06, Kohinoor Lal Verma (HF/EAB)
<[EMAIL PROTECTED]>
wrote:
>
> Thanks guys for your help.
> I further need some help to solve this fully.
>
> Here is my dir structure.
> app
> |--pom.xml
> |--ejb
> | |--pom.xml
> |--ear
> | |--pom.xml
>
> app/pom.xml looks like this:
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>myapp</groupId>
> <artifactId>app</artifactId>
> <packaging>pom</packaging>
> <version>0.0.1</version>
> <description></description>
> <modules>
> <module>ejb</module>
> <module>ear</module>
> </modules>
> </project>
>
>
> ejb/pom.xml looks like this
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>myapp.app</groupId>
> <artifactId>ejb</artifactId>
> <packaging>ejb</packaging>
> <version>0.0.1</version>
> <description></description>
> <parent>
> <groupId>myapp.app</groupId>
> <artifactId>app</artifactId>
> <version>0.0.1</version>
> </parent>
> </project>
>
>
> And ear/pom.xml looks like this
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>myapp.app</groupId>
> <artifactId>ear</artifactId>
> <packaging>ear</packaging>
> <version>0.0.1</version>
> <description></description>
> <parent>
> <groupId>myapp.app</groupId>
> <artifactId>app</artifactId>
> <version>0.0.1</version>
> </parent>
> <dependencies>
> <dependency>
> <groupId>myapp.app</groupId>
> <artifactId>ejb</artifactId>
> <version>0.0.1</version>
> </dependency>
> </dependencies>
> </project>
>
> Now when I run "mvn package" in myapp/app dir the build fails. The EAR
> package fails to find ejb-0.0.1.jar. If I put this jar in the
> repository then everything works fine. Is not there a way in which the
> ejb jar is directly picked from where it is made by mvn?
>
> Thanks in advance.
> Kohinoor
>
>
> -----Original Message-----
> From: Krishnan A S [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 16, 2006 5:15 AM
> To: Maven Users List
> Subject: RE: Maven2 EAR
>
>
> Create a pom.xml for ear - file and include this ejb - jarfile as one
> of the modules ... create another pom.xml describing the ejb project .
>
> Thanks & Regards,
> A.S.KRISHNAN,
> AZTEC, BANGALORE.
>
> -----Original Message-----
> From: Kohinoor Lal Verma (HF/EAB)
> [mailto:[EMAIL PROTECTED]
>
> Sent: Wednesday, February 15, 2006 11:05 PM
> To: [email protected]
> Subject: Maven2 EAR
>
>
> > Hi,
> >
>
> > I am very new in using Maven. I want to make a project that
> > generates an ejb-jar and then generates an ear that includes this
> > generated ejb-jar. Can someone please provide me some tips on how to
> > achieve this? I am lost.
> >
>
> > Thanks in advance
> > Kohinoor
>
>
>
> **********************************************************
>
> The information contained in, or attached to, this e-mail, contains
> confidential information and is intended solely for the use of the
> individual or entity to whom they are addressed and is subject to
> legal privilege. If you have received this e-mail in error you should
> notify the sender immediately by reply e-mail, delete the message from
> your system and notify your system manager. Please do not copy it for
> any purpose, or disclose its contents to any other person. The views
> or opinions presented in this e-mail are solely those of the author
> and do not necessarily represent those of the company. The recipient
> should check this e-mail and any attachments for the presence of
> viruses. The company accepts no liability for any damage caused,
> directly or indirectly, by any virus transmitted in this email
>
> ************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
-- Lee Meador
Sent from gmail. My real email address is [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]