更新时间:2022-10-15 14:05:38
So I finally have it working. I've posted the code in case it helps others, or perhaps to find better ways to do it.
The dependencies...
<!-- Embedded Google Client API JAR's -->
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>1.20.0</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<version>1.20.0</version>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client-java6</artifactId>
<version>1.20.0</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>1.20.0</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-gson</artifactId>
<version>1.20.0</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
<version>1.20.0</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-java6</artifactId>
<version>1.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.avalon-framework</artifactId>
<version>4.3.1_1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.jms</artifactId>
<version>3.2-b06</version>
</dependency>
the maven-bundle-plugin settings
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>com.r2i.michigan.lsa.services.osgi.Activator</Bundle-Activator>
<Embed-Dependency>
*;scope=compile|runtime,
</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
<Import-Package>
sun.misc;resolution:=optional,
com.sun.jdmk.comm;resolution:=optional,*
</Import-Package>
<Sling-Test-Regexp>.*Test</Sling-Test-Regexp>
</instructions>
</configuration>
</plugin>