spring-social / spring-social-google

Spring Social extension with connection support and an API binding for Google

Home Page:https://spring-social-google.github.io/spring-social-google/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NoSuchMethodError for GoogleOAuth2Template.createAccessGrant

christopherjm opened this issue · comments

http://static.springsource.org/spring-social/docs/1.1.x/api/org/springframework/social/oauth2/OAuth2Template.html

I get java.lang.NoSuchMethodError: org.springframework.social.google.connect.GoogleOAuth2Template.createAccessGrant(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/Map;)Lorg/springframework/social/oauth2/AccessGrant;

taken from an issue commented by matwojcik. I am also experiencing the same on the latest snapshot for spring-social 1.1.0.BUILD-SNAPSHOT

I was getting this error with spring-social version 1.1.0.M3 which is fairly new using 1.0.0.M2 of spring-social.google.

The current code in the repo actually works it just hasn't been pushed to maven. If you want to use it from your local m2 cache do this:

Add this to the build.gradle file after the other plugins:
apply plugin: 'maven'

Run: ./gradlew install
It will be placed in: /Users/username/.m2/repository/org/springframework/social/spring-social-google/1.0.0.BUILD-SNAPSHOT

Add to your pom:


org.springframework.social
spring-social-google
1.0.0.BUILD-SNAPSHOT

Worked fine with 1.1.0.M3, didn't try snapshots of spring-social.

It would be cool to have current version of spring-social-google in Maven repo, becuase I also have to compile a SNAPSHOT locally to be able to work with spring-social-1.0.0.M3.

Until it gets put into maven central or the spring repo my company has a snapshot built in our maven repo.

<!-- Spring Social Google-->
<dependency>
  <groupId>org.springframework.social</groupId>
  <artifactId>spring-social-google</artifactId>
  <version>1.0.0.BUILD-SNAPSHOT</version>
</dependency>

<repository>
  <id>sourceclearSnapshots</id>
  <url>https://maven.sourceclear.com/content/repositories/snapshots/</url>
</repository>

Great! Could you also make a release artifact? SNAPSHOT means Google connectivity code may change unpredictibly when I build a webapp, and that's a bit scary.

Since it's not my project I don't want to define a release.

Thank you! cl4r1ty. Hope you wont mind us using your repository in the meantime.
I will revert back to the master once a release has been defined.

Just released M3. Please use it with Spring Social 1.1.0.M4