Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Since we still want Java POJOs to represent all entities, we will use the schema-to-pojo-maven-plugin to build these POJOs. This is done by simply added the following to the lib-auto-generated/pom.xml file:

Code Block
<\!-\- This plugin builds the POJOs from JSON schemas. \-->
<plugins>
<plugin>
	<groupId>org.sagebionetworks</groupId>
	<artifactId>schema-to-pojo-maven-plugin</artifactId>
	<version>${schema-to-pojo.version}</version>
	<executions>
		<execution>
			<goals>
				<goal>generate</goal>
			</goals>
			<configuration>
				<sourceDirectory>src/main/resources</sourceDirectory>
				<packageName>org.sagebionetworks</packageName>
				<outputDirectory>target/auto-generated-pojos</outputDirectory>
			</configuration>
		</execution>
	</executions>
</plugin>
</plugins>

The plugin will automatically create a POJOs class for each JSON schema found in the resource directory. These POJOs will be placed in the target/auto-generated-pojos directory.

...