]
Karel Piwko edited comment on SHRINKRES-194 at 8/26/14 10:22 AM:
-----------------------------------------------------------------
Landed in
Multi-module gradle project support
-----------------------------------
Key: SHRINKRES-194
URL:
https://issues.jboss.org/browse/SHRINKRES-194
Project: ShrinkWrap Resolvers
Issue Type: Requirement
Security Level: Public(Everyone can see)
Affects Versions: 2.2.0-alpha-2
Reporter: Michal Matloka
Assignee: Michal Matloka
Fix For: 2.2.0-alpha-3
Issue from github
https://github.com/mmatloka/arquillian-gradle-sample/issues/1:
{quote}
Hi,
I'm very glad for your gradle resolver. However, we have multi project setup in which
this code fails with an ArrayIndexOutOfBoundException
{code}
final GradleProject gradleProject = projectConnection.getModel(GradleProject.class);
final File buildDir = new File(projectDir, "build");
final File libsDir = new File(buildDir, "libs");
final File result = libsDir.listFiles(new FilenameFilter() {
@Override
public boolean accept(final File dir, final String name) {
return name.startsWith(gradleProject.getName());
}
})[0];
{code}
This is imho due to the fact that the gradleProject above holds the multi project but the
arquillian tests are contained (and should be contained) in the sub project (*server).
There the predicate will never be true and the [0] with end up in an exception.
I think you can either do a deep search to also get the sub project jars or more
accurately resolve the project the tests are in. If you need help let me know.
Best,
Maik
{quote}