maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre-Yves Chauveau" <Pierre-Yves.Chauv...@valtech.fr>
Subject RE : multi projects
Date Tue, 26 Oct 2004 14:16:19 GMT
You can do that with a workaround in the maven.xml:
    <j:forEach var="dep" items="${pom.dependencies}">
        <j:if test="${dep.getProperty('multi.depend.runtime') == 'true'}">
         <j:if test="${multi.depend.runtime}">
          <j:set var="dummy" value="${dep.resolvedProperties().put('war.bundle','true')}"/>
        </j:if>
      </j:if>
    </j:forEach> 
That's quite dirty but it works ;-)
This will add the property war.bundle= true to the pom dependencies marked with multi.depend.runtime
=true if the property  multi.depend.runtime  is in the execution properties.
then to build your war you can do 'maven war -Dmulti.depend.runtime=true ' if you want the
business domain dependencies in your war and  simply maven war  if you don't....
voilà...
 

	-------- Message d'origine-------- 
	De: Bowe, Bastian [mailto:Bastian.Bowe@astrium.eads.net] 
	Date: mar. 26/10/2004 14:24 
	À: 'Maven Users List' 
	Cc: 
	Objet: RE: multi projects
	
	

	Good. In the future it would be cool if I can give sort of hints to the
	"source" project. In the example it would be nice if I can put a directive
	like the following into my project.xml of myBusiness project.
	...
	    <dependency>
	      <groupId>log4j</groupId>
	      <artifactId>log4j</artifactId>
	      <version>1.2.8</version>
	      <properties>
	        <multi.depend.runtime>true</multi.depend.runtime>
	      </properties>
	    </dependency>
	...
	
	When myWeb has the dependency:
	...
	    <dependency>
	      <groupId>myBusiness</groupId>
	      <artifactId>myBusiness</artifactId>
	      <version>1.0</version>
	      <properties>
	        <war.bundle>true</war.bundle>
	<!-- defaults to true -->
	        <multi.depend.include>true</multi.depend.include>
	      </properties>
	    </dependency>
	...
	
	Just my 2 Euro cent.
	
	> -----Original Message-----
	> From: Eric Pugh [mailto:epugh@upstate.com]
	> Sent: Tuesday, October 26, 2004 2:17 PM
	> To: Maven Users List
	> Subject: RE: multi projects
	>
	>
	> Today you have to do it by hand..  Future maven's will handle
	> transitive (?) dependencies better.
	>
	> > -----Original Message-----
	> > From: Bowe, Bastian [mailto:Bastian.Bowe@astrium.eads.net]
	> > Sent: Tuesday, October 26, 2004 1:51 PM
	> > To: 'users@maven.apache.org'
	> > Subject: multi projects
	> >
	> >
	> > Hello,
	> >
	> > I like to setup a web project with a web module and a
	> business module.
	> > Let's assume I have my web module in a directory myWeb and
	> my business
	> > module in myBusiness, both having a project.xml file. If I wan't to
	> > build a war file for my myWeb project, I would have to copy
	> myBusiness
	> > AND its libraries
	> > (jars) it depends on into the war.
	> >
	> > I have put the myBusiness into my local repository (via.
	> jar:install
	> > from myBusiness directory).
	> >
	> > Is there a easy way to copy myBusiness's dependencies into
	> the war? Or
	> > do I have to specify all dependencies manually in the
	> project.xml of
	> > myWeb?
	> >
	> > Best regards
	> >
	> > Bastian
	> >
	> >
	> ---------------------------------------------------------------------
	> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
	> > For additional commands, e-mail: users-help@maven.apache.org
	>
	>
	> ---------------------------------------------------------------------
	> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
	> For additional commands, e-mail: users-help@maven.apache.org
	>
	
	---------------------------------------------------------------------
	To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
	For additional commands, e-mail: users-help@maven.apache.org
	
	

Mime
View raw message