Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGamma no longer publish old artifacts via maven.opengamma.com #22

Closed
george-hawkins-work opened this issue Oct 17, 2016 · 7 comments

Comments

@george-hawkins-work
Copy link

We have been using quandl4j for a while without problem but a new employee had issues. The reason was we all have com.opengamma.external.json cached in our local .m2 repositories but it seems maven.opengamma.com is no longer publishing old artifacts like this.

OpenGamma now seems to have a space on bintray and they also seem to be publishing their main products, like Strata, to Maven Central (e.g. see the Strata README).

I just tried building quandl4j locally but without much luck due its dependence on maven.opengamma.com. I suggest clearing out ~/.m2/repository/com/opengamma and seeing if you have the same issues (if you have something like Sonatype Nexus proxying remote repos for you then you'll obviously have to clear out things there too).

@george-hawkins-work
Copy link
Author

For reference Quandl4J works fine if we pull it in like this:

<dependency>
    <groupId>com.jimmoores</groupId>
    <artifactId>quandl</artifactId>
    <version>1.3.0</version>
    <exclusions>
        <exclusion>
            <groupId>com.opengamma.external.json</groupId>
            <artifactId>json</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.json</groupId>
    <artifactId>json</artifactId>
    <version>20160810</version>
</dependency>

I understand the reasons you outline in #11 for not including org.json:json - the clause you refer to is indeed childish and stupid (quite apart from any legal aspects).

Maybe it's time to consider Jackson. We use it for all our JSON related work (as do Spring and pretty much everyone else). E.g. parsing arbitrary JSON into a Map is as easy as:

String jsonString = ...
ObjectMapper mapper = new ObjectMapper();

Map<String, ?> data = mapper.readValue(jsonString, new TypeReference<Map<String, ?>>() { });

@jimmoores
Copy link
Owner

Sorry you've been having trouble. Relying on OpenGamma to actually maintain a repo and not just deprecate everything is obviously pointless. I'll start looking into an alternative as a priority. Thanks for the information. I'll update this thread when I have some news.

@jimmoores
Copy link
Owner

The artifacts are still there, you need to browse to http://maven.opengamma.com/nexus/content/groups/public to see them (served out of an S3 bucket), but, for whatever reason, I regularly get reports of failures because of it so I'll proceed with replacing the library anyhow.

@george-hawkins-work
Copy link
Author

OK - a few hours later http://maven.opengamma.com/nexus/content/groups/public/com/opengamma/external/json/json/1.0.0.v20101106/ seems to be available again.

But neither com.opengamma.external.json nor maven.opengamma.com look like they're big on OpenGamma's radar anymore (i.e. there's no Github repo for the first and they now seem to be using other services for their main artifacts) so maybe it's still worth considering shifting to something like Jackson.

@jimmoores
Copy link
Owner

No, I agree - I've switched to Jackson - more specifically a datatype module called jackson-datatype-json-org that solves the immediate problem by supporting the org.json data types in Jackson without introducing compatibility issues for current users. It's not that clear which Jackson model would be best (the tree model in databind I'm guessing?) as the JSON returned by Quandl is poorly defined. This is probably a 2.0 change, but it's great that Jackson has this module as it means we should be able to retain decent API compatibility.

I've pushed up an updated POM. Seems to be a drop in replacement. George, I appreciate you forcing the issue, it's a bit overdue!

@jimmoores
Copy link
Owner

I've now published 1.4.0 with the changes to Maven Central, tagged in git, moved master to 1.5.0-SNAPSHOT, updated the documentation and website and added you to the contributors list (unless you object).

@george-hawkins-work
Copy link
Author

Wow - I'm a contributor based on one small suggestion. Thanks 😄 And thanks for Quandl4J.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants