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

on-resolvable parent POM for io.confluent:kafka-connect-storage-common-parent:6.0.0? #130

Open
Adeljoo opened this issue Mar 31, 2020 · 11 comments

Comments

@Adeljoo
Copy link

Adeljoo commented Mar 31, 2020

I imported the code into eclipse as a maven project and I got the following error for all the projects. Any thoughts of how to solve this?
Is there a way to run this in the eclipse or I have to run it via terminal?

`Project build error: Non-resolvable parent POM for io.confluent:kafka-connect-storage-common-parent:6.0.0-
SNAPSHOT: Failure to transfer io.confluent:common:pom:6.0.0-SNAPSHOT from ${confluent.maven.repo} was cached in
the local repository, resolution will not be reattempted until the update interval of confluent has elapsed or updates are
forced. Original error: Could not transfer artifact io.confluent:common:pom:6.0.0-SNAPSHOT from/to confluent ($
{confluent.maven.repo}): Cannot access ${confluent.maven.repo} with type default using the available connector
factories: AetherRepositoryConnectorFactory, BasicRepositoryConnectorFactory and 'parent.relativePath' points at
wrong local POM'

@OneCricketeer
Copy link

@Adeljoo
Copy link
Author

Adeljoo commented Apr 7, 2020

I have followed this instruction and was able to have maven clean without any error in Eclipse, Build success.
Building kafka-connect-storage-partitioner 6.0.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ kafka-connect-storage-partitioner --- [INFO] Deleting /home/ameneh/eclipse-workspace/kafka-connect-storage-common-acc/partitioner/target [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS

But When I do other build lifecycles like Maven build then specify a goal as clean or validate then I get the following error:

kafka-connect-storage-partitioner 6.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for io.confluent:kafka-connect-storage-core:jar:6.0.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.622 s
[INFO] Finished at: 2020-04-07T15:44:27+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project kafka-connect-storage-partitioner: Could not resolve dependencies for project io.confluent:kafka-connect-storage-partitioner:jar:6.0.0-SNAPSHOT: Failure to find io.confluent:kafka-connect-storage-core:jar:6.0.0-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]
[ERROR] 

@OneCricketeer
Copy link

OneCricketeer commented Apr 7, 2020

I don't use Eclipse. I just build in the terminal directly.

partitioner builds fine for me

Do you really need to build the master branch, though?

@Adeljoo
Copy link
Author

Adeljoo commented Apr 8, 2020

Not really, I need to extend the partitioner. I assume one of the releases also works, am I right? also, this sentence is a bit difficult for me to understand. Should I perform all the previous steps in the folder where I download the master branch?
Then, to build Kafka Connect Storage Common modules and make them available to storage sink connectors, do the same on the current repo:

Next question, for the other branches, I do not need to add the dependencies? I just run in the termininal and it will work magiclly?

@OneCricketeer
Copy link

OneCricketeer commented Apr 8, 2020

I need to extend the partitioner.

You don't need to build this project to create your own partitioner.

Add this to your Maven project

<dependency>
  <group>io.confluent</group>
  <artifactId>kafka-connect-storage-partitioner</artifactId>
  <verison>5.4.1</version>
</dependency>

Then you can have YourClass implements Partitioner

@OneCricketeer
Copy link

@Adeljoo
Copy link
Author

Adeljoo commented Apr 9, 2020

Thank you. I added the jar file to the build path but still get this error
Missing artifact io.confluent:kafka-connect-storage-partitioner:jar:5.4.1

Here is my pom

`project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org  /xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.accelerator.kafka</groupId>
    <artifactId>kafka-connect-storage-partitioner</artifactId>
    <name>kafka-connect-storage-partitioner</name>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>
 <dependencies>
     <dependency>
    <groupId>io.confluent</groupId>
    <artifactId>kafka-connect-storage-partitioner</artifactId>
    <version>5.4.1</version>
    <packaging>jar</packaging>
    </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.9</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-api</artifactId>
            <version>2.1.0</version>
        </dependency>
        <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>2.0.0-alpha1</version>
    <scope>test</scope>
</dependency>
    </dependencies>

</project>`

@OneCricketeer
Copy link

Missing from ... Maven Central? Right... Confluent has their own repo

https://stackoverflow.com/questions/43488853/confluent-maven-repository-not-working

@Adeljoo
Copy link
Author

Adeljoo commented Apr 10, 2020

Greate. I will post the pom that I use, may someone have the same issue.
One more question, when I build a custom partitioner, I need to export the java class to the single jar or the whole package must be export as a jar? Sorry, I am super new to this part.

Here is the final pom:

<?xml version="1.0" encoding="UTF-8"?>
<!--

  -->

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.accelerator.kafka</groupId>
    <artifactId>kafka-connect-storage-partitioner</artifactId>
    <name>kafka-connect-storage-partitioner</name>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <repositories>
    <repository>
        <id>confluent</id>
        <url>http://packages.confluent.io/maven/</url>
    </repository>
    </repositories>
  <properties>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
  </properties>
 <dependencies>
  <dependency>
    <groupId>io.confluent</groupId>
    <artifactId>kafka-connect-storage-partitioner</artifactId>
    <version>5.4.1</version>
    </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.9</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-api</artifactId>
            <version>2.1.0</version>
        </dependency>
        <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>4.13</version>
      </dependency>
        <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>2.0.0-alpha1</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>io.confluent</groupId>
    <artifactId>kafka-connect-storage-common</artifactId>
    <version>5.4.1</version>
</dependency>
    </dependencies>

</project>

@Adeljoo
Copy link
Author

Adeljoo commented Apr 10, 2020

I was able to add a custom partitioner.

@OneCricketeer
Copy link

OneCricketeer commented Apr 10, 2020

Fantastic. Feel free to close the issue @Adeljoo

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