apitomy-data-models
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>io.apitomy</groupId>
<artifactId>apitomy-data-models</artifactId>
<version>3.1.0</version>
</dependency><project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.apitomy</groupId>
<artifactId>apitomy-data-models-parent</artifactId>
<version>3.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>apitomy-data-models</artifactId>
<packaging>bundle</packaging>
<name>apitomy-data-models</name>
<url>https://www.apicur.io/</url>
<description>Open Source API Design Studio</description>
<repositories>
<!-- use project local repo to get maven artifacts previously hosted on disconnected jsweet repo (https://github.com/cincheo/jsweet/issues/780) -->
<repository>
<id>local-repo</id>
<url>file:${basedir}/dependencies</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local-repo</id>
<url>file:${basedir}/dependencies</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<!-- Third Party Deps -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${version.com.fasterxml.jackson}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${version.com.fasterxml.jackson}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${version.commons-lang3}</version>
</dependency>
<!-- JSweet -->
<dependency>
<groupId>org.jsweet</groupId>
<artifactId>jsweet-core</artifactId>
<version>${version.org.jsweet-core}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jsweet</groupId>
<artifactId>jsweet-transpiler</artifactId>
<version>${version.org.jsweet-transpiler}</version>
<scope>provided</scope>
</dependency>
<!-- Test Only Deps -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${version.junit}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${version.commons-io}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>${version.org.skyscreamer}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>${version.org.eclipse.m2e.lifecycle-mapping}</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.jsweet
</groupId>
<artifactId>
jsweet-maven-plugin
</artifactId>
<versionRange>
[1.0.0,)
</versionRange>
<goals>
<goal>jsweet</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>io.apitomy</groupId>
<artifactId>apitomy-unified-model-generator-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<specifications>
<specification>${project.basedir}/src/main/resources/specs/openapi.yaml</specification>
<specification>${project.basedir}/src/main/resources/specs/asyncapi.yaml</specification>
<specification>${project.basedir}/src/main/resources/specs/openrpc.yaml</specification>
<specification>${project.basedir}/src/main/resources/specs/json-schema.yaml</specification>
</specifications>
<testSubDir>fixtures</testSubDir>
<rootNamespace>io.apitomy.datamodels.models</rootNamespace>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${version.org.apache.felix.maven-bundle-plugin}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>versions</id>
<phase>validate</phase>
<goals>
<goal>cleanVersions</goal>
</goals>
<configuration>
<versions>
<apitomy.osgi.version.clean>${project.version}</apitomy.osgi.version.clean>
</versions>
</configuration>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Import-Package>
com.fasterxml.jackson*;resolution:=optional;version="[2.9,3)"
</Import-Package>
<Export-Package>
io.apitomy.datamodels*
</Export-Package>
</instructions>
<niceManifest>true</niceManifest>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>add-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/umg</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-resources</id>
<phase>generate-test-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${project.build.directory}/generated-test-resources/umg</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>transpilation</id>
<build>
<plugins>
<!-- Generate TS from Java using JSweet -->
<plugin>
<groupId>io.apicurio</groupId>
<artifactId>jsweet-maven-plugin</artifactId>
<version>${version.jsweet-maven-plugin}</version>
<configuration>
<verbose>true</verbose>
<tsOut>target/ts/src</tsOut>
<targetVersion>ES6</targetVersion>
<module>umd</module>
<moduleResolution>classic</moduleResolution>
<tsOnly>true</tsOnly>
<allowedDependencyScopes>
<allowedDependencyScope>compile</allowedDependencyScope>
<allowedDependencyScope>provided</allowedDependencyScope>
</allowedDependencyScopes>
<excludes>
<exclude>**/_*/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>generate-js</id>
<phase>generate-sources</phase>
<goals>
<goal>jsweet</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Copy some curated TS sources and resources to target/ts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${version.maven-resources-plugin}</version>
<executions>
<!-- Copy TS env from src into target -->
<execution>
<id>copy-ts</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/ts</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${basedir}/src/main/ts</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<!-- Copy test fixtures into ts env -->
<execution>
<id>copy-fixtures</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/ts/tests/fixtures</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${basedir}/src/test/resources/fixtures</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Generate the core.ts file using GenerateCoreTs -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${version.org.codehaus.mojo.exec-maven-plugin}</version>
<executions>
<execution>
<id>generate-corets</id>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>io.apitomy.datamodels._build.GenerateCoreTs</mainClass>
<arguments>
<argument>${basedir}/target/ts/src</argument>
</arguments>
</configuration>
</plugin>
<!-- Build the TS into a library bundle -->
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${version.com.github.eirslett.frontend-maven-plugin}</version>
<executions>
<!-- Install Node -->
<execution>
<id>install node</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<workingDirectory>${basedir}/target/ts</workingDirectory>
<nodeVersion>v${version.node-js}</nodeVersion>
</configuration>
</execution>
<!-- Install npm dependencies -->
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<workingDirectory>${basedir}/target/ts</workingDirectory>
<arguments>install</arguments>
</configuration>
</execution>
<!-- Build+package the library -->
<execution>
<id>npm test</id>
<goals>
<goal>npm</goal>
</goals>
<phase>test</phase>
<configuration>
<workingDirectory>${basedir}/target/ts</workingDirectory>
<arguments>run test</arguments>
</configuration>
</execution>
<!-- Build+package the library -->
<execution>
<id>npm build</id>
<goals>
<goal>npm</goal>
</goals>
<phase>package</phase>
<configuration>
<workingDirectory>${basedir}/target/ts</workingDirectory>
<arguments>run package</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>