All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.pom.xml Maven / Gradle / Ivy

<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>
    <!-- Generated by %PROJECT_GROUP_ID%:%PROJECT_ARTIFACT_ID%:%PROJECT_VERSION% -->
    <!--============================================================================================================-->
    <!-- CAN COMMENT THIS LINE AND UNCOMMENT IN dependencyManagement - ATTENTION WILL HAVE TO COPY pluginManagement -->
    <!--============================================================================================================-->
    <parent>
        <groupId>com.github.frtu.archetype</groupId>
        <artifactId>kotlin-extended-pom</artifactId>
        <version>${base-pom-version}</version>
    </parent>

    <groupId>${groupId}</groupId>
    <artifactId>${artifactId}</artifactId>
    <version>${version}</version>

    <properties>
        <start-class>${groupId}.MainKt</start-class>
        <!--===========================-->
        <java.version>${java-version}</java.version>
        <!--===========================-->
        <!--https://kotlinlang.org/docs/reference/using-maven.html-->
        <kotlin.version>${kotlin-version}</kotlin.version>
        <kotlinx.coroutines.version>${kotlinx-version}</kotlinx.coroutines.version>
        <kotlin.test.version>${kotlin-test-version}</kotlin.test.version>
        <!--CHECK FOR COMPILER PROPS : https://kotlinlang.org/docs/reference/using-maven.html#attributes-common-for-jvm-and-js-->
        <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
        <!--===========================-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!--===========================-->
        <protobuf.source.dir>${project.basedir}/src/main/proto/</protobuf.source.dir>
        <!--===========================-->
        <!-- the version is the lower of the ones found in these two links
        (they should always be synced, but double checking is better than being stuck on an error):
        https://search.maven.org/search?q=a:protoc-gen-grpc-kotlin
        https://search.maven.org/search?q=a:grpc-kotlin-stub -->
        <grpc.kotlin.version>1.3.0</grpc.kotlin.version> <!-- 2022-05-28 -->
        <!-- The version is the latest found here: https://search.maven.org/artifact/io.grpc/grpc-protobuf -->
        <java.grpc.version>1.53.0</java.grpc.version> <!-- 2022-04-26 -->
        <!-- the version is the latest found here: https://search.maven.org/search?q=a:protobuf-kotlin -->
        <protobuf.version>3.21.7</protobuf.version> <!-- 2022-05-28 -->
        <protoc.version>${protobuf.version}</protoc.version>
    </properties>

    <dependencies>
        <!-- https://github.com/grpc/grpc-kotlin/blob/master/compiler/README.md -->
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java-util</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-kotlin</artifactId>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-kotlin-stub</artifactId>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
        </dependency>

        <!--===========================-->
        <!--Test -->
        <!--===========================-->
        <!-- https://kotest.io/docs/quickstart -->
        <dependency>
            <groupId>io.kotlintest</groupId>
            <artifactId>kotlintest-runner-junit5</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- https://mockk.io/ -->
        <dependency>
            <groupId>io.mockk</groupId>
            <artifactId>mockk</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- https://assertj.github.io/doc/ -->
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Downgrade to junit 5.4.x version to avoid - No test found -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>

        <!--===========================-->
        <!-- Platform - Log -->
        <!--===========================-->
        <dependency>
            <groupId>com.github.frtu.logs</groupId>
            <artifactId>logger-core</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.frtu.libs</groupId>
            <artifactId>lib-utils</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <!-- Include core protos in the bundle as resources -->
        <resources>
            <resource>
                <directory>${protobuf.source.dir}</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.7.0</version>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>detect</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <executions>
                    <execution>
                        <id>generate-add-proto</id>
                        <phase>generate-proto</phase>
                        <goals>
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                        <configuration>
                            <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
                            <pluginId>grpc-java</pluginId>
                            <pluginArtifact>io.grpc:protoc-gen-grpc-java:${java.grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
                            <protocPlugins>
                                <protocPlugin>
                                    <id>grpc-kotlin</id>
                                    <groupId>io.grpc</groupId>
                                    <artifactId>protoc-gen-grpc-kotlin</artifactId>
                                    <version>${grpc.kotlin.version}</version>
                                    <classifier>jdk7</classifier>
                                    <mainClass>io.grpc.kotlin.generator.GeneratorRunner</mainClass>
                                </protocPlugin>
                            </protocPlugins>
                        </configuration>
                    </execution>
                    <execution>
                        <id>compile-kt</id>
                        <goals>
                            <goal>compile-custom</goal>
                        </goals>
                        <configuration>
                            <protocArtifact>
                                com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
                            </protocArtifact>
                            <outputDirectory>${project.build.directory}/generated-sources/protobuf/kotlin
                            </outputDirectory>
                            <pluginId>kotlin</pluginId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.9</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${basedir}/target/generated-sources/</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-bom</artifactId>
                <version>${protobuf.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.google.protobuf</groupId>
                <artifactId>protobuf-kotlin</artifactId>
                <version>${protobuf.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-kotlin-stub</artifactId>
                <version>${grpc.kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-protobuf</artifactId>
                <version>${java.grpc.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy