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

Trouble building #251

Closed
landon9720 opened this issue Jun 4, 2019 · 8 comments
Closed

Trouble building #251

landon9720 opened this issue Jun 4, 2019 · 8 comments

Comments

@landon9720
Copy link

landon9720 commented Jun 4, 2019

I'm trying to produce a development build of this project, but am stuck on the following error:

❯ mvn install
[INFO] Scanning for projects...
[WARNING] Could not transfer metadata io.confluent:kafka-connect-storage-common-parent:5.4.0-SNAPSHOT/maven-metadata.xml from/to confluent (${confluent.maven.repo}): Cannot access ${confluent.maven.repo} with type default using the available connector factories: BasicRepositoryConnectorFactory
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for io.confluent:kafka-connect-storage-cloud:[unknown-version]: Could not transfer artifact io.confluent:kafka-connect-storage-common-parent:pom:5.4.0-SNAPSHOT from/to confluent (${confluent.maven.repo}): Cannot access ${confluent.maven.repo} with type default using the available connector factories: BasicRepositoryConnectorFactory and 'parent.relativePath' points at wrong local POM @ line 23, column 13

I have seen this information in the FAQ and am attempting to follow these instructions to no avail. Kafka itself fails to build with the following:

> ./gradlew installAll

> Configure project :
Building project 'core' with Scala version 2.12.8
Building project 'streams-scala' with Scala version 2.12.8

> Task :generator:compileJava UP-TO-DATE
> Task :generator:processResources NO-SOURCE
> Task :generator:classes UP-TO-DATE
> Task :clients:processMessages UP-TO-DATE

> Task :clients:compileJava FAILED
/home/landon/src/kafka/kafka/clients/src/main/java/org/apache/kafka/common/network/DefaultAuthenticator.java:23: warning: [deprecation] PrincipalBuilder in org.apache.kafka.common.security.auth has been deprecated
import org.apache.kafka.common.security.auth.PrincipalBuilder;
                                            ^
error: warnings found and -Werror specified
/home/landon/src/kafka/kafka/clients/src/main/java/org/apache/kafka/common/security/plain/PlainSaslServer.java:104: error: method configEntryOption in class JaasContext cannot be applied to given types;
        String expectedPassword = jaasContext.configEntryOption(JAAS_USER_PREFIX + username,

There are dozens of similar errors. I also cannot build kafka-connect-storage-common:

❯ mvn install
[INFO] Scanning for projects...
[WARNING] Could not transfer metadata io.confluent:common:5.4.0-SNAPSHOT/maven-metadata.xml from/to confluent (${confluent.maven.repo}): Cannot access ${confluent.maven.repo} with type default using the available connector factories: BasicRepositoryConnectorFactory
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for io.confluent:kafka-connect-storage-common-parent:[unknown-version]: Could not transfer artifact io.confluent:common:pom:5.4.0-SNAPSHOT from/to confluent (${confluent.maven.repo}): Cannot access ${confluent.maven.repo} with type default using the available connector factories: BasicRepositoryConnectorFactory and 'parent.relativePath' points at wrong local POM @ line 23, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project io.confluent:kafka-connect-storage-common-parent:[unknown-version] (/home/landon/src/kafka/kafka-connect-storage-common/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for io.confluent:kafka-connect-storage-common-parent:[unknown-version]: Could not transfer artifact io.confluent:common:pom:5.4.0-SNAPSHOT from/to confluent (${confluent.maven.repo}): Cannot access ${confluent.maven.repo} with type default using the available connector factories: BasicRepositoryConnectorFactory and 'parent.relativePath' points at wrong local POM @ line 23, column 13: Cannot access ${confluent.maven.repo} using the registered transporter factories: WagonTransporterFactory: Unsupported transport protocol -> [Help 2]

Similar results trying to build rest-utils. Building just the common project is also failing:

mvn install
...
[INFO] assembly-plugin-boilerplate ........................ SUCCESS [  0.528 s]
[INFO] Build Tools ........................................ SUCCESS [  0.428 s]
[INFO] common ............................................. SUCCESS [  1.057 s]
[INFO] utils .............................................. SUCCESS [  0.785 s]
[INFO] metrics ............................................ SUCCESS [  1.710 s]
[INFO] config ............................................. SUCCESS [  1.286 s]
[INFO] common-logging ..................................... FAILURE [  0.034 s]
[INFO] confluent-log4j-extensions ......................... SKIPPED
[INFO] confluent-log4j2-extensions ........................ SKIPPED
[INFO] package ............................................ SKIPPED
[INFO] Common ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.168 s
[INFO] Finished at: 2019-06-04T11:51:48-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project common-logging: Could not resolve dependencies for project io.confluent:common-logging:jar:5.4.0-SNAPSHOT: The following artifacts could not be resolved: org.apache.kafka:connect-api:jar:5.4.0-ccs-SNAPSHOT, org.apache.kafka:connect-json:jar:5.4.0-ccs-SNAPSHOT: Failure to find org.apache.kafka:connect-api:jar:5.4.0-ccs-SNAPSHOT in http://packages.confluent.io/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of confluent has elapsed or updates are forced -> [Help 1]

Given this plethora of build errors I think I am missing some fundamental setup. Can somebody help?

@manojmayekar
Copy link

Try it with root user. It looks for connect-api and connect-json jar at below location.
/root/.m2/repository/org/apache/kafka/connect-api/5.4.0-ccs-SNAPSHOT/

It works for me:)

@Hubbitus
Copy link

@cgazzola
Copy link

cgazzola commented Nov 7, 2019

Any update on this build issue? I am experiencing the same issues both in regards to 1. not being able to resolve confluent's repo url (which I fixed by adding the absolute path of the actual url) and 2. the parent pom for io.confluent:kafka-connect-storage-cloud:5.5.0-SNAPSHOT not being available on confluent's repo. As a side note, I've followed the instructions in the FAQ and successfully built the other prerequisite projects.

@OneCricketeer
Copy link

OneCricketeer commented Nov 16, 2019

It builds fine for me. I will note that you should clone Kafka from https://github.com/confluentinc/kafka/ from the above FAQ page

Also mvn install from here https://github.com/confluentinc/kafka-connect-storage-common

confluent:kafka-connect-storage-cloud:5.5.0-SNAPSHOT would be built/installed from this project, so there would be nothing to download from the remote repo, anyway

@oshris
Copy link

oshris commented Nov 23, 2019

@landon9720 i had the same issue
found the solution in a different issue's thread: https://github.com/confluentinc/common/issues/204#issuecomment-512770834
what fiexd it was to clone https://github.com/confluentinc/kafka instead of https://github.com/apache/kafka/ as the doc says

@kkonstantine
Copy link
Member

I updated the FAQ here to point to the confluentinc fork of apache/kafka since this makes things easier on snapshot versions.
Closing since this issue was answered, but please reopen if you feel otherwise.

@raphaelauv
Copy link

confluent (${confluent.maven.repo}): Cannot access ${confluent.maven.repo}

replace

    <repositories>
        <repository>
            <id>confluent</id>
            <name>Confluent</name>
            <url>${confluent.maven.repo}</url>
        </repository>
    </repositories>

by

    <repositories>
        <repository>
            <id>confluent</id>
            <name>Confluent</name>
            <url>http://packages.confluent.io/maven/</url>
        </repository>
    </repositories>

@RichardBezerra
Copy link

Thanks @raphaelauv . That was really helpful for me.

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

9 participants