maven

1 简介

Maven 是一个项目管理工具,可以对 Java 项目进行构建、依赖管理。

2 安装配置

https://blog.csdn.net/qq_19734597/article/details/120996418

https://blog.csdn.net/weixin_34234829/article/details/89686175

https://blog.csdn.net/idomyway/article/details/81974677

1 更换镜像

conf/settings.xml

https://www.cnblogs.com/digdeep/p/5026066.html

https://blog.csdn.net/qq_42931492/article/details/107283590

2 网络配置

conf/settings.xml

https://blog.csdn.net/zongf0504/article/details/88797831

3 问题

(org.apache.maven.wagon.providers.http.httpclient.NoHttpResponseException) caught when processing request to {}->http://XXXXXX->http://maven.aliyun.com:80: The target server failed to respond

3 管理包

https://blog.51cto.com/u_15119353/3303815

1 设置setting.xml

2 编写pom

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.12</artifactId>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka-0.11_2.12</artifactId>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.bahir</groupId>
<artifactId>flink-connector-redis_2.11</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-elasticsearch6_2.12</artifactId>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.44</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-statebackend-rocksdb_2.12</artifactId>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_2.12</artifactId>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner-blink_2.12</artifactId>
<version>1.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-csv</artifactId>
<version>1.10.1</version>
</dependency>

</dependencies>

3 生成本地包的repository

默认位置在/user/.m2/repository,在setting可以修改

4 环境使用本地repository

https://blog.csdn.net/weixin_42476601/article/details/87884514

4 问题

1.com/atguigu/gmall/hive/udtf/ExplodeJSONArray has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

解决:两边jdk版本对齐就好

打包时候注意要:maven clean,maven compile

class file versions对应jdk版本:

1
2
3
4
5
6
7
8
9
10
49 = Java 5
50 = Java 6
51 = Java 7
52 = Java 8
53 = Java 9
54 = Java 10
55 = Java 11
56 = Java 12
57 = Java 13
58 = Java 14

2.Unknown host maven.aliyun.com

Author

Lavine Hu

Posted on

2022-03-06

Updated on

2022-04-30

Licensed under

# Related Post
  1.pom
Comments

:D 一言句子获取中...