Post

1 follower Follow
0
Avatar

Java API build problems

|

I cannot seem to get the Maven Java Podio Client to build, my biggest issue is that I don't know anything at all about Maven projects. All I want to do is create the podio jar file with all of the dependencies in it. Is the Maven project setup to do that and if so, how do I get there?

Thanks

|

Bryan Bible Answered

Please sign in to leave a comment.

2 comments

0
Avatar

If you use Eclipse, try following these steps:

  1. Create a new Maven project (make sure you have Maven integration installed)
  2. Double-click pom.xml and go to the Dependencies tab
  3. Click the Add button in the Dependencies list to the left
  4. Enter "podio" in the search field and select the newest version of com.podio.api (currently 0.7.3)
  5. Click OK and rebuild the project

Here's a sample on how to authenticate with username/password auth (this auth method is only recommended for testing, not for production use):

String clientId = "[your client id]";

String clientSecret = "[your client secret]";

String username = "[your login email]";

String password = "[your login password]";
ResourceFactory resourceFactory = new ResourceFactory(

new OAuthClientCredentials(clientId, clientSecret),

new OAuthUsernameCredentials(username, password));
APIFactory apiFactory = new APIFactory(resourceFactory);

ItemAPI itemAPI = apiFactory.getAPI(ItemAPI.class);

Casper Fabricius 0 votes
Comment actions Permalink
0
Avatar

Thanks for the pointers!!

So after I follow these instructions and get to step 5, what is the proper way to rebuild the project? If I select the project in Eclipse and right click ->Run As->Maven Build, then I am presented with a form which wants me to enter 'Goals' or 'Profiles'. What is the best option to enter here to get a jar file that contains the API and the dependencies?

 

Thanks

Bryan Bible 0 votes
Comment actions Permalink