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 !????? /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/pom.xml AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/DelegatingObjectFactory.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundlePackageLoader.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/ServiceAware.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/BundleContextAware.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/PackageLoader.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiHost.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleAccessor.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java !????? /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/StrutsOsgiListener.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/FelixOsgiHost.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/SpringOsgiObjectFactory.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleClassLoaderInterface.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundleFreemarkerManager.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/loaders/StaticContentBundleResourceLoader.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/loaders/FreeMarkerBundleResourceLoader.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/java/org/apache/struts2/osgi/loaders/VelocityBundleResourceLoader.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/resources/struts-osgi.properties !????? /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/resources/struts-plugin.xml !????? /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/main/resources/beanRefContext.xml AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/test/java/org/apache/struts2/osgi/interceptor/SomeAction.java !????? /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/test/java/org/apache/struts2/osgi/interceptor/OsgiInterceptorTest.java AL /home/wesw/tmp/STRUTS_2_1_8_1/plugins/osgi/src/test/java/org/apache/struts2/osgi/FelixOsgiHostTest.java ***************************************************** Printing headers for files without AL header... ======================================================================= ==/home/wesw/tmp/STRUTS_2_1_8_1/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.1.8.1</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_1_8_1/plugins/osgi</connection> <developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_8_1/plugins/osgi</developerConnection> <url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_1_8_1/plugins/osgi</url> </scm> <dependencies> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.main</artifactId> <version>1.4.1</version> </dependency> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity</artifactId> <version>1.5</version> </dependency> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-tools</artifactId> <version>1.3</version> <exclusions> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> </exclusion> <exclusion> <groupId>struts</groupId> <artifactId>struts</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>commons-digester</groupId> ======================================================================= ==/home/wesw/tmp/STRUTS_2_1_8_1/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); } } } ======================================================================= ==/home/wesw/tmp/STRUTS_2_1_8_1/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.1.7//EN" "http://struts.apache.org/dtds/struts-2.1.7.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> ======================================================================= ==/home/wesw/tmp/STRUTS_2_1_8_1/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> ======================================================================= ==/home/wesw/tmp/STRUTS_2_1_8_1/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();