rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

no dependency information available for 2.6.0 #93

Closed rkhaja closed 5 years ago

rkhaja commented 5 years ago

Looks like something might be broken in Maven Central, but I am not 100% positive.

I am compiling my project with the following dependency in my pom.xml:

        <dependency>
            <groupId>com.github.rvesse</groupId>
            <artifactId>airline</artifactId>
            <version>2.6.0</version>
        </dependency>

During compilation, I see the following warnings:

[WARNING] The POM for com.github.rvesse.airline:airline:jar:2.6.0 is missing, no dependency information available
[WARNING] The POM for com.github.rvesse.airline:airline-examples:jar:2.6.0 is missing, no dependency information available
[WARNING] The POM for com.github.rvesse.airline:airline-help-bash:jar:2.6.0 is missing, no dependency information available
[WARNING] The POM for com.github.rvesse.airline:airline-help-html:jar:2.6.0 is missing, no dependency information available
[WARNING] The POM for com.github.rvesse.airline:airline-help-man:jar:2.6.0 is missing, no dependency information available
[WARNING] The POM for com.github.rvesse.airline:airline-help-markdown:jar:2.6.0 is missing, no dependency information available
[WARNING] The POM for com.github.rvesse.airline:airline-io:jar:2.6.0 is missing, no dependency information available

which results in build failure.

I am able to successfully compile with version 2.5.0, so this is the reason that I feel that something is wrong with 2.6.0. Please take a look.

rvesse commented 5 years ago

Not sure what's going on here

We're using 2.6.0 exactly the same in a new project we're working on currently and we've not had any issues resolving dependencies either locally or in our CI infrastructure. i.e. I've been building stuff with the exact same dependency today without any issues.

A quick look at Maven central shows that the POM files are indeed present e.g. https://search.maven.org/remotecontent?filepath=com/github/rvesse/airline/2.6.0/airline-2.6.0.pom

Does your build/environment override the default repositories in any way? A mvn help:effective-profile will dump the fully resolved POM taking into account any -P options and your Maven settings file (~/.m2/settings.xml by default). Checking the <repositories> section in that output will indicate which Maven repositories are being used.

rkhaja commented 5 years ago

Hello Rob,

I wasn't able to find a mvn help:effective-profile goal. Did you mean mvn help:effective-pom or? or some other goal?

Does your build/environment override the default repositories in any way? No.

Here is the <repositories> section of my mvn help:effective-pom:

  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
  </repositories>

When I build using 2.5.0 I have no problems. When I build using 2.6.0 I see build failure.

rkhaja commented 5 years ago

I deleted ~/.m2/repository which forced downloading of all my dependencies. Now I'm able to compile successfully with 2.6.0. Closing.

rvesse commented 5 years ago

@rkhaja My bad, should have been mvn help:effective-pom

You might also have been able to add a -U to your mvn invocation to force updates of missing repository metadata

rvesse commented 5 years ago

The root cause was probably #88 - you probably once resolved the dependency when the artifacts were missing from Maven central and your local Maven cached that fact and since they were releases did not automatically try and refresh the metadata

rkhaja commented 5 years ago

I did try cleaning and updating with mvn, probably using a -U flag, but don't remember exactly, though it didn't help.

Yes, the root cause was probably #88, I may have tried 2.6.0 before the fix for #88, then reverted to 2.5.0. More recently when I tried compiling my project with 2.6.0, it must have used the cached artifact, and caused the build failure.

Thank you for investigating!