Rat (Release Audit Tool) results

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

*****************************************************
Summary
-------
Generated at: 2017-09-06T07:58:46+02:00
Notes: 1
Binaries: 0
Archives: 0
Standards: 9

Apache Licensed: 4
Generated Documents: 0

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

5 Unknown Licenses

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

Unapproved licenses:

  /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/CdiObjectFactoryTest.java
  /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/FooConsumer.java
  /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/FooService.java
  /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/resources/log4j2.xml
  /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/resources/META-INF/beans.xml

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

Archives:

*****************************************************
  Files with Apache License headers will be marked AL
  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
  AL    /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/pom.xml
  AL    /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/main/java/org/apache/struts2/cdi/CdiObjectFactory.java
  N     /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/main/resources/NOTICE.txt
  AL    /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/main/resources/struts-plugin.xml
  AL    /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/site/site.xml
 !????? /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/CdiObjectFactoryTest.java
 !????? /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/FooConsumer.java
 !????? /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/FooService.java
 !????? /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/resources/log4j2.xml
 !????? /Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/resources/META-INF/beans.xml
 
*****************************************************
 Printing headers for files without AL header...
 
 
=======================================================================
==/Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/CdiObjectFactoryTest.java
=======================================================================
package org.apache.struts2.cdi;

import org.jboss.weld.environment.se.StartMain;
import static org.junit.Assert.*;

import org.jboss.weld.environment.se.WeldContainer;
import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.jndi.SimpleNamingContextBuilder;

import javax.enterprise.inject.spi.InjectionTarget;

/**
 * CdiObjectFactoryTest.
 */
public class CdiObjectFactoryTest {

    @Before
    public void setUp() throws Exception {
        SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder();
        builder.activate();

        StartMain sm = new StartMain(new String[0]);
        WeldContainer weldContainer = sm.go();
        builder.bind(CdiObjectFactory.CDI_JNDIKEY_BEANMANAGER_COMP, weldContainer.getBeanManager());
    }

    @Test
    public void testFindBeanManager() throws Exception {
        assertNotNull(new CdiObjectFactory(null).findBeanManager());
    }

    @Test
    public void testGetBean() throws Exception {
        final CdiObjectFactory cdiObjectFactory = new CdiObjectFactory(null);
        FooConsumer fooConsumer = (FooConsumer) cdiObjectFactory.buildBean(FooConsumer.class.getCanonicalName(), null, false);
        assertNotNull(fooConsumer);
        assertNotNull(fooConsumer.fooService);
    }

    @Test public void testGetInjectionTarget() throws Exception {
        final CdiObjectFactory cdiObjectFactory = new CdiObjectFactory(null);
        final InjectionTarget<?> injectionTarget = cdiObjectFactory.getInjectionTarget(FooConsumer.class);
        assertNotNull(injectionTarget);
        assertTrue(cdiObjectFactory.injectionTargetCache.containsKey(FooConsumer.class));
        assertSame(cdiObjectFactory.getInjectionTarget(FooConsumer.class), injectionTarget);
    }
}

=======================================================================
==/Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/FooConsumer.java
=======================================================================
package org.apache.struts2.cdi;

import javax.inject.Inject;

/**
 * FooConsumer.
 */
public class FooConsumer {

    @Inject
    FooService fooService;
    
    public void foo() {
        System.out.println(fooService.getHello());
    }
}

=======================================================================
==/Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/java/org/apache/struts2/cdi/FooService.java
=======================================================================
package org.apache.struts2.cdi;

/**
 * FooService.
 */
public class FooService {

    public String getHello() {
        return "Hello";
    }

}

=======================================================================
==/Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/resources/log4j2.xml
=======================================================================
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <Appenders>
        <Console name="STDOUT" target="SYSTEM_OUT">
            <PatternLayout pattern="%d %5p (%c:%L) - %m%n"/>
        </Console>
    </Appenders>
    <Loggers>
        <Logger name="noModule" level="fatal"/>
        <Root level="info">
            <AppenderRef ref="STDOUT"/>
        </Root>
    </Loggers>
</Configuration>

=======================================================================
==/Users/lukaszlenart/Projects/Apache/struts/target/checkout/plugins/cdi/src/test/resources/META-INF/beans.xml
=======================================================================
<beans></beans>