I want to try kafka 0.8 (as I understand it is already released). But where can I find the kafka maven repository.
And what additional repository url should I add?
I've found some blogs with
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.8.0</artifactId>
<version>0.8.0-SHA</version>
</dependency>
but it is not works. I'm looking for proper maven dependency. Or should I checkout it from git and deploy in our internal artifactory?
UPDATE
Since November 2013 official Kafka releases can be found on public Maven repository, the latest version in March 2015 being 0.8.2.1:
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.10</artifactId>
<version>0.8.2.1</version>
</dependency>
If you created the not.released:kafka artifact detailed below any more you can remove it from the local repository.
Original Answer
Kafka is not released yet to a public Maven repository, but you can add it to your local Maven repository by hand with the install-file command:
mvn install:install-file -Dpackaging=jar -DgroupId=not.released
-DartifactId=kafka -Dversion=0.8.0 -Dfile=kafka.jar
The command line above expects kafka.jar file in the current working directory.
Once installed you can use it with:
<dependency>
<groupId>not.released</groupId>
<artifactId>kafka</artifactId>
<version>0.8.0</version>
</dependency>
Once they release Kafka you can just change the dependency in your POMs and remove / uninstall this file from your local repository.
As of December 2013, Kafka 0.8 Final was released and is available under the following definition:
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.10</artifactId>
<version>0.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.9.2</artifactId>
<version>0.8.0-beta1</version>
</dependency>
Even though this is already answered, I think future readers might benefit from a complete simple example that works out of the box. I put one together here >
https://github.com/buildlackey/cep
Like the o.p., I have been fighting to find a Maven pom.xml recipe that will allow me to pull in an official version of Kafka from a public Maven repository. I did manage to get my example working, but for now I have had to hack
my dependencies so that the version of Kafka I use is pulled from a work-in-progress version of a
storm-kafka integration project. I'm concerned the 'wip' versions below will be deprecated.
Then this project will lose its dependencies and fail to build properly. Also, I
really shouldn't be introducing storm for this simple Kafka example at this point in any case.
storm
storm
0.9.0-wip17
storm
storm-core
0.9.0-wip17
storm
storm-kafka
0.9.0-wip16a-scala292
If someone could provide me with a patch for 'the right way' to do this with Maven I will update my project accordingly.... Hopefully it will serve as a useful resource for other beginning Kafka developers.
Just go to http://mvnrepository.com/artifact/org.apache.kafka and choose from the list kafka repository matching to your version.
You can find all the realease version here:
http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.kafka%22
Here is another clue:
<dependency>
<groupId>com.sksamuel.kafka</groupId>
<artifactId>kafka_2.10</artifactId>
<version>0.8.0-beta1</version>
</dependency>
Related
io.micrometer:micrometer-core:micrometer-core-1.10.0.M1-redhat-00001.pom defines a dependency on io.micrometer:micrometer-commons:micrometer-commons-1.10.0.M1-redhat-00001
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-commons</artifactId>
<version>1.10.0.M1-redhat-00001</version>
<scope>compile</scope>
</dependency>
And io.micrometer:micrometer-commons:micrometer-commons-1.10.0.M1-redhat-00001.pom does not specify <packaging> to be pom. Therefore it is using default packaging type of jar.
However, there is no micrometer-commons-1.10.0.M1-redhat-00001.jar available here.
Is there anything wrong in Micromere 1.10.0.M1-redhat-00001?
The repo that you are using is not the official repo of Micrometer.
Check the docs and the readme, Micrometer artifacts can be found here:
Stable: https://search.maven.org/search?q=g:io.micrometer
Milestone: https://repo.spring.io/ui/native/milestone/io/micrometer
Snapshot: https://repo.spring.io/ui/native/snapshot/io/micrometer
If you want to use the non-official redhat repo, please contact redhat support.
I am writing one utility job in java to download JSON files from particular URL of Gitlab account and further process them according to requirement. I tried to do same using java-gitlab-api dependency. However, even after including below maven dependency,
I get error as :
Missing artifact org.gitlab:java-gitlab-api:jar:1.1.8-
The import org.gitlab cannot be resolved.
Maven dependency I am using is :
<dependency>
<groupId>org.gitlab</groupId>
<artifactId>java-gitlab-api</artifactId>
<version>1.1.8-SNAPSHOT</version>
</dependency>
I tried to update, clean maven project but nothing worked. Anyone has an idea of how can I rectify issues and download files from gitlab account.
Use appropriate maven java-gitlab-api version(s). There is most recent version is available too.
https://mvnrepository.com/artifact/org.gitlab/java-gitlab-api/1.1.8
https://mvnrepository.com/artifact/org.gitlab/java-gitlab-api
<!-- https://mvnrepository.com/artifact/org.gitlab/java-gitlab-api -->
<dependency>
<groupId>org.gitlab</groupId>
<artifactId>java-gitlab-api</artifactId>
<version>1.1.8</version>
</dependency>
I have an application that streams Twitter data using Twitter4j. In Maven Dependencies, I've got the 4.0.2 version, but I want to update to the 4.0.4.
How do I do that? In Configure Build Path it is not possible to edit the selection of the jar file.
This is the major advantage of using Maven, that it fetches the required jars and caches it for your further usage.
You don't have to download the updated JAR, just update the version number of the JAR in your Maven POM file and do a clean and rebuild.
When you do that, Maven will check your local repository (cache) and, if the jar hasn't already been downloaded, it will go to the maven repositories, find a copy, and download it (this is assuming you didn't do an offline build!), then it will use that copy to do your new build with.
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>4.0.4</version>
</dependency>
Hope that this helps!
Updating your pom.xml by adding this snippet in the dependencies section:
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>4.0.6</version>
</dependency>
Note, that there are several important fixes incoming with 4.0.6. For example, the support for enhanced_media_entities is added, which is quite important for compatibility reasons with Twitter API.
For more details about the API changes in 2016 check this link.
I am using ngdbc.jar to connect Java and HANA. Now I want to build a Web application. So I searched for the equivalent Maven repository but I could not find that one.
I found mostly for the cloud ones and finally found this one:
<dependency>
<groupId>com.sap.cloud</groupId>
<artifactId>neo-java-web-api</artifactId>
<version>1.53.18.2</version>
<scope>provided</scope>
</dependency>
Can any one tell which repository I can use instead of ngdbc.jar? Any help is appreciated
SAP doesn't allowed redistribution of ngdbc.jar in their TC as mentioned here. So you won't find any legal one online.
Your only option is to include the jar from your local. Something like:
<dependency>
<groupId>sample</groupId>
<artifactId>com.sample</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/yourJar.jar</systemPath>
</dependency>
described here here how to deal with the missing ngdbc.jar:
https://github.com/claboran/priceimporter
I tried to install the jar file as a dependency by
install:install-file -Dfile=C:\ngdbc.jar -DgroupId=com.han.driver -DartifactId=hana -Dversion=1.0 -Dpackaging=jar
in Maven which is pretty handy and good way.hope this helps someone dealing with custom jars.
I am very new to eclipse and maven repository. I got a project to config the errors of POM.xml. I fixed many of it, but I am unable to fix some. Following are that errors.
<dependency>
<groupId>jlibs</groupId>
<artifactId>jlibs-jdbc</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.jgodies.form</groupId>
<artifactId>forms</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
<scope>runtime</scope>
In Maven repository folder there are not all the files which are in the other folders, so I put them manually, but still no results.
All the Oracle realted jars are not the part of the Central Maven Repository.
May be the case with the other oracle related jars. That is the reason why its not able to resolve the dependencies.
You should create a separate custom repository on your company server where you can put all these jar and configure that in POM.xml. Maven will first check the Central reposiroty and if it does not find the files will later check the custom repositry.
For locally running Maven you will have to do a MVN Install manually. you should never manuallly copy any jars to the m2 repositiry
Getting the JDBC drivers is a bit tricky. Please check this article for directions.
Due to Oracle license restriction, there is NO public Maven repository provides Oracle JDBC driver. To use Oracle jdbc drive with Maven, you have to install it manually into your Maven local repository.