XMLWordPrintable

    • Icon: Sub-requirement Sub-requirement
    • Resolution: Done
    • Icon: Major Major
    • 2.2.0-beta-1
    • 2.2.0-alpha-2
    • gradle
    • None

      Issue from github https://github.com/mmatloka/arquillian-gradle-sample/issues/1:

      Hi,

      I'm very glad for your gradle resolver. However, we have multi project setup in which this code fails with an ArrayIndexOutOfBoundException

      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];
      

      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

              mmatloka Michal Matloka (Inactive)
              mmatloka Michal Matloka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: