Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 89100 invoked from network); 11 Sep 2007 09:10:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2007 09:10:53 -0000 Received: (qmail 19665 invoked by uid 500); 11 Sep 2007 09:10:41 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 18654 invoked by uid 500); 11 Sep 2007 09:10:39 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 18643 invoked by uid 99); 11 Sep 2007 09:10:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2007 02:10:39 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of martin.lists@imap.cc designates 66.111.4.26 as permitted sender) Received: from [66.111.4.26] (HELO out2.smtp.messagingengine.com) (66.111.4.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2007 09:12:11 +0000 Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id BDFFE2E2DE for ; Tue, 11 Sep 2007 05:10:15 -0400 (EDT) Received: from web5.messagingengine.com ([10.202.2.214]) by compute2.internal (MEProxy); Tue, 11 Sep 2007 05:10:15 -0400 Received: by web5.messagingengine.com (Postfix, from userid 99) id 871DA287DF; Tue, 11 Sep 2007 05:10:15 -0400 (EDT) Message-Id: <1189501815.27936.1209998683@webmail.messagingengine.com> X-Sasl-Enc: onZHHl/TeG6UlDQcdXCGwC+D6DVNtojBqOLTd3FFCbSC 1189501815 From: "Martin Gilday" To: "Maven Users List" Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface References: <1189500194.23124.1209996101@webmail.messagingengine.com> Subject: Re: Dependency scope In-Reply-To: Date: Tue, 11 Sep 2007 10:10:15 +0100 X-Virus-Checked: Checked by ClamAV on apache.org Hi Antonio, Thanks for the link. That lead me on to http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html So I added a block like so: maven-war-plugin WEB-INF/lib/MyLib*.jar I use * to avoid duplication of my version (of course I could use property here). This prevents the JAR appearing in the WAR as I wish. Unfortunately this caused another issue. All the transitive dependencies of my artifact still appear in the WAR! To prevent this would require more duplication than my original alternative profile method. Is there a way to exclude from the WAR but specify dependency artifacts rather than file patterns? I'm guessing there isn't from the docs. Thanks, Martin ----- Original message ----- From: "Antonio Petrelli" To: "Maven Users List" Date: Tue, 11 Sep 2007 10:50:28 +0200 Subject: Re: Dependency scope 2007/9/11, Martin Gilday : > > Is there a dependency scope which makes an artifact available for > compilation of src/main/java and also on the test classpath, but not > included in the resulting WAR? I have tried provided which makes sense > in excluding it from the WAR but then it is not available to my tests. > The only solution I have found is to make another profile to use when > testing which overwrites the provided scope to default scope. This > means duplicating all of the dependency blocks, so is far from ideal. I think that you need to exclude it manually, in the WAR plugin configuration: http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#dependentWarExcludes HTH Antonio --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org