Dependency 'me.sargunvohra.lib:pokekotlin:2.3.0' not found - java

I'm trying to use the PokeAPI for a Java Project. It should work, however, when I try to add the dependancy to my pom.xml, it doesn't recognise it. I have the files downloaded from the github, and have the following code in my pom.xml:
<dependency>
<groupId>me.sargunvohra.lib</groupId>
<artifactId>pokekotlin</artifactId>
<version>2.3.0</version>
</dependency>
files
But I keep getting this error:
Could not find artifact me.sargunvohra.lib:pokekotlin:pom:2.3.0 in
central (https://repo.maven.apache.org/maven2)
Does anyone know how to properly add this dependency? The code below does not work when I try to use it.
PokeApi pokedex = new PokeApiClient ();
PokemonSpecies pokemon = pokedex.getPokemonSpecies (1);
System.out.println(pokemon);
P.S. I have tried to invalidate cache and restart, that does not work either.

The artifact is located at Spring Plugins repository (https://repo.spring.io/plugins-release/) so you need to add it to your pom.xml as follows:
<repositories>
<repository>
<id>spring-plugins-release</id>
<name>Spring Plugins</name>
<url>https://repo.spring.io/plugins-release/</url>
</repository>
</repositories>

Related

"Unable to create Maven project from repository."

I'm currently getting this error doing Maven Site:
Unable to create Maven project from repository.
My configuration:
<url>grocery.com</url>
<distributionManagement>
<repository>
<id>grocery</id>
<url>grocery.com</url>
</repository>
</distributionManagement>
As far as I understand Maven Site, at the end of the process, it should pop a report website link and this link would work locally. So, I can use any url or do I need a specific one?
Here is the full bug report:
https://codeshare.io/5XbJe8
My complete pom.xml:
https://codeshare.io/ad0nr4

Not able to load maven depedency for spark-cloudant. getting Missing artifact cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11

In Java I am adding below maven dependency,
<dependency>
<groupId>cloudant-labs</groupId>
<artifactId>spark-cloudant</artifactId>
<version>2.0.0-s_2.11</version>
</dependency>
but it is not loading package even in pom.xml file showing below error,
Missing artifact cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11
Can anyone help me please why it is causing issue?
I am able to add another maven dependencies but particularly this is not working..
It's not in the official maven repository. (http://search.maven.org/#search%7Cga%7C1%7Cspark-cloudant)
But when you check: https://mvnrepository.com/artifact/cloudant-labs/spark-cloudant/2.0.0-s_2.11 there is note:
Note: this artifact it located at Spark Packages repository
(https://dl.bintray.com/spark-packages/maven/)
So you will need to add following to your pom.xml:
<repositories>
<repository>
<id>bintray</id>
<name>bintray.com</name>
<url>https://dl.bintray.com/spark-packages/maven/</url>
</repository>
</repositories>
EDIT:
According to https://spark.apache.org/news/new-repository-service.html
Bintray, the original repository service used for https://spark-packages.org/, is in its sunset process, and will no longer be available from May 1st. To consume artifacts from the new repository service, please replace “dl.bintray.com/spark-packages/maven” with “repos.spark-packages.org” in the Maven pom files or sbt build files in your repositories.
So this should work:
<repositories>
<repository>
<id>bintray</id>
<name>bintray.com</name>
<url>https://repos.spark-packages.org</url>
</repository>
</repositories>
Check your maven repo to verify that the file name and version matches what you've specified. Most Maven repo's give you an example of what to use, copy/paste.
ex: Sonatype Nexus is a repo that I use and they let you search and get snippets so you never have to worry about typing things wrong.

Eclipse | Maven : Multiple annotations found at this line

I'm trying to import a maven project into Eclipse.
I'm using Helios. I've downloaded m2eclipse. I've imported the project.
But I'am having so much troubles to compile the project.
The full project contains 5 Eclipse projects, ie: prj1, prj2, prj3, prj4 and prj5
If I look the (Eclipse) marker at prj1/pom.xml I have this troubles:
Multiple annotations found at this line:
- Missing artifact log4j:log4j:jar:1.2.15:compile
- Missing artifact org.apache.xmlbeans:xmlbeans-xpath:jar:2.4.0:compile
- Missing artifact org.apache.ws.commons.axiom:axiom-dom:jar:1.2.5:compile
- Missing artifact org.apache.httpcomponents:httpcore:jar:4.0-alpha5:compile
.... and so many more ...
If I understood how maven works those dependecies must be downloaded my maven, am I wrong?
Why is it that those dependencies are not being downloaded? Should I download one by one, by hand?
It is not a unique issue, happens every now and then (sometimes due to a slow connection and sometimes due to proxy servers not allowing to download)
You can get rid of this by either of the following ways:
1) Force Update: Right Click on the Project in Eclipse -> Maven -> Update Project
On this screen select the check box Force Update for Snapshots/Releases
2) Clearing Maven Cache: If you are still facing a problem, go to the local repository on your system, which might be present at C:\Users\myusername\.m2\repository and delete the .cache folder and then follow step 1.
If you're still facing issues after this, manually go to the org/apache folder and delete everything and then follow step 1. (This will definitely solve the issue.)
Make sure your build path is going to /target/classes
to check:
right click on your project and go to properties
-> choose java build path
-> then go to the source tab
the default output folder is on the bottom
With Eclipse/Maven projects, I've always had more luck building from the command line (mvn clean package) first in order to download all of the dependencies. Once that completes without errors, then I import the project into Eclipse.
It can be a mistake in pom repository / dependency definition
i.e. I want include in pom groupId:org.clapper artifactId:javautil
The home page of clapper say use:
http://software.clapper.org/javautil
<repositories>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<id>clapper-org-maven-repo</id>
<name>org.clapper Maven Repo</name>
<url>http://maven.clapper.org/</url>
<layout>default</layout>
</repository>
...
</repositories>
and
<dependency>
<groupId>org.clapper</groupId>
<artifactId>javautil</artifactId>
<version>3.1.2</version>
</dependency>
It don't work! I got "Multiple annotations found at this line"!!!
If I use dependency from
https://github.com/shilad/wikibrain/blob/master/wikibrain-utils/pom.xml
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<id>clapper-org-maven-repo</id>
<name>org.clapper Maven Repo</name>
<url>http://maven.clapper.org/</url>
<layout>default</layout>
</repository>
+
<dependency>
<groupId>org.clapper</groupId>
<artifactId>javautil</artifactId>
<version>3.1.1</version>
</dependency>
It work fine!!!

Problem deploying my project to maven repository since java.net moved from CollabNet to Project Kenai

Problem deploying my jaudiotagger project since java.net moved from CollabNet to Project Kenai
I made the following changes to pom.xml
from
<repository><id>maven2-repository.dev.java.net</id>
to
<repository><id>maven2-repository.java.net</id>
from
<repository>
<uniqueVersion>false</uniqueVersion>
<id>java.net-maven2-repository</id>
<url>java-net:/maven2-repository/trunk/repository/</url>
</repository>
to
<repository>
<uniqueVersion>false</uniqueVersion>
<id>java.net-m2-repository</id>
<url>java-net:/maven2-repository-svn/trunk/repository/</url>
</repository>
and Wagon version from
<version>1.8</version>
to
<version>1.12</version>
When I run mvn deploy it just complains:
Error retrieving previous build number for artifacts 'org:jaudiotagger:jar' repository metadata for: 'snapshot org:jaudiotagger:2.0.4-SNAPSHOT' could not be retrieved from repository: java.net-m2-repository due to an error: Connection failed:Unable to connect to https://svn.java.net/svn/maven2-repository-svn/trunk/repository
What am I doing wrong
thanks Paul
They have discontinued hosting their own repository but failed to mention it to anyone
http://www.java.net/forum/topic/forum-help/project-moved-project-kenjai-unable-deply-maven-repository?force=216

Unable to compile and create maven project for hibernate

I am trying to create a Eclipse project from Hibernate tutorials under path
\hibernate-distribution-3.5.3-Final\project\tutorials\eg
using command line mvn eclipse:eclipse. But i am getting this error
Reason: POM 'org.jboss.maven.plugins:maven-jdocbook-style-plugin' not found in repository: Unable to download the artifact from any repository
Can anyone faced this issue with the latest release of Hibernate?
I don't know what version of the plugin you need but JBoss has moved recently to Nexus and, while the previous repositories (mentioned here) will stay online indefinitely, ultimate versions of stuff is pushed to their Nexus repo now. So I suspect that you need the following declaration somewhere:
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</repository>
...
</repositories>

Categories

Resources