src/main/java/com/simpligility/maven/plugins/android/phase09package/AarMojo.java
protected void addDirectory( ZipArchiver zipArchiver, File directory, String prefix, boolean includeEmptyFolders )
    {
        if ( directory != null && directory.exists() )
        {
            final DefaultFileSet fileSet = new DefaultFileSet();
            fileSet.setPrefix( endWithSlash( prefix ) );
            fileSet.setDirectory( directory );
            fileSet.setIncludingEmptyDirectories( includeEmptyFolders );
            zipArchiver.addFileSet( fileSet );
            getLog().debug( "Added files from " + directory );
        }
    }
protected void addDirectory( ZipArchiver zipArchiver, File directory, String prefix, boolean includeEmptyFolders )
    {
        if ( directory != null && directory.exists() )
        {
            final DefaultFileSet fileSet = new DefaultFileSet();
            fileSet.setPrefix( endWithSlash( prefix ) );
            fileSet.setDirectory( directory );
            fileSet.setIncludingEmptyDirectories( includeEmptyFolders );
            zipArchiver.addFileSet( fileSet );
            getLog().debug( "Added files from " + directory );
        }
    }
Adds a directory to a {@link JarArchiver} with a directory prefix.

@param zipArchiver   ZipArchiver to use to archive the file.
@param directory     The directory to add.
@param prefix        An optional prefix for where in the Jar file the directory's contents should go.
@param includeEmptyFolders   Whether to include an entry for empty folder in the archive.