RAT (Release Audit Tool) results

The following document contains the results of RAT (Release Audit Tool).

*****************************************************
Summary
-------
Notes: 0
Binaries: 0
Archives: 0
Standards: 26

Apache Licensed: 21
Generated Documents: 0

JavaDocs are generated and so license header is optional
Generated files do not required license headers

5 Unknown Licenses

*******************************

Archives (+ indicates readable, $ unreadable): 

 
*****************************************************
  Files with AL headers will be marked L
  Binary files (which do not require AL headers) will be marked B
  Compressed archives will be marked A
  Notices, licenses etc will be marked N
 !????? /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/pom.xml
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleAccessor.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleClassLoaderInterface.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleFreemarkerManager.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundlePackageLoader.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/DelegatingObjectFactory.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/FelixOsgiHost.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/BundleContextAware.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/ServiceAware.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/loaders/FreeMarkerBundleResourceLoader.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/loaders/StaticContentBundleResourceLoader.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/loaders/VelocityBundleResourceLoader.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiHost.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/PackageLoader.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/SpringOsgiObjectFactory.java
 !????? /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
 !????? /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/resources/beanRefContext.xml
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/resources/struts-osgi.properties
 !????? /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/resources/struts-plugin.xml
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/test/java/org/apache/struts2/osgi/FelixOsgiHostTest.java
 !????? /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/test/java/org/apache/struts2/osgi/interceptor/OsgiInterceptorTest.java
  AL    /Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/test/java/org/apache/struts2/osgi/interceptor/SomeAction.java
 
 *****************************************************
 Printing headers for files without AL header...
 
 
 =======================================================================
 ==/Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/pom.xml
 =======================================================================
 <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-plugins</artifactId>
        <version>2.3.8</version>
    </parent>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-osgi-plugin</artifactId>
    <packaging>jar</packaging>
    <name>Struts 2 OSGi Plugin</name>

    <scm>
       <connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/osgi</connection>
       <developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_8/plugins/osgi</developerConnection>
       <url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_3_8/plugins/osgi</url>
    </scm>

    <dependencies>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.main</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-tools</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
        </dependency>

        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>

 =======================================================================
 ==/Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java
 =======================================================================
 package org.apache.struts2.osgi;

import org.apache.struts2.StrutsException;

import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContext;

/**
 * ServletContextListener that starts Apache Felix
 */
public class StrutsOsgiListener implements ServletContextListener {
    public static final String OSGI_HOST = "__struts_osgi_host";
    private FelixOsgiHost osgiHost;

    public void contextInitialized(ServletContextEvent sce) {
        ServletContext servletContext = sce.getServletContext();
        osgiHost = new FelixOsgiHost();
        servletContext.setAttribute(OSGI_HOST, osgiHost);
        try {
            osgiHost.init(servletContext);
        } catch (Exception e) {
            throw new StrutsException("Apache Felix failed to start", e);
        }
    }

