Missing artifact jxgrabkey:jxgrabkey:pom:1.0

Asked by Jai P on 2017-11-02

I know this question was asked before but the solutions that worked for some don't work for me. I have the following

<dependency>
 <groupId>com.sikulix</groupId>
 <artifactId>sikulixapi</artifactId>
 <version>1.1.0</version>
</dependency>

but the project does not compile. I see an error for "Missing artifact jxgrabkey:jxgrabkey:jar:1.0" .

On Maven central- https://mvnrepository.com/artifact/jxgrabkey/jxgrabkey/1.0, it says "this artifact it located at Consol repository (http://labs.consol.de/maven/repository/)"

So, I follow the steps to add other repos to my settings.xml and then to my pom.xml and then added the following -

<!-- https://mvnrepository.com/artifact/jxgrabkey/jxgrabkey -->
<dependency>
    <groupId>jxgrabkey</groupId>
    <artifactId>jxgrabkey</artifactId>
    <version>1.0</version>
</dependency>

but the project keeps thinking this jar is missing. I am using Eclipse IDE and Java 1.8.

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2017-11-03
Last reply:
2017-11-03
RaiMan (raimund-hocke) said : #1

the SikuliX 1.1.0 pom contains this entry:
<repositories>
        <repository> <!-- com.sikulix.sikulixapi: jxgrabkey -->
            <id>uni-due.de</id>
            <name>uni-due.de</name>
            <url>http://mvn.is.inf.uni-due.de:8081/nexus/content/repositories/atunes-dependencies/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

and the artefact is indeed there.

I just made a test with <mvn clean install> from commandline using this 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>sikulix.com</groupId>
  <artifactId>testmaven</artifactId>
  <version>1.0-SNAPSHOT</version>

  <dependencies>
    <dependency>
      <groupId>com.sikulix</groupId>
      <artifactId>sikulixapi</artifactId>
      <version>1.1.0</version>
    </dependency>
  </dependencies>
</project>

it worked and brought jxgrabkey to my local repo (deleted it before)

Beginning with 1.1.1 the jxgrabkey sources are bundled, so the external jar dependency is obsolete.
1.1.1 is currently available as SNAPSHOT, but will be on Maven Central as 1.1.1 the next days.

Jai P (jaip) said : #2

I tried exactly what you have for pom.xml and I run into the same error "Missing artifact jxgrabkey:jxgrabkey:jar:1.0". Did you have to modify your ~/.m2/settings.xml to include the new repository you have indicated above? Btw, I tried that as well but no luck.

What is the right way to make pom download from a different repo to our internal mirror? I see-
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact jxgrabkey:jxgrabkey:jar:1.0 in ss.mirror (http://nexus1.internal2.ss.com:8081/nexus/content/groups/public)

RaiMan (raimund-hocke) said : #3

ok, might be an eclipse-maven problem. No idea - I am using IntelliJ IDEA ;-)
... and you might have a special Maven repo setup (Nexus ....), which I do not have.

With Maven projects in case of problems you might always try to run the mvn command from a command line (which would ignore the Eclipse overhead).
an <mvn clean install> at your project root should work or reveal maven specific problems.

repository entry where to put:
that depends on how specific the usage is, but it is always a good idea to first use the project pom.

In this special case with SikuliX:
no need for any extra repository entry, because the downloaded SikuliX pom contains the entry and should work

Maybe it is a good idea, to purge everything from your local Maven repo in folder com/sikulix and eventually a jxgrabkey folder, to force a new download.

Can you help with this problem?

Provide an answer of your own, or ask Jai P for more information if necessary.

To post a message you must log in.