#430 Java Haystack Project Missing depenencies

Jonathan Hughes Thu 4 Aug 2016

Just updated my haystack-java project from bitbucket and looking at the testing area there appears to be an issue resolving org.testing.annotations. Was looking to check out all the recent updates and review the methods in the testing classes, which I assume are the preferred methods.

If there's some sort of extra steps (gradle related) needing to be taken to get the project built out correctly after downloading from bitbucket, that would be very helpful to have documented.

Matthew Giannini Fri 5 Aug 2016

I assume you meant org.testng.annotations?

A few diagnostic questions/suggestions

  1. What version of java are you using?
  2. You should be building this by running gradlew build. This script is in the root directory of the repository. This will ensure that everyone is using a consistent environment for building the project. Did you use that script to build it? (You should be using gradelew for all gradle tasks on this project.
  3. What is the specific issue you are having resolving that package?

Matthew Giannini Fri 5 Aug 2016

One other thing you might have to do is is edit

<USER_HOME>/.gradle/gradle.properties

And add the explicit path to the JDK to use. I had to do this on my windows test box, but not on my mac. For example:

org.gradle.java.home=C:/Apps/Java/jdk1.8.0_51

Jonathan Hughes Fri 5 Aug 2016

  1. I am using java 1.8.0_25.
  2. I'm not so much having issues with the gradle build functions as I am with just viewing the code in an IDE (intellij in my case) without the org.testing.annotations missing. If I rune gradlew build, it builds well enough until the testing phase that fails (no local skyspark running so that's expected).
  3. The specific issue is that I can't actually open this project in an IDE without missing dependencies (org.testing.annotations) in the test area of the project to review.

Matthew Giannini Mon 8 Aug 2016

Sounds like this is an IDE issue. I am using IntelliJ and I was able to create a new project by pointing it at the build.gradle file. (New Project from existing source and select build.gradle).

I also just pushed a changeset that applies the "idea" (IntelliJ) plugin. If you run the following task it should generate the IntelliJ project files for you:

$> gradlew idea

Then you should be able to select "Open Project" from IntelliJ and point it at that directory.

Jonathan Hughes Tue 9 Aug 2016

Used the gradlew idea command since i'm used to using that command for gradle and intelliJ projects already. Was able to open the new project with no more errors and all the dependencies resolved correctly.

Thanks.

Login or Signup to reply.