File tree Expand file tree Collapse file tree 6 files changed +49
-19
lines changed
event-function/fc-event-java8
http-function/fc-http-java8 Expand file tree Collapse file tree 6 files changed +49
-19
lines changed Original file line number Diff line number Diff line change 11Type : Application
22Name : start-fc-event-java8
3- Version : 1.1.10
3+ Version : 1.1.11
44Provider :
55 - 阿里云
66Description : 快速部署一个 Java 8 的 Event 类型的 Hello World 函数到阿里云函数计算。
Original file line number Diff line number Diff line change 1- <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi = " http://www.w3.org/2001/XMLSchema-instance "
2- xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
1+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
2+ xmlns : xsi = " http://www.w3.org/2001/XMLSchema-instance " xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
33 <modelVersion >4.0.0</modelVersion >
44 <groupId >example</groupId >
5- <artifactId >ServerlessToolProject </artifactId >
5+ <artifactId >HelloFCJava </artifactId >
66 <packaging >jar</packaging >
77 <version >1.0-SNAPSHOT</version >
8- <name >ServerlessToolProject </name >
8+ <name >HelloFCJava </name >
99
1010 <dependencies >
1111 <dependency >
2121 </dependency >
2222 </dependencies >
2323
24+ <build >
25+ <plugins >
26+ <plugin >
27+ <artifactId >maven-assembly-plugin</artifactId >
28+ <configuration >
29+ <descriptorRefs >
30+ <descriptorRef >jar-with-dependencies</descriptorRef >
31+ </descriptorRefs >
32+ </configuration >
33+ <executions >
34+ <execution >
35+ <id >make-my-jar-with-dependencies</id >
36+ <phase >package</phase >
37+ <goals >
38+ <goal >single</goal >
39+ </goals >
40+ </execution >
41+ </executions >
42+ </plugin >
43+ </plugins >
44+ </build >
45+
2446 <properties >
2547 <maven .compiler.target>1.8</maven .compiler.target>
2648 <maven .compiler.source>1.8</maven .compiler.source>
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ services:
2525 component : fc
2626 actions : # 自定义执行逻辑
2727 pre-deploy : # 在deploy之前运行
28- - run : s build # 要运行的命令行
28+ - run : mvn package # 要运行的命令行
2929 path : ./ # 命令行运行的路径
3030# post-deploy: # 在deploy之后运行
3131# - run: s versions # 要运行的命令行
@@ -37,7 +37,7 @@ services:
3737 name : event-java8
3838 description : ' hello world by serverless devs'
3939 runtime : java8
40- codeUri : ./
40+ codeUri : ./target
4141 # ossBucket:
4242 # ossKey: # conflict with codeUri
4343 handler : example.App::handleRequest
Original file line number Diff line number Diff line change 11Type : Application
22Name : start-fc-http-java8
3- Version : 1.1.10
3+ Version : 1.1.11
44Provider :
55 - 阿里云
66Description : 快速部署一个 Java 8 的 HTTP 类型的 Hello World 函数到阿里云函数计算。
Original file line number Diff line number Diff line change 1- <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi = " http://www.w3.org/2001/XMLSchema-instance "
2- xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
1+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
2+ xmlns : xsi = " http://www.w3.org/2001/XMLSchema-instance " xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
33 <modelVersion >4.0.0</modelVersion >
44 <groupId >example</groupId >
5- <artifactId >ServerlessToolProject </artifactId >
5+ <artifactId >HelloFCJava </artifactId >
66 <packaging >jar</packaging >
77 <version >1.0-SNAPSHOT</version >
8- <name >ServerlessToolProject </name >
8+ <name >HelloFCJava </name >
99
1010 <dependencies >
1111 <dependency >
2424 <build >
2525 <plugins >
2626 <plugin >
27- <groupId >org.apache.maven.plugins</groupId >
28- <artifactId >maven-compiler-plugin</artifactId >
29- <version >3.6.1</version >
27+ <artifactId >maven-assembly-plugin</artifactId >
3028 <configuration >
31- <source >1.8</source >
32- <target >1.8</target >
29+ <descriptorRefs >
30+ <descriptorRef >jar-with-dependencies</descriptorRef >
31+ </descriptorRefs >
3332 </configuration >
33+ <executions >
34+ <execution >
35+ <id >make-my-jar-with-dependencies</id >
36+ <phase >package</phase >
37+ <goals >
38+ <goal >single</goal >
39+ </goals >
40+ </execution >
41+ </executions >
3442 </plugin >
3543 </plugins >
3644 </build >
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ services:
2525 component : fc
2626 actions : # 自定义执行逻辑
2727 pre-deploy : # 在deploy之前运行
28- - run : s build # 要运行的命令行
28+ - run : mvn package # 要运行的命令行
2929 path : ./ # 命令行运行的路径
3030# post-deploy: # 在deploy之后运行
3131# - run: s versions # 要运行的命令行
@@ -37,7 +37,7 @@ services:
3737 name : http-trigger-java8
3838 description : ' hello world by serverless devs'
3939 runtime : java8
40- codeUri : ./
40+ codeUri : ./target
4141 # ossBucket:
4242 # ossKey: # conflict with codeUri
4343 handler : example.App::handleRequest
You can’t perform that action at this time.
0 commit comments