[arquillian-issues] [JBoss JIRA] (ARQ-679) dependencies in manifest.mf ignored when running maven install

Dmitri Voronov (JIRA) jira-events at lists.jboss.org
Mon Feb 25 08:10:56 EST 2013


    [ https://issues.jboss.org/browse/ARQ-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756437#comment-12756437 ] 

Dmitri Voronov commented on ARQ-679:
------------------------------------

Hi Mike,

I'm facing the same issue.
                
> dependencies in manifest.mf ignored when running maven install
> --------------------------------------------------------------
>
>                 Key: ARQ-679
>                 URL: https://issues.jboss.org/browse/ARQ-679
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JBoss AS Containers
>    Affects Versions: 1.0.0.CR6
>         Environment: Windows
>            Reporter: Michael Voegele
>              Labels: arquillian, manifest, maven
>
> I use following components / versions:
> arquillian-junit-container - 1.0.0.CR6
> jboss - 7.1.0.Beta1
> jboss-as-arquillian-container-remote - 7.1.0.Beta1
> junit - 4.10
> I have folloging testcase:
> @RunWith(Arquillian.class)
> public class DatasourceSessionBeanTest {
> 	@Deployment
> 	public static JavaArchive createTestArchive() {
> 		JavaArchive javaArchive = ShrinkWrap.create(JavaArchive.class, "datasource-test.jar");
> 		javaArchive.addClasses(BeanInterceptor.class);
> 		javaArchive.addClasses(DatasourceServiceRemote.class, DatasourceSessionBean.class);
> 		javaArchive.addClasses(AlcatrazUser.class, DataTransferObject.class);
> 		javaArchive.addClasses(AlcatrazDAO.class, MatchMode.class);
> 		javaArchive.addAsManifestResource("META-INF/persistence.xml", "persistence.xml");
> 		javaArchive.addAsManifestResource("META-INF/MANIFEST.MF", "MANIFEST.MF");
> 		// javaArchive.addPackages(true, "org.slf4j");
> 		// javaArchive.addPackages(true, "org.jboss.logmanager");
> 		System.out.println(javaArchive.toString(true));
> 		return javaArchive;
> 	}
> 	@EJB(mappedName = "java:app/datasource-test/DatasourceSessionBean")
> 	private DatasourceServiceRemote datasourceService;
> 	@Test
> 	public void testGetByRoid() {
> 		AlcatrazUser alcatrazUser = datasourceService.getByRoid("2531781");
> 		assertNotNull("Result should not be null.", alcatrazUser);
> 	}
> }
> -> A manifest.mf is added containing 'Dependencies: org.slf4j'
> When running the test "as a junit test", slf4j is found and logging works.
> When the tests are executed from maven lifecycle, I get a ClassNotFoundException org.slf4j.Logger and the test fails.
> By adding dependencies to org.slf4j and org.jboss.logmanager to the pom and by adding them to the ShrinkWrap archive (see the two commented lines), the test works, although no logging is done.
> Dependencies to modules in manifest.mf should also be recognized when the tests are run from maven.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list