benoror / better-npm-run

🏃‍♂️ Better NPM scripts runner
MIT License
639 stars 56 forks source link

Environment variables lost if executed with maven #53

Closed AndyOGo closed 8 years ago

AndyOGo commented 8 years ago

I face a really weird issue if I kick off my build through maven by exec-maven-plugin. In fact to make it work I have to literally state the NODE_ENV in my pom.xml like:

<configuration>
    <executable>node</executable>
    <environmentVariables>
        <BASE_URL>/src/</BASE_URL>
        <NODE_ENV>production</NODE_ENV>
    </environmentVariables>
    <arguments>
        <argument>node_modules/gulp/bin/gulp.js</argument>
        <argument>build</argument>
        <argument>--harmony</argument>
    </arguments>
</configuration>