VMware {code} Community
jbweber2
Enthusiast
Enthusiast

vso.xml generation

I'm having an issue with vso.xml generation in a plugin I'm developing against the new 5.5.1 SDK.


In my pom file I've included the following, which to my understanding lets me link against dependencies in the vCO platform.


<dependency>

  <groupId>com.vmware.o11n</groupId>

  <artifactId>o11n-provided-deps</artifactId>

  <type>pom</type>

  <scope>provided</scope>

</dependency>

I've created a simple java class which looks like the following https://gist.github.com/jbweber/06c0a319af559cd44a5e

With this configuration I get a build failure because the scope for provided deps is provided and Jackson isn't loaded on the class path when the maven plugin runs.

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.648s
[INFO] Finished at: Wed May 07 22:28:48 EDT 2014
[INFO] Final Memory: 24M/308M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vmware.o11n:o11n-vso-generator:5.5.1:vso (Generate vso) on project o11nplugin-toolbox
: Execution Generate vso of goal com.vmware.o11n:o11n-vso-generator:5.5.1:vso failed: A required class was missing while
 executing com.vmware.o11n:o11n-vso-generator:5.5.1:vso: Lorg/codehaus/jackson/map/ObjectMapper;
[ERROR] -----------------------------------------------------

I can solve this two ways:

1) Explicitly define Jackson as a dependency which then includes the jars in my dar file.

2) Create a decorator for my static helper class which contains the VSO annotations, and calls through to the other class behind it.

With #2 since the plugin doesn't need to parse and validate the import of ObjectMapper the build does not fail.

What is the correct way to solve this problem?

0 Kudos
0 Replies