Author: jdcasey
Date: Tue Jun 21 09:08:40 2005
New Revision: 191674

URL: http://svn.apache.org/viewcvs?rev=191674&view=rev
Log:
PR: MNG-500    Not sure if anything else is touched besides the war mojo. If 
so, we should factor the inclusion logic into some sort of component for 
maintenance purposes.

Modified:
    
maven/components/trunk/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java

Modified: 
maven/components/trunk/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java?rev=191674&r1=191673&r2=191674&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
 Tue Jun 21 09:08:40 2005
@@ -171,13 +171,22 @@
             // TODO: scope handler
             // TODO: use classpath instead
             // Include runtime and compile time libraries
-            if ( "jar".equals( artifact.getType() ) && 
!Artifact.SCOPE_TEST.equals( artifact.getScope() ) && 
!Artifact.SCOPE_PROVIDED.equals( artifact.getScope() ) )
-            {
-                FileUtils.copyFileToDirectory( artifact.getFile(), 
libDirectory );
-            }
+            
+            // [jc, 21-June]: handle TLDs as a special-case.
             if ( "tld".equals( artifact.getType() ) )
             {
                 FileUtils.copyFileToDirectory( artifact.getFile(), 
tldDirectory );
+            }
+            // [jc, 21-June]: filter POMs out of the /lib copy process.
+            else if ( "pom".equals( artifact.getType() ) )
+            {
+                // don't mess with these...they'd only be here for inclusion 
of dependencies.
+            }
+            // [jc, 21-June]: I'm removing ( "jar".equals( artifact.getType() 
) ) from consideration here
+            // we'll handle anything that's NOT a POM or a TLD as a binary 
library to go in /lib
+            else if ( !Artifact.SCOPE_TEST.equals( artifact.getScope() ) && 
!Artifact.SCOPE_PROVIDED.equals( artifact.getScope() ) )
+            {
+                FileUtils.copyFileToDirectory( artifact.getFile(), 
libDirectory );
             }
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to