You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by An...@ubs.com on 2006/06/13 18:20:41 UTC

Complex distributed multi project depnedencies with Maven 2

Hi,

I think that I may have posed a problem to user group that no one could
answer due to its more complex nature.
I was wondering if anyone developing Maven had the solution and could
provide me with the answer.

Rgds
Andy

Problem description :

In Maven 2, controlling dependencies within pom.xml files to control
packaging within ear file plus controlling 
entries in the Manifest.mf file within the war file and the contents of
WEB-INF/lib within the war


Example project :
-----------------

Ear file wrapping a jar, and a war file which in turn has a jar in it's
WEB-INF/lib plus a manifest file class path
referencing the jar held within ear file. This is useful for multiple
war's in 1 ear. 


-------------------------
-EAR                    -
-                       -
- frmw.jar              -
-                       -
-    ################## -
-    # WebApp1        # -
-    #  WEB-INF/lib   # -
-    #    x.jar       # -
-    #                # -
-    #                # -
-    #  Manifest.mf   # -
-    #   Class-Path:  # -
-    #     frmw.jar   # -
-    ################## -
-                       -
-------------------------

Projects:
 - WebApp1
 - frmw.jar
 - x.jar

WebApp1 has dependency on frwm.jar and x.jar

A) want to have frmw.jar appear as entry in Manifest.mf within war
Class-Path: 
B) want to have x.jar appear in WEB-INF/lib but not as entry in
manifest.mf Class-Path: 

Since Posting think I have solved A) above with

<dependency>
	<groupId>com.ubs.datait.rkyc.cim.busimpl</groupId>
	<artifactId>cim-busimpl</artifactId>
	<version>${rkyc-version}</version>
	<scope>compile</scope>
		<exclusions>
			<exclusion>
				<artifactId>cim-busimpl</artifactId>
	
<groupId>com.ubs.datait.rkyc.cim.busimpl</groupId>
			</exclusion>
		</exclusions>
              <optional>true</optional>
</dependency>