Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven usage of google api
    text
    copied!<p>I'm using the google calendar java API for a project.</p> <p>The calendar part is fine, maven seems to download it and use it without any hassle.</p> <p>My problem comes from the main dependency of this lib: the com.google.api.client api.</p> <p>In particular, when I follow the instructions detailed at <a href="https://code.google.com/p/google-api-java-client/wiki/Setup#google-api-client" rel="noreferrer">this page</a>, maven can't compile my project properly:</p> <pre><code>package com.google.api.client.extensions.java6.auth.oauth2 does not exist package com.google.api.client.extensions.jetty.auth.oauth2 does not exist package com.google.api.client.json.jackson2 does not exist </code></pre> <p>It lacks several classes and thus can't compile the file while when I download the zip and add the .jar manually without using maven it works fine.</p> <p>It's the first project I manage with maven and don't know how to go from there. Pointers would be appreciated.</p> <p>edit post request --- here is my POM</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;fr.univnantes.atal.atcal&lt;/groupId&gt; &lt;artifactId&gt;AtCal&lt;/artifactId&gt; &lt;version&gt;0.1&lt;/version&gt; &lt;packaging&gt;jar&lt;/packaging&gt; &lt;name&gt;AtCal&lt;/name&gt; &lt;url&gt;http://maven.apache.org&lt;/url&gt; &lt;properties&gt; &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt; &lt;/properties&gt; &lt;repositories&gt; &lt;repository&gt; &lt;id&gt;google-api-services&lt;/id&gt; &lt;url&gt;http://google-api-client-libraries.appspot.com/mavenrepo&lt;/url&gt; &lt;/repository&gt; &lt;/repositories&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;junit&lt;/groupId&gt; &lt;artifactId&gt;junit&lt;/artifactId&gt; &lt;version&gt;3.8.1&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.api-client&lt;/groupId&gt; &lt;artifactId&gt;google-api-client&lt;/artifactId&gt; &lt;version&gt;1.12.0-beta&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.apis&lt;/groupId&gt; &lt;artifactId&gt;google-api-services-calendar&lt;/artifactId&gt; &lt;version&gt;v3-rev20-1.12.0-beta&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;pluginManagement&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;!-- best lock down version of the plugin too --&gt; &lt;configuration&gt; &lt;source&gt;1.5&lt;/source&gt; &lt;target&gt;1.5&lt;/target&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/pluginManagement&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>I basicly added two dependencies: calendar and api client. It was the mentionned step to get things working on the doc.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload