Stan Devitt,  Platform Group

----- Original Message -----
From: Jörg Schaible [mailto:joerg.schai...@scalaris.com]
Sent: Tuesday, June 28, 2011 02:40 AM
To: dev@maven.apache.org <dev@maven.apache.org>
Subject: Re: <scope>peri</scope>

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


---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.

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

Reply via email to