Brett Porter wrote:

Is it still true in maven 1.0.2 when a project.xml is extended, only the
dependencies are merged, and other tags, such as build, are overriden?



No. The only things that aren't merged are lists. Dependencies is the list that is merged. http://svn.apache.org/viewcvs.cgi/maven/maven-1/core/trunk/src/java/org/apache/maven/project/Project.java?rev=122478&view=markup (see mergeParent)



Sorry if I'm being dense, but I'm not able to tell from the source if something like resources under build/unitTest is merged, but from the behavior I'm seeing it looks like it isn't.

If it is still true, are there any plans to merge other tags in a future
release?



Which particulary elements do you think it makes sense for?

- Brett



Things like resources, source modifications, etc. that a subproject might need to provide additional entries for. In my case I have a parent project.xml that includes resources in the unit test element:

 <build>
   <unitTest>
     <resources>
       <resource>
         <directory>src/test/resources</directory>
         <targetPath>resources</targetPath>
         <includes>
           <include>**/*.*</include>
         </includes>
       </resource>
       <resource>
         <directory>${basedir}/../resources</directory>
         <includes>
           <include>log4j-sample.properties</include>
           <include>beanRefFactory.xml</include>
           <include>aspectwerkz.xml</include>
         </includes>
       </resource>
       <resource>
         <directory>${basedir}/../resources/context</directory>
         <targetPath>context</targetPath>
         <includes>
           <include>**/*.*</include>
         </includes>
       </resource>
     </resources>
   </unitTest>
 </build>

Then in a subproject, I need to add additional resources for just that subproject, keeping those specified in the parent project.xml:

 <build>
   <unitTest>
     <resources>
       <resource>
         <directory>../interface/target/test-classes</directory>
         <targetPath></targetPath>
         <includes>
           <include>**/*.class</include>
         </includes>
       </resource>
     </resources>
   </unitTest>
 </build>

The behavior I'm seeing is that the subproject overrides the resources, rather than merge them. I'd like to have them merged so that I can add specific subproject resources without having to redefine what is in the parent. Perhaps there could be some way for me to tell maven whether I want to override the parent vs. adding to the parent.

TIA
--
Steven Caswell [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

<http://www.spreadfirefox.com/?q=affiliates&id=0&t=1>

---------------------------------------------------------------------
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]






-- Steven Caswell [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

<http://www.spreadfirefox.com/?q=affiliates&id=0&t=1>

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



Reply via email to