Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependencies in MANFEST.MF ignored on JBoss 7

We have an EJB module that we are deploying to JBoss 7.1.1 which depends on Infinispan and Infinispan Treecache.

I created a module and deployed it in the modules section of jboss.

However, there seems to be a problem with it getting picked up correctly. This is being run as an Arquillian Test. The deployment is:

@Deployment
public static Archive<?> createDeployment() {
    Archive<?> archive = ShrinkWrap.create(JavaArchive.class)
            .addPackages(true, "<package>")
            .addAsManifestResource("META-INF/MANIFEST.MF", "MANIFEST.MF")
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}

MANIFEST.MF is as follows

Manifest-Version: 1.0
Dependencies: org.infinispan.infinispan-tree, org.infinispan

infinispan-tree is the module that was added to jboss manually.

To test that it was not the module configuration, these two modules were made global in the standalone.xml and lo and behold everything worked fine.

Even changing just the org.infinispan (included with JBoss 7.x) to be non-global and trying to reference that from MANIFEST.MF did not work.

What is missing?

like image 858
drone.ah Avatar asked Dec 05 '13 15:12

drone.ah


People also ask

What is dependency declaration manifest?

In the world of Composer, the dependency declaration manifest is a composer. json file in the root of your project. At its core it's just a JSON file that lists out all your dependencies and their versions. WordPress Plugins are also dependencies but by default there's no explicit declaration of them.


1 Answers

A similar issue was reported during 'maven install' [1]

The following solution was offered :- directly mention dependencies.

Use:
.addAsManifestResource("Dependencies: org.infinispan.infinispan-tree, org.infinispan","MANIFEST.MF");

Instead of: .addAsManifestResource("META-INF/MANIFEST.MF", "MANIFEST.MF");

[1] https://issues.jboss.org/browse/ARQ-679

like image 188
Mitesh Pathak Avatar answered Sep 29 '22 13:09

Mitesh Pathak