    public void contextDestroyed(ServletContextEvent sce) {
        try {
            osgiHost.destroy();
        } catch (Exception e) {
            throw new StrutsException("Apache Felix failed to stop", e);
        }
    }
}

 =======================================================================
 ==/Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/resources/beanRefContext.xml
 =======================================================================
 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
    <bean id="parent-context-bean" class="org.springframework.context.support.ClassPathXmlApplicationContext">
        <constructor-arg>
            <list>
                <value>classpath*:/spring/*.xml</value>
            </list>
        </constructor-arg>
    </bean>
</beans>

 =======================================================================
 ==/Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/main/resources/struts-plugin.xml
 =======================================================================
 <?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC
	"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
	"http://struts.apache.org/dtds/struts-2.3.dtd">
    
<struts order="10">
    <constant name="struts.objectFactory" value="osgi" />
    <constant name="struts.objectFactory.delegate" value="struts" />
    <constant name="struts.freemarker.manager.classname" value="org.apache.struts2.osgi.BundleFreemarkerManager" />
    <constant name="struts.staticContentLoader" value="org.apache.struts2.osgi.loaders.StaticContentBundleResourceLoader" />

    <constant name="struts.convention.action.includeJars" value="jar:file:.*?/bundles/.*?\.jar(!/)?" />

    <bean type="org.apache.struts2.osgi.BundleAccessor" class="org.apache.struts2.osgi.DefaultBundleAccessor" />
    <bean type="org.apache.struts2.osgi.PackageLoader" class="org.apache.struts2.osgi.BundlePackageLoader" />
    
    <bean name="osgi" type="com.opensymphony.xwork2.ObjectFactory" class="org.apache.struts2.osgi.DelegatingObjectFactory" />
    <bean name="springOsgi" type="com.opensymphony.xwork2.ObjectFactory" class="org.apache.struts2.osgi.SpringOsgiObjectFactory" />
    <bean name="osgi" type="com.opensymphony.xwork2.config.PackageProvider" class="org.apache.struts2.osgi.OsgiConfigurationProvider" />
    <bean name="osgi" type="com.opensymphony.xwork2.util.finder.ClassLoaderInterface" class="org.apache.struts2.osgi.BundleClassLoaderInterface" />

    <package name="osgi-default" extends="struts-default" abstract="yes">
        <interceptors>
            <interceptor name="osgi" class="org.apache.struts2.osgi.interceptor.OsgiInterceptor" />

            <interceptor-stack name="osgiStack">
                <interceptor-ref name="defaultStack"/>
                <interceptor-ref name="osgi"/>
            </interceptor-stack>
        </interceptors>

         <default-interceptor-ref name="osgiStack"/>
    </package>
</struts>

 =======================================================================
 ==/Users/lukaszlenart/Projects/Apache/STRUTS_2_3_8/plugins/osgi/src/test/java/org/apache/struts2/osgi/interceptor/OsgiInterceptorTest.java
 =======================================================================
 package org.apache.struts2.osgi.interceptor;

import org.easymock.EasyMock;
import org.apache.struts2.osgi.OsgiHost;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;

import javax.servlet.ServletContext;

import com.opensymphony.xwork2.ActionInvocation;
import junit.framework.TestCase;

import java.util.List;

public class OsgiInterceptorTest extends TestCase {
    public void testBundleContextAware() throws Exception {
        ServletContext servletContext = EasyMock.createStrictMock(ServletContext.class);
        BundleContext bundleContext = EasyMock.createStrictMock(BundleContext.class);
        ActionInvocation actionInvocation = EasyMock.createStrictMock(ActionInvocation.class);
        BundleContextAware bundleContextAware = EasyMock.createStrictMock(BundleContextAware.class);

        EasyMock.expect(servletContext.getAttribute(OsgiHost.OSGI_BUNDLE_CONTEXT)).andReturn(bundleContext);
        EasyMock.expect(actionInvocation.getAction()).andReturn(bundleContextAware);
        bundleContextAware.setBundleContext(bundleContext);
        EasyMock.expect(actionInvocation.invoke()).andReturn("");

        EasyMock.replay(bundleContextAware);
        EasyMock.replay(servletContext);
        EasyMock.replay(actionInvocation);

        OsgiInterceptor osgiInterceptor = new OsgiInterceptor();
        osgiInterceptor.setServletContext(servletContext);
        osgiInterceptor.intercept(actionInvocation);

        EasyMock.verify(bundleContextAware);
    }

     public void testBundleContextAwareNegative() throws Exception {
        ServletContext servletContext = EasyMock.createStrictMock(ServletContext.class);
        ActionInvocation actionInvocation = EasyMock.createStrictMock(ActionInvocation.class);
        BundleContextAware bundleContextAware = EasyMock.createStrictMock(BundleContextAware.class);

        EasyMock.expect(servletContext.getAttribute(OsgiHost.OSGI_BUNDLE_CONTEXT)).andReturn(null);
        EasyMock.expect(actionInvocation.invoke()).andReturn("");

        EasyMock.replay(bundleContextAware);
        EasyMock.replay(servletContext);
        EasyMock.replay(actionInvocation);

        OsgiInterceptor osgiInterceptor = new OsgiInterceptor();