code: protected void addJavaResource( JarArchiver jarArchiver, Resource javaResource )
      {
          if ( javaResource != null )
          {
              final File javaResourceDirectory = new File( javaResource.getDirectory() );
              if ( javaResourceDirectory.exists() )
              {
                  final DefaultFileSet javaResourceFileSet = new DefaultFileSet();
                  javaResourceFileSet.setDirectory( javaResourceDirectory );
                  javaResourceFileSet.setPrefix( endWithSlash( "src/main/resources" ) );
                  jarArchiver.addFileSet( javaResourceFileSet );
              }
          }
      }
docs: Adds a Java Resources directory (typically "src/main/resources") to a {@link JarArchiver}.
  
  @param jarArchiver
  @param javaResource
  The Java resource to add.