在我的pom.xml中有frontend-maven-plugin。
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<nodeVersion>v6.11.0</nodeVersion>
<npmVersion>3.10.10</npmVersion>
<workingDirectory>src/main/frontend</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>它需要一些时间来运行它,并且在我运行测试时不需要这个插件。
是否可以在运行mvn test时不执行插件
发布于 2018-04-22 15:50:48
你听说过maven profile吗?http://maven.apache.org/guides/introduction/introduction-to-profiles.html
我知道当你想测试一个包的时候,你不会想要构建一个更大的包。
您可以定义一个配置文件,它可以准确地选择您想要构建和测试的模块。
你有一个相关的问题:
Disable maven plugins when using a specific profile
如果它对你有帮助,请告诉我们!
发布于 2018-06-26 00:29:26
前端-maven-plugin现在has specific keys来禁止执行特定的目标。例如,添加系统属性skip.npm将跳过npm执行。您可以在运行maven时这样添加它:
mvn test -Dskip.npmhttps://stackoverflow.com/questions/49954161
复制相似问题