Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear how to compile the code #7

Open
joaquinvanschoren opened this issue Sep 27, 2018 · 3 comments
Open

Unclear how to compile the code #7

joaquinvanschoren opened this issue Sep 27, 2018 · 3 comments

Comments

@joaquinvanschoren
Copy link
Contributor

Using Java 1.8 and the latest apiconnector from Maven, I get several compilation errors. For instance:

The method getNominalValues() is undefined for the type DataFeature.Feature
The constructor DataFeature(Integer, int, DataFeature.Feature[], String) is undefined
Unhandled exception type JSONException

Probably a version mismatch but it is not clear what to do exactly.

@janvanrijn
Copy link
Member

Thanks for pointing this out.

The evaluation engine relies on the snapshot version of the java api connector (see pom.xml). Eclipse usually resolves this automatically when both projects are in the workspace. I added this to the readme.

@joaquinvanschoren
Copy link
Contributor Author

What is still unclear:

  • How does one get the snapshot version of the java api connector?
  • Eclipse can resolve it if you create another project for the apiconnector, but that is a bit unnerving, since you are pulling from master and there is no guarantee that that gives you the same code as the snapshot? I'm also not sure if development should depend on an IDE.
  • Initially, I set up the EvaluationEngine project as a Maven project in Eclipse, but then I get the error: "The project cannot be built until its prerequisite apiconnector is built". Btw, running mvn compile returns an error because it can't find the snapshot.

The most workable solution seems to be to roll your own jar file for the apiconnector using the latest code from GitHub, and then putting that jar on your classpath. That seems to be a fragile solution, though?

@janvanrijn
Copy link
Member

Thanks for diving into this. It seems that it is not entirely clear how to set up for development on the evaluation engine. While personally I didn't experience all these problems, would you maybe willing to record all troubles that you ran into and contribute this to a FAQ? That would probably be very helpful for future contributors, including the programmer.

How does one get the snapshot version of the java api connector?

git clone https://github.com/openml/openml-java -> it's in the apiconnector folder

Eclipse can resolve it if you create another project for the apiconnector, but that is a bit unnerving, since you are pulling from master and there is no guarantee that that gives you the same code as the snapshot? I'm also not sure if development should depend on an IDE.

This is not dependent on an IDE. While Eclipse offers a way of resolving this, there is also a native cli way (see documentation) and I doubt that any other IDE can not deal with this. Furthermore, snapshot means latest version that is currently not yet released, so working with master seems fine to me.

Initially, I set up the EvaluationEngine project as a Maven project in Eclipse, but then I get the error: "The project cannot be built until its prerequisite apiconnector is built". Btw, running mvn compile returns an error because it can't find the snapshot.

Do you still get this error?

The most workable solution seems to be to roll your own jar file for the apiconnector using the latest code from GitHub, and then putting that jar on your classpath. That seems to be a fragile solution, though?

This is laborious and definitely not the solution that is advocated by maven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants