code: private void writePackageInfos( File rootDir, File outputDir )
          throws MojoExecutionException
      {
          getLog().debug( "in writePackageInfos(" + rootDir + ", " + outputDir + ")" );
  
          try
          {
              if ( shouldWritePackageInfo( rootDir ) )
              {
                  if( !outputDir.exists() && !outputDir.mkdirs() ) {
                      throw new MojoExecutionException( "outputDirectory was unable to be created: " + outputDir );
                  }
  
                  writePackageInfo( outputDir );
              }
              else
              {
                  getLog().debug( "no files in:" + rootDir );
              }
  
          }
          catch ( Throwable e )
          {
              throw new MojoExecutionException( "could not write PackageInfo.java in: " + outputDir, e );
          }
  
          // get any sub-directories
          File[] subdirs = rootDir.listFiles( new FileFilter()
          {
              public boolean accept( File pathname )
              {
                  return pathname.isDirectory();
              }
          } );
  
          // recurse
          if ( subdirs != null ) {
              for (File subdir : subdirs) {
                  writePackageInfos(subdir, new File(outputDir, subdir.getName()));
              }
          }
      }
docs: recurse into rootDir writing PackageInfos on the way in.
  @param rootDir The root directory for the source
  @param outputDir The root directory to output to
  @throws org.apache.maven.plugin.MojoExecutionException