Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:1139434
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
@RunWith(Arquillian.class)
public class PrototypeArqTest {
 
@Deployment
public static JavaArchive createTestArchive() {
return ShrinkWrap.create(JavaArchive.class, "test.jar")
.addClass(RulesRepositoryManager.class)
.addClass(RulesRepository.class)
.addClass(PrototypeArqTest.class)
.addAsManifestResource(new File("src/main/webapp/WEB-INF/beans.xml"));
}
 
@Inject
private RulesRepository repository;
 
@Test
public void theRepoIsNotNull() {
assertNotNull(repository);
}
 
@Test
public void theRepoIsNotNull2() {
assertNotNull(repository);
}
 
}
 
 
 
=> org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Credentials] with qualifiers [@Default] at injection point [[field] @Inject private org.drools.guvnor.server.repository.RulesRepositoryManager.credentials]
 
 
How do I add all my jar dependencies (not 1 at a time please) to ShrinkWrap and all my classes in src/main/java and all my resources in src/main/resources?

ish..

@Deployment
public static WebArchive createDeployment() {
    return ShrinkWrap.create(WebArchive.class)
        .addAsResource(new File("target/classes"), "WEB-INF/classes")
        .addAsLibraries(
            DependencyResolvers.use(MavenDependencyResolver.class)
            .includeDependenciesFromPom("pom.xml")
            .resolveAsFiles()
        );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.