Dear Bruno,
    In pom.xml. You should add this jar to dependency.

my pom.xml is below.

<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>ears</groupId>
   <artifactId>ear</artifactId>
   <packaging>pom</packaging>
   <version>1.0</version>
   <name>ear assembly</name>

   <dependencies>
      <dependency>
         <groupId>pojos</groupId>
         <artifactId>pojo</artifactId>
         <version>1.0</version>
      </dependency>
     <dependency>
       <groupId>ejbs</groupId>
       <artifactId>ejb</artifactId>
       <version>1.0</version>
       <type>ejb</type>
     </dependency>
     <dependency>
       <groupId>wars</groupId>
       <artifactId>war</artifactId>
       <version>1.0</version>
       <type>war</type>
     </dependency>
  </dependencies>


   <build>
       <!-- <outputDirectory>C:\test\sample\ear\target1</outputDirectory>
-->
      <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-ear-plugin</artifactId>
           <version>2.1-SNAPSHOT</version>
           <executions>
              <execution>
                  <id>ear</id>
                  <phase>package</phase>
                   <goals>
                    <goal>generate-application-xml</goal>
                    <goal>ear</goal>
                  </goals>
                 <configuration>
                     <modules>
                      <javaModule>
                       <groupId>pojos</groupId>
                       <artifactId>pojo</artifactId>
                       <!
--<includeInApplicationXml>true</includeInApplicationXml>-->
                       <uri>pojo-1.0.jar</uri>
                     </javaModule>
                     <ejbModule>
                       <groupId>ejbs</groupId>
                       <artifactId>ejb</artifactId>
                       <uri>ejb-1.0.jar</uri>
                     </ejbModule>
                     <webModule>
                       <groupId>wars</groupId>
                       <artifactId>war</artifactId>
                       <context-root>dss</context-root>
                     </webModule>
                    </modules>
                  </configuration>
                </execution>
          </executions>
         </plugin>
      </plugins>
   </build>
</project>







thanks.
Tel: (020)36315358-328 Fax: (020)36315170


                                                                                
                                                       
                      Bruno Aranda                                              
                                                       
                      <[EMAIL PROTECTED]        To:       Maven Users List 
<[email protected]>                                     
                      l.com>                   cc:                              
                                                       
                                               Subject:  Re: [m2] Jars inside 
ear as java modules in the application.xml               
                      01/12/2005 01:05                                          
                                                       
                      Please respond to                                         
                                                       
                      "Maven Users                                              
                                                       
                      List"                                                     
                                                       
                                                                                
                                                       
                                                                                
                                                       




I've found the solution myself googleing and looking to the source code :-)

You have to use a javaModule inside the configuration of the
maven-ear-plugin with the artifact information and the
includeInApplicationXml set to true:

      <plugin>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
          <modules>
            <javaModule>
               <groupId>ebiointel-bionary</groupId>
              <artifactId>bionary</artifactId>
              <includeInApplicationXml>true</includeInApplicationXml>
            </javaModule>
          </modules>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>

Regards,

Bruno

2005/11/30, Bruno Aranda <[EMAIL PROTECTED]>:
> Hi all,
>
> I wonder if it is possible to configure the ear plugin somehow to put
> some of the jar dependencies inside the application.xml file as
> <module><java>myFile.jar</java></module>, as it is actually done with
> ejb's and webapps...
> I need this because I have a par (ejb3) that depends on a jar and in
> order to make this work I also need that jar in the application.xml
> file...
>
> Regards,
>
> Bruno
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________



Hactl..........Moving forward with you.

Best Air Cargo Terminal - Asia 2005
Air Cargo Terminal of the Year 2002, 2003 & 2004

Web: http://www.hactl.com

DISCLAIMER :-
The information contained in this message, including any attachment, is
confidential and may also be privileged. The information is intended only
for the person or entity to which it is addressed. Any review,
re-transmission, copying, storage, distribution or other use or disclosure
of this information by persons or entities other than the intended
recipient is prohibited. If you are not the intended recipient, please
contact the sender immediately by return email and delete this message from
your system. Thank you.




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to