jitpack / jitpack.io

Documentation and issues of https://jitpack.io
MIT License
2.54k stars 185 forks source link

Incorrect references to contained artifacts? #67

Closed jimlloyd closed 9 years ago

jimlloyd commented 9 years ago

I only have superficial knowledge of Maven so this may be a newbie mistake, but it seems to me that jitpack is not correctly building https://github.com/apache/incubator-tinkerpop. The instructions state I should add this dependency:

    <dependency>
        <groupId>com.github.apache</groupId>
        <artifactId>incubator-tinkerpop</artifactId>
        <version>3.0.0.M9-incubating-rc3</version>
    </dependency>

When I run mvn clean install I see errors such as these:

[WARNING] The POM for org.apache.tinkerpop:gremlin-core:jar:3.0.0.M9-incubating-rc3 is missing, no dependency information available
[WARNING] The POM for org.apache.tinkerpop:gremlin-test:jar:3.0.0.M9-incubating-rc3 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

[ERROR] Failed to execute goal on project ts-tinkerpop: Could not resolve dependencies for project co.redseal:ts-tinkerpop:jar:0.0.0-SNAPSHOT: The following artifacts could not be resolved: org.apache.tinkerpop:gremlin-groovy:jar:3.0.0.M9-incubating-rc3, org.apache.tinkerpop:tinkergraph-gremlin:jar:3.0.0.M9-incubating-rc3, org.apache.tinkerpop:gremlin-driver:jar:3.0.0.M9-incubating-rc3, org.apache.tinkerpop:gremlin-shaded:jar:3.0.0.M9-incubating-rc3, org.apache.tinkerpop:gremlin-core:jar:3.0.0.M9-incubating-rc3, org.apache.tinkerpop:gremlin-test:jar:3.0.0.M9-incubating-rc3: Failure to find org.apache.tinkerpop:gremlin-groovy:jar:3.0.0.M9-incubating-rc3 in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io has elapsed or updates are forced -> [Help 1]

When I look at the build log, I see that jitpack build artifacts with different group IDs, e.g.:

Built artifact: com.github.apache.incubator-tinkerpop:gremlin-core:3.0.0.M9-incubating-rc3

So, it seems to me that jitpack builds com.github.apache.incubator-tinkerpop:gremlin-core:3.0.0.M9-incubating-rc3 but references org.apache.tinkerpop:gremlin-core:jar:3.0.0.M9-incubating-rc3, and then fails because the reference is missing.

Am I missing something?

In case it's useful, I have pushed a branch of my project with this change: https://github.com/RedSeal-co/ts-tinkerpop/tree/exp/jitpack

jimlloyd commented 9 years ago

It seems the problem lies with peer dependencies. For example, gremlin-groovy depends on gremlin-core. In my maven cache, the file .m2/repository/com/github/apache/incubator-tinkerpop/gremlin-groovy/3.0.0.M9-incubating-rc3/gremlin-groovy-3.0.0.M9-incubating-rc3.pom lists a dependency on

    <dependency>
      <groupId>org.apache.tinkerpop</groupId>
      <artifactId>gremlin-core</artifactId>
      <version>3.0.0.M9-incubating-rc3</version>
    </dependency>

The org.apache.tinkerpop groupID should have been rewritten, right?

jitpack-io commented 9 years ago

@jimlloyd Fixed and rebuilt the project. Looks better now

jimlloyd commented 9 years ago

@jitpack-io I'm still getting errors. My first attempt was a simple 'mvn install' which triggered a bunch of downloads and seemed promising, but ultimately failed because it couldn't resolve the key dependencies with references that still used groupId org.apache.tinkerpop, e.g. org.apache.tinkerpop:gremlin-core:jar:3.0.0.M9-incubating-rc3.

But I then did mvn clean install, and it failed almost immediately with these warnings:

[WARNING] The POM for org.apache.tinkerpop:gremlin-groovy:jar:3.0.0.M9-incubating-rc3 is missing, no dependency information available
[WARNING] The POM for org.apache.tinkerpop:tinkergraph-gremlin:jar:3.0.0.M9-incubating-rc3 is missing, no dependency information available
[WARNING] The POM for org.apache.tinkerpop:gremlin-driver:jar:3.0.0.M9-incubating-rc3 is missing, no dependency information available
[WARNING] The POM for org.apache.tinkerpop:gremlin-shaded:jar:3.0.0.M9-incubating-rc3 is missing, no dependency information available
[WARNING] The POM for org.apache.tinkerpop:gremlin-core:jar:3.0.0.M9-incubating-rc3 is missing, no dependency information available
[WARNING] The POM for org.apache.tinkerpop:gremlin-test:jar:3.0.0.M9-incubating-rc3 is missing, no dependency information available

The root pom now has this snippet:

  <parent>
    <groupId>com.github.apache.incubator-tinkerpop</groupId>
    <artifactId>tinkerpop</artifactId>
    <version>3.0.0.M9-incubating-rc3</version>
  </parent>
  <groupId>com.github.apache.incubator-tinkerpop</groupId>
  <artifactId>gremlin-groovy</artifactId>
  <version>3.0.0.M9-incubating-rc3</version>
  <name>Apache TinkerPop :: Gremlin Groovy</name>
  <dependencies>
    <dependency>
      <groupId>org.apache.tinkerpop</groupId>
      <artifactId>gremlin-core</artifactId>
      <version>3.0.0.M9-incubating-rc3</version>
    </dependency>

Should that first dependency's groupId be translated from org.apache.tinkerpop to com.github.apache.incubator-tinkerpop?

jitpack-io commented 9 years ago

Yes, the groupId should be com.github.apache.incubator-tinkerpop. Looks like that's what it its on the server now: https://jitpack.io/com/github/apache/incubator-tinkerpop/gremlin-groovy/3.0.0.M9-incubating-rc3/gremlin-groovy-3.0.0.M9-incubating-rc3.pom

Could it be its still cached in your local maven repo ~/.m2?

jimlloyd commented 9 years ago

Yes, that was it. Thanks, all looks good now. Closing this issue.