You have to use a classifier to attach supplemental artifacts to the project instead of replacing th

Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.1.2:jar (default-jar) on project afm-starter-common: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

缘由: mvn 建立 公共模块,这个公共模块里面有各种 常用依赖包,其他模块只要 引入 这个公共模块,就不需要 再设置依赖了。
模块内没有任何代码,只有 pom.xml

编译时发现报错。

fox.风

解决方法:模块下建立src/main/java/readme.rdsrc/main/resources/readme.rd文件,这个文件内容 直接为空,这里的作用是 占位作用,
建立完成后,重新编译 就不再报错了

已标记关键词 清除标记
# 问题描述 最近在学习大数据,在运行第一个demo的时候出了问题 ## 项目结构: ![图片说明](https://img-ask.csdn.net/upload/201709/01/1504231732_118088.png) 用idea给maven项目打包的时候显示以下警告: ``` [WARNING] JAR will be empty - no content was marked for inclusion! ``` ## pom.xml配置 ```xml <?xml version="1.0" encoding="UTF-8"?> <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"> <modelVersion>4.0.0</modelVersion> <groupId>java</groupId> <artifactId>hadoop-demo</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-jobclient</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-hdfs</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-common</artifactId> <version>2.6.0</version> </dependency> </dependencies> </project> ``` ## 反编译Jar包 ![图片说明](https://img-ask.csdn.net/upload/201709/01/1504232328_147299.png) 少了src下的文件,而且好像依赖也没有,到底是什么情况...如何修改... 刚刚接触idea和maven不久,还不是很熟悉,百度的结果情况也都不太相同,第一次在csdn上提问,希望各位高手多多指点一下,谢谢!
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页