ralfstx/minimal-json

Cannot use 0.9.3 from maven central

angelozerr opened this issue · 14 comments

Perhaps it's my fault, but I have changes my pom with 0.9.3:

<dependency>
    <groupId>com.eclipsesource.minimal-json</groupId>
    <artifactId>minimal-json</artifactId>
    <version>0.9.3</version>
</dependency

, and I have the following errors :

[ERROR] Failed to execute goal on project _a: Could not resolve dependencies for project __a:_a:jar:0.0.1-SNAPSHOT: 
Failed to collect dependencies at com.eclipsesource.minimal-json:minimal-json:jar:0.9.3: Failed to read artifact descriptor for com.eclipsesource.minimal-json:minimal-json:jar:0.9.3: 
Could not find artifact com.eclipsesource.minimal-json:parent:pom:0.9.3 in central (http://repo.maven.apache.org/maven2) -> [Help 1]

Any help are welcome, thanks!

I also get a build failure in one of my projects for the same dependency declaration, although the error looks slightly different, see "dev" branch at https://travis-ci.org/sbandara/cloud-pokes - perhaps because I did not follow the recent discussion around SNAPSHOT. The good news is that builds against the previous release appear to be still intact, at least in all my tests.

Thanks, I'll look into it. I've used the maven-release-plugin for the first time, chances are that I've messed up something.

I'm having the same error. Both with repositories http://repo.maven.apache.org/maven2 and https://repo1.maven.org/maven2 . In both cases it seems the pom downloads fine, but can't get to the downloading the JAR step, presumably because it can't find the referenced parent.

Here's what that looks like in the console:

Downloading: https://repo1.maven.org/maven2/com/eclipsesource/minimal-json/minimal-json/0.9.3/minimal-json-0.9.3.pom
Downloaded: https://repo1.maven.org/maven2/com/eclipsesource/minimal-json/minimal-json/0.9.3/minimal-json-0.9.3.pom (6 KB at 3.3 KB/sec)
Downloading: https://repo1.maven.org/maven2/com/eclipsesource/minimal-json/parent/0.9.3/parent-0.9.3.pom
... (truncated for readability)
[ERROR] Failed to execute goal on project ...: Could not resolve dependencies for project ...:1.0-SNAPSHOT: Failed to collect dependencies at com.eclipsesource.minimal-json:minimal-json:jar:0.9.3: Failed to read artifact descriptor for com.eclipsesource.minimal-json:minimal-json:jar:0.9.3: Could not find artifact com.eclipsesource.minimal-json:parent:pom:0.9.3 in central (https://repo1.maven.org/maven2) -> [Help 1]

You can see that the pom is downloaded in the 2nd line, but then it goes hunting for "parent-0.9.3.pom" and can't find it.

I'm a little fuzzy on the way parent artifacts are declared, but is it possible that the name of the parent artifact in the pom doesn't reflect what you're intending? Or that the parent pom isn't actually there?

  <parent>
    <groupId>com.eclipsesource.minimal-json</groupId>
    <artifactId>parent</artifactId>
    <version>0.9.3</version>
  </parent>

Actually, the only purpose of this parent pom is to allow building and testing both modules in this repository in a single step from the repo root. Only the minimal-json module is published on Maven Central. In order to use the maven release plug-in I made some structural changes that included the parent pom in the dependency chain, something I didn't expect.

It was my mistake not to try installing from the prepared repository before publishing it. I was not aware of this risk. Sorry for that.

So, unfortunately, this version is now broken on Maven Central, and I'm afraid there's nothing I can do about it except getting a fixed 0.9.4 out as soon as possible.

From #55 (comment):

Perhaps this will help in the meantime https://jitpack.io/#ralfstx/minimal-json/0.9.3

The workaround provided by @jitpack-io seems to work:

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>com.github.ralfstx</groupId>
    <artifactId>minimal-json</artifactId>
    <version>0.9.3</version>
  </dependency>
</dependencies>

That may also be a nice way to consume snapshots.

Works like a charm. Thanks!

Is there a workaround for using 0.9.3 from maven central? Unfortunately adding another repository is not an option for me :/
Would love to use the "merging" feature of 0.9.3 :)

+1 Please don't give up on maven central just because jitpack seems to work

@pacher I won't give up, but I'm afraid I don't have a solution for 0.9.3. However, 0.9.4 will be out very soon and I'll double check releases on maven central before flipping the switch from now on.

@ralfstx Thanks a lot.

@ralfstx Any update on 0.9.4? I am also struggeling with the parent POM not found...

@kristian I plan to release 0.9.4 next Sunday (2015-07-19).

@ralfstx Looking forward to it. Thanks a lot. Greetings to Karlsruhe from Waghäusel ;-)