赞
踩
版本:Maven 3.8.3
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
本地仓库需首先在目标位置新建repository文件夹,执行mvn system:help命令从远程仓库下载相关包,可能需把默认位置repository文件夹复制过来.
<localRepository>/usr/local/maven/repository</localRepository>
<!--
/home/kun/.m2/settings.xml #默认位置
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
<profiles>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>3.1</maven.compiler.source>
<maven.compiler.target>3.1</maven.compiler.target>
<maven.compiler.compilerVersion>3.1</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
解决:没有相关jar包,maven配置文件导致,仓库位置问题,添加如下配置:
<mirror>
<id>repo1 Maven</id>
<name>all repository mirror</name>
<mirrorOf>*</mirrorOf>
<url>https://repo1.maven.org/maven2</url>
</mirror>
su root
mvn archetype:generate - DarchetypeGroupId=org.apache.flink - DarchetypeArtifactId=flink-quickstart-java - DarchetypeVersion=1.12.5
报错 Flink java.lang.NoClassDefFoundError: org/apache/flink/api/common/functions/FlatMapFunction
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。