Maven之Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli)

运行·环境:Maven3.8、JDK11、idea2020.1、tomcat9
出现错误:Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on project demo4: The packaging for this project did not assign a file to the build artifact
Maven之Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli)
添加修改默认的版本(JDK1.7),改为与自己环境对应的jdk版本,下面这配置是专门处理上面的错误。

<build>
		<plugins>
				<!--使用maven部署时,需要在这里添加tomcat插件-->
				<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
				<source>1.8</source>
				<target>1.8</target>
				</configuration>
				</plugin>
		</plugins>
</build>

纠正后的就是如下图所示
Maven之Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli)

在写的过程可能存在不足的地方,望各位指正。

上一篇:maven shade plugin


下一篇:Linux安装Rabbitmq