Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 81070 invoked from network); 23 Nov 2006 18:19:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Nov 2006 18:19:35 -0000 Received: (qmail 85994 invoked by uid 500); 23 Nov 2006 18:19:45 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 85741 invoked by uid 500); 23 Nov 2006 18:19:44 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 85730 invoked by uid 500); 23 Nov 2006 18:19:43 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 85727 invoked by uid 99); 23 Nov 2006 18:19:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Nov 2006 10:19:43 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Nov 2006 10:19:33 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 70D3B1A9846; Thu, 23 Nov 2006 10:18:58 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r478629 - in /webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src: main/java/org/apache/axis2/maven2/mar/AbstractMarMojo.java site/apt/configuration.apt Date: Thu, 23 Nov 2006 18:18:58 -0000 To: axis2-cvs@ws.apache.org From: davidillsley@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061123181858.70D3B1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: davidillsley Date: Thu Nov 23 10:18:55 2006 New Revision: 478629 URL: http://svn.apache.org/viewvc?view=rev&rev=478629 Log: Add configuration option to the axis2-mar-maven-plugin to allow mars to be built and not contain all the project dependencies. Modified: webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/AbstractMarMojo.java webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/site/apt/configuration.apt Modified: webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/AbstractMarMojo.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/AbstractMarMojo.java?view=diff&rev=478629&r1=478628&r2=478629 ============================================================================== --- webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/AbstractMarMojo.java (original) +++ webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/main/java/org/apache/axis2/maven2/mar/AbstractMarMojo.java Thu Nov 23 10:18:55 2006 @@ -91,6 +91,13 @@ private FileSet[] fileSets; /** + * Whether the dependency jars should be included in the mar + * + * @parameter expression="${includeDependencies}" default-value="true" + */ + private boolean includeDependencies; + + /** * Builds the exploded mar file. * @throws MojoExecutionException */ @@ -125,34 +132,36 @@ copyMetaInfFile( moduleXmlFile, moduleFileTarget, existsBeforeCopyingClasses, "module.xml file" ); - Set artifacts = project.getArtifacts(); - - List duplicates = findDuplicates( artifacts ); - - for ( Iterator iter = artifacts.iterator(); iter.hasNext(); ) - { - Artifact artifact = (Artifact) iter.next(); - String targetFileName = getDefaultFinalName( artifact ); - - getLog().debug( "Processing: " + targetFileName ); - - if ( duplicates.contains( targetFileName ) ) - { - getLog().debug( "Duplicate found: " + targetFileName ); - targetFileName = artifact.getGroupId() + "-" + targetFileName; - getLog().debug( "Renamed to: " + targetFileName ); - } - - // TODO: utilise appropriate methods from project builder - ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME ); - if ( !artifact.isOptional() && filter.include( artifact ) ) - { - String type = artifact.getType(); - if ( "jar".equals( type ) ) - { - copyFileIfModified( artifact.getFile(), new File( libDir, targetFileName ) ); - } - } + if(includeDependencies){ + Set artifacts = project.getArtifacts(); + + List duplicates = findDuplicates( artifacts ); + + for ( Iterator iter = artifacts.iterator(); iter.hasNext(); ) + { + Artifact artifact = (Artifact) iter.next(); + String targetFileName = getDefaultFinalName( artifact ); + + getLog().debug( "Processing: " + targetFileName ); + + if ( duplicates.contains( targetFileName ) ) + { + getLog().debug( "Duplicate found: " + targetFileName ); + targetFileName = artifact.getGroupId() + "-" + targetFileName; + getLog().debug( "Renamed to: " + targetFileName ); + } + + // TODO: utilise appropriate methods from project builder + ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME ); + if ( !artifact.isOptional() && filter.include( artifact ) ) + { + String type = artifact.getType(); + if ( "jar".equals( type ) ) + { + copyFileIfModified( artifact.getFile(), new File( libDir, targetFileName ) ); + } + } + } } } catch ( IOException e ) Modified: webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/site/apt/configuration.apt URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/site/apt/configuration.apt?view=diff&rev=478629&r1=478628&r2=478629 ============================================================================== --- webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/site/apt/configuration.apt (original) +++ webservices/axis2/trunk/java/modules/tool/axis2-mar-maven-plugin/src/site/apt/configuration.apt Thu Nov 23 10:18:55 2006 @@ -2,22 +2,25 @@ All Mar plugin goals takes the following configuration parameters as input: -*------------------+----------------------------------+------------------------------------------------+ -| Parameter name | Default value | Description | -*------------------+----------------------------------+------------------------------------------------+ -| marDirectory | ${project.build.directory}/mar | Directory where the mar file is built. | -*------------------+----------------------------------+------------------------------------------------+ -| classesDirectory | ${project.build.outputDirectory} | Directory with compiled classes and resources. | -*------------------+----------------------------------+------------------------------------------------+ -| fileSets | | Additional file sets, which are being added to | -| | | the archive. See "File Sets" below for an | -| | | example. | -*------------------+----------------------------------+------------------------------------------------+ -| moduleXmlFile | | Location of the module.xml file. By default, | -| | | it is assumed that the file is already present | -| | | in classesDirectory/META-INF and no special | -| | | processing is required. | -*------------------+----------------------------------+------------------------------------------------+ +*---------------------+----------------------------------+------------------------------------------------+ +| Parameter name | Default value | Description | +*---------------------+----------------------------------+------------------------------------------------+ +| marDirectory | ${project.build.directory}/mar | Directory where the mar file is built. | +*---------------------+----------------------------------+------------------------------------------------+ +| classesDirectory | ${project.build.outputDirectory} | Directory with compiled classes and resources. | +*---------------------+----------------------------------+------------------------------------------------+ +| fileSets | | Additional file sets, which are being added to | +| | | the archive. See "File Sets" below for an | +| | | example. | +*---------------------+----------------------------------+------------------------------------------------+ +| moduleXmlFile | | Location of the module.xml file. By default, | +| | | it is assumed that the file is already present | +| | | in classesDirectory/META-INF and no special | +| | | processing is required. | +*---------------------+----------------------------------+------------------------------------------------+ +| includeDependencies | true | Whether to include the project dependencies in | +| | | the generated mar. | +*---------------------+----------------------------------+------------------------------------------------+ The mar goal --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org