interface-protoc-plugin-test
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>no.entur</groupId>
<artifactId>interface-protoc-plugin-test</artifactId>
<version>1.18</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>interface-protoc-plugin-parent</artifactId>
<groupId>no.entur</groupId>
<version>1.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>interface-protoc-plugin-test</artifactId>
<version>1.18</version>
<properties>
<generated.interface.directory>${project.build.directory}/generated-sources/proto-interfaces
</generated.interface.directory>
</properties>
<profiles>
<profile>
<id>release</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.interface.directory}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<java>
<eclipse>
<file>../codestyle/jdt_codestyle.xml</file>
<version>4.9.0</version>
</eclipse>
<removeUnusedImports/>
<importOrder>
<file>../codestyle/jdt.importorder</file>
</importOrder>
</java>
</configuration>
</plugin>
<!-- TODO protobuf-maven-plugin fails to create the necessary protoc-plugins dir. fix plugin. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>protocDir</id>
<phase>generate-sources</phase>
<configuration>
<target>
<mkdir dir="${project.build.directory}/protoc-plugins"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>dev.cookiecode</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>${protobuf-maven-plugin.version}</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${proto.version}:exe:${os.detected.classifier}
</protocArtifact>
<protoSourceRoot>${project.resources[0].directory}/proto</protoSourceRoot>
<attachProtoSources>false</attachProtoSources>
</configuration>
<executions>
<execution>
<id>generate-interfaces</id>
<goals>
<goal>compile-custom</goal>
</goals>
<configuration>
<pluginId>generate-interfaces</pluginId>
<pluginArtifact>
no.entur:interface-protoc-plugin:${project.version}:exe:${os.detected.classifier}
</pluginArtifact>
<pluginParameter>-generate-interfaces -target=${generated.interface.directory}
</pluginParameter>
</configuration>
</execution>
<execution>
<id>protoc-with-implement-interfaces</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<protocPlugins>
<protocPlugin>
<id>add-interfaces</id>
<groupId>${groupId}</groupId>
<artifactId>interface-protoc-plugin</artifactId>
<version>${project.version}</version>
<mainClass>no.entur.protoc.interfaces.InterfaceProtocPlugin</mainClass>
<args>-implement-interfaces</args>
</protocPlugin>
</protocPlugins>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.4</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>