Hm, I wanted to run without maven, because that is not installed on the 
machine my program will be running on...

But never mind, I'll run it in a way that it does work, even though I'm not 
sure why some things do and some don't work.

I have a different problem now, with getting the campaigns for a MCC 
account. Posting that as a separate issue..


Op woensdag 5 maart 2014 00:28:08 UTC+1 schreef Ray Tsang (AdWords API 
Team):
>
> Frank,
>
> Please see if Maven's exec 
> plugin<http://mojo.codehaus.org/exec-maven-plugin/usage.html>works for you:
>
> mvn exec:java 
> -Dexec.mainClass="adwords.axis.v201309.basicoperations.GetCampaigns"
>
> Please make sure you have ads.properties file in your home directory or 
> the classpath.
>
> Thanks,
>
> Ray
>
>
> On Tuesday, March 4, 2014 9:35:17 AM UTC-5, Frank Tolsma wrote:
>>
>> Migrating from ClientLogin to OAuth2, I thought it a good idea to start 
>> using Maven, as suggested.
>> I can run the examples (like GetCampaigns) from within Netbeans, by doing 
>> a (right mouse menu): Run File.
>>
>> But I have to run this from another machine as well, that does not have 
>> Netbeans and Maven installed.
>> So my question is: how do I run the examples from the command line? 
>>
>> Maven is a bit... overwhelming to me... 
>> What i have tried and what works is:
>> - the pom.xml that comes with the examples now contains (a.o.): (not sure 
>> how it got in there)
>>
>>   <properties>
>>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>     
>> <smokeMainClass>adwords.axis.v201309.basicoperations.GetCampaigns</smokeMainClass>
>>   </properties>
>>
>> and:
>>
>>   <profiles>
>>     <profile>
>>       <id>smoketest</id>
>>       <properties>
>>         <exec.mainClass>${smokeMainClass}</exec.mainClass>
>>       </properties>
>>     </profile>
>>   </profiles>
>>
>> When I do a Run Maven with 'install' as its goal, a couple of jars are 
>> generated:
>> - singlejar.jar (big: 13.5 Mb)
>> - adwords-axis-examples-1.24.0-shaded.jar (big: 13.5 Mb)
>> - adwords-axis-examples-1.24.0.jar (small: 330 kb)
>>
>> I can run those from a dos-box, like:
>> java -jar singlejar.jar      -- that works
>> java -jar adwords-axis-examples-1.24.0-shaded.jar      -- that works
>> java -jar adwords-axis-examples-1.24.0.jar       -- gives me an error: 
>> 'no main manifest attribute, in adwords-axis-examples-1.24.0.jar'
>>
>> Not sure why 3 jars and why the small one does not work.
>>
>> But this is all a bit too much trial and error to my liking. Like I'm not 
>> quite sure what I'm doing...
>> So... is this the way to go? 
>> I would rather use a 'best practice', but I'm not sure what that would 
>> be...
>>
>> Maybe this is a bit too general for the Adwords API forum? But I'm not 
>> sure where else to post it...
>> Any pointers as to how this can best be done? That is: create an easily 
>> distributable something that can be run from the command line...
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to