protected void addJavaResource( JarArchiver jarArchiver, Resource javaResource ) {
    """
	Adds a Java Resources directory (typically "src/main/resources") to a {@link JarArchiver}.
	
	@param jarArchiver
	@param javaResource
	The Java resource to add.
    """
        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 );
            }
        }
    }
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 );
            }
        }
    }
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 ) ; } } }
Adds a Java Resources directory (typically "src/main/resources") to a {@link JarArchiver}.

@param jarArchiver
@param javaResource
The Java resource to add.
Adds a Java Resources directory ( typically src / main / resources ) to a { @link JarArchiver } .