java - 阻止 Eclipse/Maven 调用一个特定的插件
问题描述
我在 Eclipse 中有一个 Maven 项目,它不仅构建主 jar 文件,还运行frontend-maven-plugin。这个插件需要永远运行,并且 Eclipses 坚持在启动时调用它一次,然后在随机时间调用它。
我需要它仅在部署时运行此插件,并在开发过程中停止打扰我。我已将每个执行绑定到部署阶段,当我从命令行运行 Maven 时,一切正常。“mvn deploy”运行插件,“mvn install”不运行。
<plugin>
<!-- This is from https://blog.codecentric.de/en/2018/04/spring-boot-vuejs/
It does the front end build by invoking the npm build. -->
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.8.0</version>
<configuration>
<workingDirectory>admin</workingDirectory>
</configuration>
<executions>
<!-- Install our node and npm version to run npm/node scripts -->
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<phase>deploy</phase>
<configuration>
<nodeVersion>v14.15.1</nodeVersion>
<yarnVersion>v1.22.10</yarnVersion>
</configuration>
</execution>
<!-- Install all project dependencies -->
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>deploy</phase>
<!-- optional: default phase is "generate-resources" -->
</execution>
<!-- Build and minify static files -->
<execution>
<!-- Yarn/Nuxt still uses npm run build to build the dist -->
<id>yarn run build</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>deploy</phase>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
问题是 Eclipse 在开发时不断调用插件并在我等待它时将我关闭。我如何让它停止?
解决方案
如果您<?m2e ignore?>
按照中所述应用于插件,它应该可以工作
https://www.eclipse.org/m2e/documentation/release-notes-17.html
推荐阅读
- python - 计算 pandas 数据框中联合(Jaccard 的索引)的交集
- intellij-idea - Intellij:Geb页面对象模式导航
- django - get_absolute_url:找不到“文章详细信息”的反向错误
- hibernate - quarkus - javax.persistence.AttributeConverter 不在 jandex 索引中
- python - BeautifulSoup:定位一个 div 后查找其他元素
- javascript - 为什么“0”不等于空列表?
- mysql - 在 mysql 过程中放置删除 sql
- javascript - 第一次单击后函数返回未定义
- python - 元组给我带来了一些问题
- c# - AWS lambda C# 核心 CultureInfo ToString 问题