You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lara Brian <la...@yahoo.com> on 2007/10/09 00:10:35 UTC

Assembly to exclude a directory in the dependency artifact.

Hi All,
  Is it possible to exclude a perticular directory from the dependency artifact. 
  For example my dependency artifact has dir1, dir2 and dir3 in it and i want to exlcude dir2 from being included in my final assembly. My assembly descriptor looks as follows.
   
  <moduleSets>
  <moduleSet>   
  
   <includes>
    <include>*:xmar:*</include>
   </includes>
   
   <binaries>
    <outputDirectory>local/model/${artifactId}</outputDirectory>
    <outputFileNameMapping></outputFileNameMapping>
    <unpack>true</unpack>
    
    <dependencySets>
     <!-- Include transitive xmars too -->
     <includeDependencies>false</includeDependencies>
     
     <!-- Pull all the dependent xmar and put them in local directory-->
     <dependencySet>
      <outputDirectory>local/model/${artifactId}</outputDirectory>
      <outputFileNameMapping></outputFileNameMapping>
      <includes>
       <include>*:xmar:*</include>
      </includes>
      <unpack>true</unpack>
      <scope>runtime</scope>
     </dependencySet>
     
    </dependencySets>
   </binaries>
  </moduleSet>
 </moduleSets>
   
   
  thanks for any help or pointer.

       
---------------------------------
Don't let your dream ride pass you by.    Make it a reality with Yahoo! Autos. 

Re: Assembly to exclude a directory in the dependency artifact.

Posted by Antony Stubbs <an...@gmail.com>.
FYI anyone looking at excluding/including under binaries level, please vote
for:
http://jira.codehaus.org/browse/MASSEMBLY-298


Tim Kettler wrote:
> 
> Hi,
> 
> I've never used this my self yet so I can't give you a definitive
> answer, but looking at the assembly descriptor reference [1] there
> are the following options available to customize the dependency
> unpacking:
> 
>   - moduleSet/binaries/unpackOptions/{includes,excludes}
>   - moduleSet/binaries/.../dependencySet/unpackOptions/{includes,excludes}
>   - moduleSet/binaries/{includes,excludes}
>   - moduleSet/binaries/.../dependencySet/{includes,excludes}
> 
> -Tim
> 
> [1] http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html
> 
> Am Mon, 8 Oct 2007 15:10:35 -0700 (PDT)
> schrieb Lara Brian <la...@yahoo.com>:
> 
>> Hi All,
>>   Is it possible to exclude a perticular directory from the
>> dependency artifact. For example my dependency artifact has dir1,
>> dir2 and dir3 in it and i want to exlcude dir2 from being included in
>> my final assembly. My assembly descriptor looks as follows.
>> <moduleSets> <moduleSet>   
>>   
>>    <includes>
>>     <include>*:xmar:*</include>
>>    </includes>
>>    
>>    <binaries>
>>     <outputDirectory>local/model/${artifactId}</outputDirectory>
>>     <outputFileNameMapping></outputFileNameMapping>
>>     <unpack>true</unpack>
>>     
>>     <dependencySets>
>>      <!-- Include transitive xmars too -->
>>      <includeDependencies>false</includeDependencies>
>>      
>>      <!-- Pull all the dependent xmar and put them in local
>> directory--> <dependencySet>
>>       <outputDirectory>local/model/${artifactId}</outputDirectory>
>>       <outputFileNameMapping></outputFileNameMapping>
>>       <includes>
>>        <include>*:xmar:*</include>
>>       </includes>
>>       <unpack>true</unpack>
>>       <scope>runtime</scope>
>>      </dependencySet>
>>      
>>     </dependencySets>
>>    </binaries>
>>   </moduleSet>
>>  </moduleSets>
>>    
>>    
>>   thanks for any help or pointer.
>> 
>>        
>> ---------------------------------
>> Don't let your dream ride pass you by.    Make it a reality with
>> Yahoo! Autos. 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 


-----
___________________________

http://stubbisms.wordpress.com http://stubbisms.wordpress.com 
-- 
View this message in context: http://www.nabble.com/Assembly-to-exclude-a-directory-in-the-dependency-artifact.-tp13105922p18993143.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Assembly to exclude a directory in the dependency artifact.

Posted by Tim Kettler <ti...@udo.edu>.
Hi,

I've never used this my self yet so I can't give you a definitive
answer, but looking at the assembly descriptor reference [1] there
are the following options available to customize the dependency
unpacking:

  - moduleSet/binaries/unpackOptions/{includes,excludes}
  - moduleSet/binaries/.../dependencySet/unpackOptions/{includes,excludes}
  - moduleSet/binaries/{includes,excludes}
  - moduleSet/binaries/.../dependencySet/{includes,excludes}

-Tim

[1] http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html

Am Mon, 8 Oct 2007 15:10:35 -0700 (PDT)
schrieb Lara Brian <la...@yahoo.com>:

> Hi All,
>   Is it possible to exclude a perticular directory from the
> dependency artifact. For example my dependency artifact has dir1,
> dir2 and dir3 in it and i want to exlcude dir2 from being included in
> my final assembly. My assembly descriptor looks as follows.
> <moduleSets> <moduleSet>   
>   
>    <includes>
>     <include>*:xmar:*</include>
>    </includes>
>    
>    <binaries>
>     <outputDirectory>local/model/${artifactId}</outputDirectory>
>     <outputFileNameMapping></outputFileNameMapping>
>     <unpack>true</unpack>
>     
>     <dependencySets>
>      <!-- Include transitive xmars too -->
>      <includeDependencies>false</includeDependencies>
>      
>      <!-- Pull all the dependent xmar and put them in local
> directory--> <dependencySet>
>       <outputDirectory>local/model/${artifactId}</outputDirectory>
>       <outputFileNameMapping></outputFileNameMapping>
>       <includes>
>        <include>*:xmar:*</include>
>       </includes>
>       <unpack>true</unpack>
>       <scope>runtime</scope>
>      </dependencySet>
>      
>     </dependencySets>
>    </binaries>
>   </moduleSet>
>  </moduleSets>
>    
>    
>   thanks for any help or pointer.
> 
>        
> ---------------------------------
> Don't let your dream ride pass you by.    Make it a reality with
> Yahoo! Autos. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org