Brett Porter wrote:

> 
> On 28/06/2011, at 7:46 AM, Benson Margulies wrote:
> 
>> The tomcat wars are NOT provided. The idea is to grab them from the
>> repositories, copy them to the local repo, and have the tomcat plugin
>> 'collect them all.'
>> 
>> I didn't know that maven already had the concept of non-classpath
>> artifact types. I've been laboring under the idea that these things
>> would end up in the classpath if not excluded somehow.
> 
> Right - you should be declaring a new type in a plugin that can turn off
> <addedToClasspath/>

A component descriptor is normally enough. A plugin is only needed if such 
an archive requires a very special handling that cannot be accomplished 
easily with the dependency or assembly plugin.

> - or use a packaging type like zip which wasn't
> already.

Just as a side node: ZIP *is* added to the classpath - unfortunately. We use 
therefore a simple jar file with a plexus component descriptor that turns 
that off:

==== %< =====
 <component-set>
   <components>
     <component>
       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
       <role-hint>zip</role-hint>
       
<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
       <configuration>
         <type>zip</type>
         <addedToClasspath>false</addedToClasspath>
         <includesDependencies>true</includesDependencies>
       </configuration>
     </component>
   </components>
 </component-set>
==== %< =====

This jar is added as extension to our global parent POM. Additionally you 
have to set the extensions flag for all plugins to true that have to respect 
this (e.g. compiler plugin) which is also done in this parent POM in the 
pluginMgmt section.

[snip]

- Jörg


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

Reply via email to