繁体   English   中英

阻止 Eclipse/Maven 调用一个特定的插件

[英]Stop Eclipse/Maven from invoking one particular plugin

我在 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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM