vorburger / opendaylight-bot

Eclipse Public License 1.0
0 stars 2 forks source link

Include jenkins-rest pom url in .m2/settings.xml #20

Closed prateekiiest closed 6 years ago

prateekiiest commented 6 years ago

One of the issues I am currently facing is due to inclusion of a new dependncy jenkins-rest and the build is failing due to that.

In .m2/settings.xml

if we have the following

<profile>
      <id>jenkins-rest</id>
      <repositories>
        <repository>
            <id>jenkins-rest</id>
            <name>jenkins-rest</name>
            <url>http://repo.spring.io/plugins-release/</url>
        </repository>
      </repositories>
    </profile>

it solves the issue

cdancy/jenkins-rest all files are present in here http://repo.spring.io/plugins-release/com/cdancy/jenkins-rest/ , hence url should be set to this, other wise by default it is linking to http:/repo/maven where jenkins-rest is not present

prateekiiest commented 6 years ago

Should we include this info in the README and let users add it to their settings.xml or is there any way around ?

vorburger commented 6 years ago

@prateekiiest this is actually a slightly problem - I just looked a bit more into it:

So https://github.com/cdancy/jenkins-rest is available on http://repo.spring.io - but that is more of a side effect / coincidence because something else deployed on that repo probably needs it, so it got mirrored there as well; but you should not rely on that. It's original repo, according to that project's README, is JFrog Bintray's JCenter repo - which, FYI, is a sort of a alternative ("competitor") to Maven central.

So we could add that (instead of Spring.io's) to settings.xml, but that is always a PITA... where you locally can do that, it can confuse future contributors. And if this code ever moves to http://git.opendaylight.org, then it's a PITA again - because https://nexus.opendaylight.org does not mirror JFrog Bintray's JCenter, and requesting that woud likely be a bigger discussion.

Knowing about this now, I'm almost tempted to suggest that we revisit the choice made in #8 and instead of cdancy/jenkins-rest use jenkinsci/java-client-api after all - just because jenkinsci/java-client-api seems to be available more easily, via Maven central. Would that be OK for you?

prateekiiest commented 6 years ago

yeah, I think so shifting would be the best option as of now. I am totally fine with shifting to jenkinsci/java-client-api.

Could you link me to the maven repo for jenkinsci ?

vorburger commented 6 years ago

Could you link me to the maven repo for jenkinsci ?

@prateekiiest according to https://github.com/jenkinsci/java-client-api README (note that "button", right under the title), the java-client-api library is available on Maven central, and it indeed is. Because https://nexus.opendaylight.org "mirrors" Maven central, you should be able to just add a dependency to it and it will just work.

vorburger commented 6 years ago

@prateekiiest do you want to close this, based on #21 ?

prateekiiest commented 6 years ago

yes we can safely close this