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

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

The newest version!
<?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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>\${groupId}</groupId>
  <artifactId>\${artifactId}</artifactId>
  <version>\${version}</version>

  <name>Generated project \${artifactId}</name>
  <description>Generated description for \${artifactId}</description>

  <properties>
    <quarkus.version>${version.io.quarkus}</quarkus.version>
    <automatiko.version>${project.version}</automatiko.version>
    <surefire.version>${version.surefire.plugin}</surefire.version>
    <compiler.version>${version.compiler.plugin}</compiler.version>

    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.source>11</maven.compiler.source>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <quarkus.package.type>uber-jar</quarkus.package.type>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.automatiko.quarkus</groupId>
        <artifactId>automatiko-quarkus-bom</artifactId>
        <version>\${automatiko.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>io.automatiko.quarkus</groupId>
      <artifactId>automatiko-function</artifactId>
    </dependency>

    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit5</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-maven-plugin</artifactId>
        <version>${quarkus.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>build</goal>
              <goal>generate-code</goal>
              <goal>generate-code-tests</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${version.surefire.plugin}</version>
        <configuration>
          <systemProperties>
            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
            <maven.home>\${maven.home}</maven.home>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!-- azure functions support -->
    <profile>
      <id>azure</id>
      <activation>
        <property>
          <name>azure</name>
        </property>
      </activation>
      
      <properties>
        <azure.functions.maven.plugin.version>1.9.1</azure.functions.maven.plugin.version>
        <functionAppName>\${project.artifactId}</functionAppName>
        <functionAppRegion>westus</functionAppRegion>
        <functionResourceGroup>my-resource-group</functionResourceGroup>
        <!-- function should match workflow definition id -->
        <function>\${project.artifactId}</function>
        <stagingDirectory>\${project.build.directory}/azure-functions/\${functionAppName}</stagingDirectory>
        <quarkus.package.type>uber-jar</quarkus.package.type>
      </properties>
      
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-azure-functions-http</artifactId>
        </dependency>
      </dependencies>
      
      <build>
        <plugins>
          <plugin>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-functions-maven-plugin</artifactId>
            <version>\${azure.functions.maven.plugin.version}</version>
            <configuration>
              <resourceGroup>\${functionResourceGroup}</resourceGroup>
              <appName>\${functionAppName}</appName>
              <region>\${functionAppRegion}</region>
              <runtime>
                <!-- runtime os, could be windows, linux or docker-->
                <os>windows</os>
                <javaVersion>11</javaVersion>
                <!-- for docker function, please set the following parameters -->
                <!-- <image>[hub-user/]repo-name[:tag]</image> -->
                <!-- <serverId></serverId> -->
                <!-- <registryUrl></registryUrl>  -->
              </runtime>
              <appSettings>
                <property>
                  <name>FUNCTIONS_EXTENSION_VERSION</name>
                  <value>~3</value>
                </property>
              </appSettings>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <!-- add azure required json files
                   to Azure staging directory -->
              <execution>
                <id>copy-base-azure-config</id>
                <phase>package</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <overwrite>true</overwrite>
                  <outputDirectory>\${stagingDirectory}</outputDirectory>
                  <resources>
                    <resource>
                      <directory>\${project.basedir}/azure-config</directory>
                      <includes>
                        <include>host.json</include>
                        <include>local.settings.json</include>
                      </includes>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <!-- copy unpacked function.json into Azure staging directory -->
              <execution>
                <id>copy-function-json</id>
                <phase>package</phase>
                <goals>
                  <goal>copy-resources</goal>
                </goals>
                <configuration>
                  <overwrite>true</overwrite>
                  <outputDirectory>\${stagingDirectory}/\${function}</outputDirectory>
                  <resources>
                    <resource>
                      <directory>\${project.basedir}/azure-config</directory>
                      <filtering>true</filtering>
                      <includes>
                        <include>function.json</include>
                      </includes>
                    </resource>
                  </resources>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <!-- azure plugin wants a specific name for the jar so need to copy runner jar and rename it -->
          <plugin>
            <groupId>com.coderplus.maven.plugins</groupId>
            <artifactId>copy-rename-maven-plugin</artifactId>
            <version>1.0.1</version>
            <executions>
              <execution>
                <id>rename-file</id>
                <phase>package</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <sourceFile>\${project.build.directory}/\${project.artifactId}-\${project.version}-runner.jar</sourceFile>
                  <destinationFile>\${stagingDirectory}/\${project.artifactId}-\${project.version}.jar</destinationFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- Amazon Lambda functions support -->
    <profile>
      <id>aws-lambda</id>
      <activation>
        <property>
          <name>aws-lambda</name>
        </property>
      </activation>    
      
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-amazon-lambda-http</artifactId>
        </dependency>
      </dependencies>      
    </profile>  
    
    <!-- Google Cloud functions support -->
    <profile>
      <id>gcp</id>
      <activation>
        <property>
          <name>gcp</name>
        </property>
      </activation>    
      
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-google-cloud-functions-http</artifactId>
        </dependency>
      </dependencies>      
    </profile>      
  
    <profile>
      <id>native</id>
      <activation>
        <property>
          <name>native</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${version.surefire.plugin}</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <native.image.path>\${project.build.directory}/\${project.build.finalName}-runner</native.image.path>
                    <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                    <maven.home>\${maven.home}</maven.home>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <quarkus.package.type>native</quarkus.package.type>
        <quarkus.native.additional-build-args>--report-unsupported-elements-at-runtime</quarkus.native.additional-build-args>
      </properties>
    </profile>
    <profile>
      <id>container</id>
      <activation>
        <property>
          <name>container</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-container-image-jib</artifactId>
        </dependency>
      </dependencies>
      <properties>
        <quarkus.container-image.build>true</quarkus.container-image.build>
      </properties>
    </profile>
    <profile>
      <id>container-native</id>
      <activation>
        <property>
          <name>container-native</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-container-image-jib</artifactId>
        </dependency>
      </dependencies>
        <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.22.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <native.image.path>\${project.build.directory}/\${project.build.finalName}-runner</native.image.path>
                    <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                    <maven.home>\${maven.home}</maven.home>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <quarkus.package.type>native</quarkus.package.type>
        <quarkus.native.additional-build-args>--report-unsupported-elements-at-runtime</quarkus.native.additional-build-args>
        <quarkus.native.container-build>true</quarkus.native.container-build>
        <quarkus.container-image.build>true</quarkus.container-image.build>
        <quarkus.container-image.insecure>true</quarkus.container-image.insecure>
      </properties>
    </profile>
    <profile>
      <id>kubernetes</id>
      <activation>
        <property>
          <name>kubernetes</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-kubernetes</artifactId>
        </dependency>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-container-image-jib</artifactId>
        </dependency>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-smallrye-health</artifactId>
        </dependency>
      </dependencies>
      <properties>
        <quarkus.container-image.build>true</quarkus.container-image.build>
        <quarkus.kubernetes.image-pull-policy>IfNotPresent</quarkus.kubernetes.image-pull-policy>
      </properties>
    </profile>
    <profile>
      <id>kubernetes-native</id>
      <activation>
        <property>
          <name>kubernetes-native</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-kubernetes</artifactId>
        </dependency>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-container-image-jib</artifactId>
        </dependency>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-smallrye-health</artifactId>
        </dependency>
      </dependencies>
        <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.22.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <native.image.path>\${project.build.directory}/\${project.build.finalName}-runner</native.image.path>
                    <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                    <maven.home>\${maven.home}</maven.home>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <quarkus.package.type>native</quarkus.package.type>
        <quarkus.native.additional-build-args>--report-unsupported-elements-at-runtime</quarkus.native.additional-build-args>
        <quarkus.native.container-build>true</quarkus.native.container-build>
        <quarkus.container-image.build>true</quarkus.container-image.build>
        <quarkus.container-image.insecure>true</quarkus.container-image.insecure>
        <quarkus.kubernetes.image-pull-policy>IfNotPresent</quarkus.kubernetes.image-pull-policy>
      </properties>
    </profile>    
  </profiles>

</project>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy