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.
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.
Building a relatively simple jetty app, following the instructions here:
http://www.eclipse.org/jetty/documentation/9.4.x/maven-and-jetty.html
I'm not using Jersey, but mvn jetty:run complains about
Provider com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer not found
My pom.xml does not include any reference to Jersey. In fact, it is quite simple:
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jettyVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>6.0.1</version>
</dependency>
What is making jetty look for Jersey?
Search all of your dependencies for META-INF/services/javax.servlet.ServletContainerInitializer files.
The one that has the entry for com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer is the one causing you problems.
Look at your project dependencies (aka <project><dependencies>) and your project's configuration of jetty-maven-plugin to see if that <plugin> has any extra dependencies added to it (aka <plugin><dependencies>).
Well, after much machination, and gnashing of teeth, I think I stumbled about the answer. Whilst learning about maven, I was playing with shaded uber-jars. I had compiled one of the packages as an uper-jar, and installed it. When maven put it all together, it added a bit too much and broke my dependencies. Removing the shaded jar for local installation and just using it for distribution worked just fine.
Added the following dependency in pom.xml.
<dependency>
<groupId>com.google.api.client</groupId>
<artifactId>google-api-data-spreadsheet-v3</artifactId>
<version>1.0.10-alpha</version>
</dependency>
But it doesn't seem to work. It doesn't contain any of the required classes. For example, SpreadsheetService, SpreadsheetFeed, SpreadsheetEntryetc.
Is there any other maven repository for Google Spreadsheet?
Also, in this documentation, they haven't mentioned any maven repository. So, do I have to manually download the required JARs and add them to my project?
After some searching and experimentation, I finally found the dependency which contains the required classes to work with Google Spreadsheets. Here it is -
<dependency>
<groupId>com.google.gdata</groupId>
<artifactId>core</artifactId>
<version>1.47.1</version>
</dependency>
To test this, I used the code given here.
As far as getting authorization is concerned, look at this answer.
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.
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>