Skip to content

Build Drill in a Corporate Environment

Paul Rogers edited this page Nov 13, 2019 · 3 revisions

Some corporations are quite strict about Maven dependencies, routing all requests through a local artifactory such as JFrog. When this occurs, JFrog must be configured to proxy each authorized repository. However, Drill uses some "oddball" repos that are not likely available in the local corporate proxy. These are the tricks I used to work around the issues.

First, notice the build failures. For me it was:

[ERROR] Failed to execute goal on project drill-logical:
   Could not resolve dependencies for project org.apache.drill:drill-logical:jar:1.17.0-SNAPSHOT:
   Could not find artifact com.github.vvysotskyi.drill-calcite:calcite-core:jar:1.20.0-drill-r2
   in repo (https://mycompany.jfrog.io/mycompany/repo)
[ERROR] Failed to execute goal on project drill-java-exec:
   Could not resolve dependencies for project org.apache.drill.exec:drill-java-exec:jar:1.17.0-SNAPSHOT:
   Failure to find org.kohsuke:libpam4j:jar:1.8-rev2
   in https://mycompany.jfrog.io/mycompany/repo was cached in the local repository,
   resolution will not be reattempted until the update interval of repo has elapsed or updates are forced -> [Help 1]

The correct long-term solution is to obtain proper permissions, then configure JFrog to host Drill's specialized repos. A quick-and-dirty solution is to change the Maven configuration to bypass the corporate artifactory.

cd ~/.m2
vi settings.xml

Drill stores a fork of Calcite in an ad-hoc repo. If we look in drill-logical/pom.xml, we see that jitpack.io is the repo where Drill stores its Calcite fork.

Change the following to exclude jitpack.io:

  <mirrors>
    <mirror>
      <mirrorOf>!jitpack.io,*</mirrorOf>
      <name>repo</name>
      <url>https://mycompany.jfrog.io/mycompany/repo</url>
      <id>repo</id>
    </mirror>
  </mirrors>
Clone this wiki locally