|
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
| 2 | +<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"> |
| 3 | + <modelVersion>4.0.0</modelVersion> |
| 4 | + |
| 5 | + <groupId>com.function.hosomi</groupId> |
| 6 | + <artifactId>azure-functions-java11</artifactId> |
| 7 | + <version>1.0-SNAPSHOT</version> |
| 8 | + <packaging>jar</packaging> |
| 9 | + |
| 10 | + <name>Azure Java Functions</name> |
| 11 | + |
| 12 | + <properties> |
| 13 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 14 | + <java.version>11</java.version> |
| 15 | + <azure.functions.maven.plugin.version>1.9.0</azure.functions.maven.plugin.version> |
| 16 | + <azure.functions.java.library.version>1.4.0</azure.functions.java.library.version> |
| 17 | + <functionAppName>azure-functions-java11</functionAppName> |
| 18 | + <stagingDirectory>${project.build.directory}/azure-functions/${functionAppName}</stagingDirectory> |
| 19 | + </properties> |
| 20 | + |
| 21 | + <dependencies> |
| 22 | + <dependency> |
| 23 | + <groupId>com.microsoft.azure.functions</groupId> |
| 24 | + <artifactId>azure-functions-java-library</artifactId> |
| 25 | + <version>${azure.functions.java.library.version}</version> |
| 26 | + </dependency> |
| 27 | + |
| 28 | + <!-- Test --> |
| 29 | + <dependency> |
| 30 | + <groupId>org.junit.jupiter</groupId> |
| 31 | + <artifactId>junit-jupiter</artifactId> |
| 32 | + <version>5.4.2</version> |
| 33 | + <scope>test</scope> |
| 34 | + </dependency> |
| 35 | + |
| 36 | + <dependency> |
| 37 | + <groupId>org.mockito</groupId> |
| 38 | + <artifactId>mockito-core</artifactId> |
| 39 | + <version>2.23.4</version> |
| 40 | + <scope>test</scope> |
| 41 | + </dependency> |
| 42 | + </dependencies> |
| 43 | + |
| 44 | + <build> |
| 45 | + <plugins> |
| 46 | + <plugin> |
| 47 | + <groupId>org.apache.maven.plugins</groupId> |
| 48 | + <artifactId>maven-compiler-plugin</artifactId> |
| 49 | + <version>3.8.1</version> |
| 50 | + <configuration> |
| 51 | + <source>${java.version}</source> |
| 52 | + <target>${java.version}</target> |
| 53 | + <encoding>${project.build.sourceEncoding}</encoding> |
| 54 | + </configuration> |
| 55 | + </plugin> |
| 56 | + <plugin> |
| 57 | + <groupId>com.microsoft.azure</groupId> |
| 58 | + <artifactId>azure-functions-maven-plugin</artifactId> |
| 59 | + <version>${azure.functions.maven.plugin.version}</version> |
| 60 | + <configuration> |
| 61 | + <!-- function app name --> |
| 62 | + <appName>${functionAppName}</appName> |
| 63 | + <!-- function app resource group --> |
| 64 | + <resourceGroup>java-functions-group</resourceGroup> |
| 65 | + <!-- function app service plan name --> |
| 66 | + <appServicePlanName>java-functions-app-service-plan</appServicePlanName> |
| 67 | + <!-- function app region--> |
| 68 | + <!-- refers https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Functions:-Configuration-Details#supported-regions for all valid values --> |
| 69 | + <region>japanwest</region> |
| 70 | + <!-- function pricingTier, default to be consumption if not specified --> |
| 71 | + <!-- refers https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Functions:-Configuration-Details#supported-pricing-tiers for all valid values --> |
| 72 | + <!-- <pricingTier></pricingTier> --> |
| 73 | + |
| 74 | + <!-- Whether to disable application insights, default is false --> |
| 75 | + <!-- refers https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Functions:-Configuration-Details for all valid configurations for application insights--> |
| 76 | + <!-- <disableAppInsights></disableAppInsights> --> |
| 77 | + <runtime> |
| 78 | + <!-- runtime os, could be windows, linux or docker--> |
| 79 | + <os>windows</os> |
| 80 | + <javaVersion>11</javaVersion> |
| 81 | + <!-- for docker function, please set the following parameters --> |
| 82 | + <!-- <image>[hub-user/]repo-name[:tag]</image> --> |
| 83 | + <!-- <serverId></serverId> --> |
| 84 | + <!-- <registryUrl></registryUrl> --> |
| 85 | + </runtime> |
| 86 | + <appSettings> |
| 87 | + <property> |
| 88 | + <name>FUNCTIONS_EXTENSION_VERSION</name> |
| 89 | + <value>~3</value> |
| 90 | + </property> |
| 91 | + </appSettings> |
| 92 | + </configuration> |
| 93 | + <executions> |
| 94 | + <execution> |
| 95 | + <id>package-functions</id> |
| 96 | + <goals> |
| 97 | + <goal>package</goal> |
| 98 | + </goals> |
| 99 | + </execution> |
| 100 | + </executions> |
| 101 | + </plugin> |
| 102 | + <plugin> |
| 103 | + <groupId>org.apache.maven.plugins</groupId> |
| 104 | + <artifactId>maven-resources-plugin</artifactId> |
| 105 | + <version>3.1.0</version> |
| 106 | + <executions> |
| 107 | + <execution> |
| 108 | + <id>copy-resources</id> |
| 109 | + <phase>package</phase> |
| 110 | + <goals> |
| 111 | + <goal>copy-resources</goal> |
| 112 | + </goals> |
| 113 | + <configuration> |
| 114 | + <overwrite>true</overwrite> |
| 115 | + <outputDirectory>${stagingDirectory}</outputDirectory> |
| 116 | + <resources> |
| 117 | + <resource> |
| 118 | + <directory>${project.basedir}</directory> |
| 119 | + <includes> |
| 120 | + <include>host.json</include> |
| 121 | + <include>local.settings.json</include> |
| 122 | + </includes> |
| 123 | + </resource> |
| 124 | + </resources> |
| 125 | + </configuration> |
| 126 | + </execution> |
| 127 | + </executions> |
| 128 | + </plugin> |
| 129 | + <plugin> |
| 130 | + <groupId>org.apache.maven.plugins</groupId> |
| 131 | + <artifactId>maven-dependency-plugin</artifactId> |
| 132 | + <version>3.1.1</version> |
| 133 | + <executions> |
| 134 | + <execution> |
| 135 | + <id>copy-dependencies</id> |
| 136 | + <phase>prepare-package</phase> |
| 137 | + <goals> |
| 138 | + <goal>copy-dependencies</goal> |
| 139 | + </goals> |
| 140 | + <configuration> |
| 141 | + <outputDirectory>${stagingDirectory}/lib</outputDirectory> |
| 142 | + <overWriteReleases>false</overWriteReleases> |
| 143 | + <overWriteSnapshots>false</overWriteSnapshots> |
| 144 | + <overWriteIfNewer>true</overWriteIfNewer> |
| 145 | + <includeScope>runtime</includeScope> |
| 146 | + <excludeArtifactIds>azure-functions-java-library</excludeArtifactIds> |
| 147 | + </configuration> |
| 148 | + </execution> |
| 149 | + </executions> |
| 150 | + </plugin> |
| 151 | + <!--Remove obj folder generated by .NET SDK in maven clean--> |
| 152 | + <plugin> |
| 153 | + <artifactId>maven-clean-plugin</artifactId> |
| 154 | + <version>3.1.0</version> |
| 155 | + <configuration> |
| 156 | + <filesets> |
| 157 | + <fileset> |
| 158 | + <directory>obj</directory> |
| 159 | + </fileset> |
| 160 | + </filesets> |
| 161 | + </configuration> |
| 162 | + </plugin> |
| 163 | + </plugins> |
| 164 | + </build> |
| 165 | +</project> |
0 commit comments