It is difficult to say without look at your setting. Were you able to create the maven project successfully? Can you do following?
1. Send your pom.xml
2. Explode your project in the eclipse and send across a print screen..
3. Right click on your project in project explorer -> Maven -> Enable Dependency Management.
You can send these on my email ‘firstname.lastname@example.org’
No problem. You need to create a stand alone java maven project in your eclipse. This will generate a pom.xml for you. You can add in the dependencies in this post in pom. You will know the place where to add once you have a look.
Please follow the steps below.
1. Try to create a simple java project using steps in http://weblog4j.com/2014/06/23/create-a-simple-maven-java-project-in-eclipse-using-m2eclispe/
2. Open pom and add dependencies provided in this post in pom.xml.
3. Add the java code in src/main/java package.
4. Try running as “GoogleSearchClient ” as simple java application.
You can set the number of links returned to 1.
Comment out the next line which is used for paginating i.e
Now you have a list of one record which is the first record of the search. Just return resultList.get(0) instead of the list.
Hope this helps
Thanks for the kind comment. To return more than 10 result you need to use CSE List.setNum() method. Please have a look at the getSearchResult() method. Uncomment the second line and if you want 25 results per page then use
//num results per page
Please Note – Google puts a restriction of maximum 100 results per call. Hope this helps.
excelente tutorial! Como faço para retornar mais que 10 resultados?