I had the same problem and I figured out how to arrange a solution.
, Maven .
<project_root_path>
, .
maven, maven-assembly-plugin <project_root_path>/pom.xml
<build><plugins>...</plugins></build>
:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<outputDirectory>${project.build.directory}/azure-functions/${functionAppName}</outputDirectory>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive />
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
Azure Function mvn clean compile package
jar <project_root_path>/target/<project_name>.jar
, , <dependencies></dependencies>
pom.xml.
1: pom.xml, <project_name>
<artifactId>_<version>.jar
.
2: <appendAssemblyId>false</appendAssemblyId>
, <project_name>
<artifactId>_<version>-<descriptorRef>.jar
. .
, <project_root_path>/target/<project_name>.jar
, <project_root_path>/target/azure-functions/<azure_function_name>/
, <azure_function_name>
- , , .
Azure Maven:
- Azure :
mvn azure-functions:run
- Azure :
mvn azure-functions:deploy
, maven-assembly-plugin, , Azure Maven /. , , Maven.
, .
Ciao
IP
(17/11/17)
<outputDirectory>${project.build.directory}/azure-functions/${functionAppName}</outputDirectory>
<configuration>
POM <goal>
, Maven JAR Azure. mvn azure-functions:run
mvn azure-functions:deploy
JAR, . .
POM .
(21/11/17)
Maven Shade Plugin Maven Assembly Plugin, XML :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<outputFile>${project.build.directory}/azure-functions/${functionAppName}/${project.artifactId}-${project.version}.jar</outputFile>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
Maven, .