Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 58BF0DA69 for ; Thu, 30 Aug 2012 15:15:20 +0000 (UTC) Received: (qmail 28305 invoked by uid 500); 30 Aug 2012 15:15:20 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 28263 invoked by uid 500); 30 Aug 2012 15:15:20 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 28253 invoked by uid 99); 30 Aug 2012 15:15:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 15:15:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 15:15:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2166523888FE; Thu, 30 Aug 2012 15:14:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1378983 - /sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AbstractUsingBundleListMojo.java Date: Thu, 30 Aug 2012 15:14:34 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120830151434.2166523888FE@eris.apache.org> Author: cziegeler Date: Thu Aug 30 15:14:33 2012 New Revision: 1378983 URL: http://svn.apache.org/viewvc?rev=1378983&view=rev Log: SLING-2590 : Provide a way to exclude configurations from partial bundle lists Modified: sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AbstractUsingBundleListMojo.java Modified: sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AbstractUsingBundleListMojo.java URL: http://svn.apache.org/viewvc/sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AbstractUsingBundleListMojo.java?rev=1378983&r1=1378982&r2=1378983&view=diff ============================================================================== --- sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AbstractUsingBundleListMojo.java (original) +++ sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AbstractUsingBundleListMojo.java Thu Aug 30 15:14:33 2012 @@ -38,6 +38,7 @@ import org.apache.sling.maven.projectsup import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.zip.ZipUnArchiver; import org.codehaus.plexus.util.FileUtils; +import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.drools.KnowledgeBase; import org.drools.KnowledgeBaseFactory; @@ -107,6 +108,22 @@ public abstract class AbstractUsingBundl private File[] rewriteRuleFiles; /** + * The comma separated list of tokens to include when copying configs + * from partial bundle lists. + * + * @parameter default-value="**" + */ + private String[] configIncludes; + + /** + * The comma separated list of tokens to exclude when copying the configs + * from partial bundle lists. + * + * @parameter + */ + private String[] configExcludes; + + /** * @component */ protected MavenFileFilter mavenFileFilter; @@ -312,8 +329,16 @@ public abstract class AbstractUsingBundl this.tempConfigDir.mkdirs(); this.overlayConfigDir = this.tempConfigDir; } + String excludes = FileUtils.getDefaultExcludesAsString(); + if ( this.configExcludes != null ) { + excludes = excludes + ',' + StringUtils.join(this.configExcludes, ","); + } + String includes = null; + if ( this.configIncludes != null ) { + includes = StringUtils.join(this.configIncludes, ","); + } FileUtils.copyDirectory(configDir, this.overlayConfigDir, - null, FileUtils.getDefaultExcludesAsString()); + includes, excludes); } } catch (final ArchiverException ae) { throw new MojoExecutionException("Unable to extract configuration archive.",ae);