axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r516868 - /webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AbstractAarMojo.java
Date Sun, 11 Mar 2007 08:04:19 GMT
Author: ruchithf
Date: Sun Mar 11 00:04:18 2007
New Revision: 516868

URL: http://svn.apache.org/viewvc?view=rev&rev=516868
Log:
Use "includeDependencies" to decide whether to include deps in the aar file or not.


Modified:
    webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AbstractAarMojo.java

Modified: webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AbstractAarMojo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AbstractAarMojo.java?view=diff&rev=516868&r1=516867&r2=516868
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AbstractAarMojo.java
(original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AbstractAarMojo.java
Sun Mar 11 00:04:18 2007
@@ -105,6 +105,13 @@
      * @parameter
      */
     private FileSet[] fileSets;
+    
+    /**
+     * Whether the dependency jars should be included in the aar
+     * 
+     * @parameter expression="${includeDependencies}" default-value="true"
+     */
+    private boolean includeDependencies;
 
     /**
      * Builds the exploded AAR file.
@@ -154,34 +161,35 @@
             copyMetaInfFile( servicesXmlFile, servicesFileTarget, existsBeforeCopyingClasses,
"services.xml file" );
             copyMetaInfFile( wsdlFile, wsdlFileTarget, wsdlExistsBeforeCopyingClasses, "WSDL
file" );
 
-            Set artifacts = project.getArtifacts();
-
-            List duplicates = findDuplicates( artifacts );
+            if(includeDependencies){
+                Set artifacts = project.getArtifacts();
 
-            for ( Iterator iter = artifacts.iterator(); iter.hasNext(); )
-            {
-            	Artifact artifact = (Artifact) iter.next();
-            	String targetFileName = getDefaultFinalName( artifact );
-
-            	getLog().debug( "Processing: " + targetFileName );
+                List duplicates = findDuplicates(artifacts);
 
-            	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 )
);
-            		}
-            	}
+                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 )



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message