void configureMiniClasspath()

in src/main/java/org/apache/accumulo/maven/plugin/AbstractAccumuloMojo.java [48:69]


  void configureMiniClasspath(MiniAccumuloConfig macConfig) throws MalformedURLException {
    ArrayList<String> classpathItems = new ArrayList<>();
    if (project != null) {
      classpathItems.add(project.getBuild().getOutputDirectory());
      classpathItems.add(project.getBuild().getTestOutputDirectory());
      for (Artifact artifact : project.getArtifacts()) {
        classpathItems.add(artifact.getFile().toURI().toURL().toString());
      }
    }

    // Hack to prevent sisu-guava, a maven 3.0.4 dependency, from effecting normal accumulo
    // behavior.
    String sisuGuava = null;
    for (String items : classpathItems)
      if (items.contains("sisu-guava"))
        sisuGuava = items;

    if (sisuGuava != null)
      classpathItems.remove(sisuGuava);

    macConfig.setClasspath(classpathItems.toArray(new String[classpathItems.size()]));
  }