簡體   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