configuration inside execution not working
See original GitHub issueFor some weird reason, I am encountering the same problem as mentioned below using 0.0.28, 1.3 and 1.4 versions of this plugin (possibly all versions, not checked)
When I declare execution level configuration it is ignored.
<execution>
<id>Install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v7.4.0</nodeVersion>
<npmVersion>4.0.5</npmVersion>
<installDirectory>target</installDirectory>
<workingDirectory>./</workingDirectory>
</configuration>
</execution>
The above block will not work.
When I give the configuration in a global configuration block under plugin it works fine.
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<!-- Use the latest released version:
https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
<version>1.4</version>
<configuration>
<nodeVersion>v7.4.0</nodeVersion>
<npmVersion>4.0.5</npmVersion>
<installDirectory>target</installDirectory>
<workingDirectory>./</workingDirectory>
<arguments>-p --config config/webpack.config.prod.js</arguments>
</configuration>
...
</plugin>
The above works just fine.
The problem arises when I want to use two npm executions, or an npm execution along with webpack or something else. They do not pick arguments configuration from their own execution block. But work when an arguments config block is given globally. Problem is that all of the goals pick up the last arguments config block from global configuration.
Following is my environment information- Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T22:11:47+05:30) Maven home: /usr/local/Cellar/maven/3.3.9/libexec Java version: 1.8.0_121, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: “mac os x”, version: “10.12.3”, arch: “x86_64”, family: “mac”
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (2 by maintainers)
A colleague of mine fixed it for me: if you run “mvn plugin-name:goal-name”, it doesn’t actually run your executions at all, it just runs whatever the default goals are for the plugin. In the example above where the execution is bound to the generate-sources phase, if you run “mvn generate-sources” then the executions should run with their respective configurations. Hope this helps.
weirdly enough, a coworker setup the exact same config with same maven version in their system and it worked!