You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Michal Maczka (JIRA)" <ji...@codehaus.org> on 2005/05/19 09:54:34 UTC

[jira] Commented: (MNG-415) allow exclusion of certain dependencies from inclusion in an archive

     [ http://jira.codehaus.org/browse/MNG-415?page=comments#action_39283 ]
     
Michal Maczka commented on MNG-415:
-----------------------------------

EAR is a different case then WAR as not only you must decide what will be included in the archive 
but also attach some information to some dependencies (e.g. context roots for wars)

The decison of what gets included and what not can be based on artifact's type and scope.
For wars in particular only all runtime dependecies should be included and nothing else (compile and test dependecies should be skipped). So one of the possible solutons would be to enable to enumerate dependency scopes rather then assume that all compile time dependecies are also runtime dependecies.

To give an example

<dependency>
  
   <scope>runtime</scope>  (will be included in the war)
</dependency>


<dependency>
  
   <scope>runtime</scope>  (will be included in the war)
   <scope>compile</scope>  
</dependency>


<dependency>
  
 
   <scope>compile</scope>  (will not be included in the war)
</dependency>


<dependency>
   
   <scope>test</scope>  (will not be included in the war)
</dependency>

This approch seems to be the most natural and simple one and covers in a generic way all the cases I can think of. 

Note the artifact scope given at the top level affects also dependencies of dependencies.





> allow exclusion of certain dependencies from inclusion in an archive
> --------------------------------------------------------------------
>
>          Key: MNG-415
>          URL: http://jira.codehaus.org/browse/MNG-415
>      Project: m2
>         Type: Improvement
>   Components: maven-plugins, maven-archiver
>     Versions: 2.0-alpha-2
>     Reporter: Brett Porter
>      Fix For: 2.0-alpha-3

>
>
> this has been requested for WAR, but it should apply to all archives that include dependencies.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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