jvanzyl     2004/03/18 20:09:32

  Modified:    
maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin
                        ResourcesPlugin.java
  Log:
  o make sure we account for times when we have resources entries like:
  
    <resource>
      <directory>src/main/resource</directory>
    </resource>
  
    We want to pick up everything within the specified directory so the the
    implicit include is **/**.
  
  Revision  Changes    Path
  1.2       +20 -3     
maven-components/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/ResourcesPlugin.java
  
  Index: ResourcesPlugin.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/ResourcesPlugin.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResourcesPlugin.java      15 Mar 2004 19:32:24 -0000      1.1
  +++ ResourcesPlugin.java      19 Mar 2004 04:09:32 -0000      1.2
  @@ -92,6 +92,10 @@
       public void execute()
           throws Exception
       {
  +        System.out.println( "outputDirectory = " + outputDirectory );
  +
  +        System.out.println( "resources = " + resources );
  +
           for ( Iterator i = getJarResources( resources ).iterator(); i.hasNext(); )
           {
               ResourceEntry resourceEntry = (ResourceEntry) i.next();
  @@ -125,8 +129,22 @@
                   continue;
               }
   
  +            // If we only have a directory then we want to include
  +            // everything we can find within that path.
  +
  +            String includes;
  +
  +            if ( resource.getIncludes().size() > 0 )
  +            {
  +                includes = listToString( resource.getIncludes() );
  +            }
  +            else
  +            {
  +                includes = "**/**";
  +            }
  +
               List files = FileUtils.getFileNames( resourceDirectory,
  -                                                 listToString( 
resource.getIncludes() ),
  +                                                 includes,
                                                    listToString( 
resource.getExcludes() ),
                                                    false );
   
  @@ -135,7 +153,6 @@
                   String name = (String) j.next();
   
                   String entryName = name;
  -                ;
   
                   if ( targetPath != null )
                   {
  
  
  

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

Reply via email to