Unable to build 0.14.0-incubating

Hey Folks,

Followed the steps at https://github.com/apache/incubator-druid/blob/master/docs/content/development/build.md

but can’t build druid-services module due to forbiddenapis:2.6:check (validate)

Java version: “1.8.0_151” and Apache Maven 3.5.2

[INFO]
[INFO] Druid … SUCCESS [ 6.975 s]
[INFO] druid-core … SUCCESS [ 21.264 s]
[INFO] druid-hll … SUCCESS [ 8.920 s]
[INFO] extendedset … SUCCESS [ 6.667 s]
[INFO] druid-processing … SUCCESS [ 10.471 s]
[INFO] druid-aws-common … SUCCESS [ 4.031 s]
[INFO] druid-server … SUCCESS [ 10.668 s]
[INFO] druid-examples … SUCCESS [ 9.260 s]
[INFO] druid-indexing-hadoop … SUCCESS [ 21.580 s]
[INFO] druid-indexing-service … SUCCESS [ 9.256 s]
[INFO] druid-sql … SUCCESS [ 7.349 s]
[INFO] druid-services … FAILURE [ 0.388 s]

[ERROR] Failed to execute goal de.thetaphi:forbiddenapis:2.6:check (validate) on project druid-services: Check for forbidden API calls failed while scanning class ‘org.apache.druid.cli.CliCoordinator$1’ (CliCoordinator.java): java.lang.ClassNotFoundException: org.apache.druid.client.CoordinatorSegmentWatcherConfig (while looking up details about referenced class ‘org.apache.druid.client.CoordinatorSegmentWatcherConfig’) -> [Help 1]

Please suggest a way to get past this. I can disable this module but other modules have dependencies on this one.

I don’t understand what am I missing here as it is straight from the github branch.

I got around this by commenting out the plugins forbiddenapis and animal-sniffer-maven-plugin in the pom.xml. Make sure you don’t commit this change.

But I’m not sure why it is this way.

Thanks Sashidhar for the suggestion. It works after disabling the plugin.

I was just concerned that how come the repo code is not working as this would be a problem every dev would have faced. Hence I was trying to identify the difference in my dev env or any step that I might have missed.

Hmm it’s weird.
I’m using Java 1.8.0_212 and Maven 3.6.0 and it works for 0.14.0-incubating.

In my case I’m using Java 1.8.0_181, Maven 3.5.4, on master branch when I enable forbiddenapis plugin in pom.xml I get

[ERROR] Failed to execute goal de.thetaphi:forbiddenapis:2.6:check (compile) on project druid-lookups-cached-global: Check for forbidden API calls failed while scanning class ‘org.apache.druid.server.lookup.namespace.UriCacheGenerator$2’ (UriCacheGenerator.java): java.lang.ClassNotFoundException: org.apache.druid.java.util.common.CompressionUtils (while looking up details about referenced class ‘org.apache.druid.java.util.common.CompressionUtils’) -> [Help 1]

Attached the full error stacktrace.

Thanks,

Sashi

forbiddenapi_error_stracktrace (8.15 KB)

Hmm what command did you run?
CompressionUtils in ‘java-util’ (which is org.apache.druid.java.util.common.CompressionUtils) was merged CompressionUtils in ‘core’ (which is org.apache.druid.utils.CompressionUtils).

This error might be because of some unclean maven cache.

Perhaps ‘mvn clean install’ would work.

Jihoon

I was using ‘mvn install’. It’s been more than a couple of weeks I did a clean install, avoided clean install to cut down build time. Doing a clean install worked.

Thanks a lot Jihoon.