AlexR
AlexR

Reputation: 115328

Zeppelin does not see dependencies from custom repository

I want to add company artifactory to Zeppelin spark interpreter and try to use this document.

So, the URL of our artifactory looks like

http://artifactory.thecompany.com:8081/artifactory/

The access is not restricted to specific user and artifacts are downloadable both from my machine and from machine where Zepplin is running (I tried this with curl).

I've copied the artifact ID from by build.gradle, so I am pretty sure it is correct. However when I try to add the artifact that should be found in my company's artifactory I get error

Error setting properties for interpreter 'spark.spark': Could not find artifact com.feedvisor.dataplatform:data-platform-schema-scala:jar:3.0.19-SNAPSHOT in central (http://repo1.maven.org/maven2/)

This error message sounds like Zeppelin did not try to look for my dependency in custom repository.

I tried to play with artifactory URL using:

as well as with "snapshot" property of "Add New Repository" form (using true and false) but nothing helped. The error message does not disappear and classes from the referenced artifact are not found.

Thanks in advance.

Upvotes: 0

Views: 1830

Answers (1)

nonsleepr
nonsleepr

Reputation: 811

For Zeppelin to use your company's repo by default you can set ZEPPELIN_INTERPRETER_DEP_MVNREPO in your ${Z_HOME}/conf/zeppelin-env.sh:

export ZEPPELIN_INTERPRETER_DEP_MVNREPO=http://artifactory.thecompany.com:8081/artifactory/

Alternatively, you can use Dynamic Dependency Loading feature of the notebook:

%dep
z.reset()
z.addRepo("Artifactory").url("http://artifactory.thecompany.com:8081/artifactory/").snapshot()
z.load("com.feedvisor.dataplatform:data-platform-schema-scala:3.0.19-SNAPSHOT")

Upvotes: 1

Related Questions