Repository navigation
What's the best way for a total n00b to start with this library? #34
Description
Activity
When using maven one's artifact does not include/bundle all its dependencies.
There are various ways to deal with it but the most recommended way for someone that consumes
a maven artifact[s] is to make its code using maven (http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html) and adding gcloud-java as a dependency as such:<dependency> <groupId>com.google.gcloud</groupId> <artifactId>gcloud-java</artifactId> <version>0.0.3</version> </dependency>
For latest versions one could use: http://search.maven.org/#search%7Cga%7C1%7Cgcloud-java
If you want to run your code (not as a test via "mvn test") you have various options. here are some references:
http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/
http://mojo.codehaus.org/exec-maven-plugin/examples/example-exec-for-java-programs.htmlThere are other options such as using ant and ivy (http://ant.apache.org/ivy/history/2.2.0/tutorial/start.html) or using tools or various maven plugins to bundle all jars (latter is not recommended).
@jgeewax let me know what you want to do about this one?
Is there any value is having a "starter-project" template (not the expense report example -- but one that is just a blank template) ?
I think little value. All 3 main IDEs have an option for creating a "starter" maven project and an easy way to add dependencies. Yes, we could create a simple "hello gcloud java" simple project with maven, ant and gradle config files (already configured to pull gcloud-java) (we could also provide project configuration for all 3 main IDEs but I am not sure that is a great idea, especially when configuration may differ between IDEs versions) but I think one could also clone the "expense report" project (when available) and trim the unnecessary files. In any case, I don't object the idea (but not sure where exactly to put it - see: https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html -- as I don't think we need to create another gitHub project for it).
18 remaining items
- added a commit that references this issue
on Aug 25, 2022 - added 9 commits that reference this issue
on Sep 30, 2022 - added a commit that references this issue
on Feb 24, 2026 - added a commit that references this issue
on Mar 12, 2026 - added a commit that references this issue
on Jul 13, 2026
I'm having trouble getting a HelloDatastore project working. Hoping that you can help me get this going...
Here's what I did:
Here's the file I'm trying to run (HelloDatastore.java):
I can get it to compile just fine, then I run into problems running the class. Apparently I need Guava? And google-auth-library-java ? And google-api-java-client ?
What exactly is the best way to get this so that I can run...
java HelloDatastoreand I'll see some stuff happening.... ?(Sorry for the dumb question....)