allegro / grunt-maven-plugin

Grunt + Maven integration done right
Other
213 stars 32 forks source link

Specify npm fully qualified path #60

Closed dbclkclk closed 9 years ago

dbclkclk commented 9 years ago

Is it possible to specify NPMs fully qualified location if it's not specified in the $PATH variable? This is required for my CI environment.

adamdubiel commented 9 years ago

I think you could try to specify full path as npmExecutable value.

dbclkclk commented 9 years ago

@adamdubiel thanks for the reply. I wouldn't want to do that as in, I run the build on different environments so the path set for a specific environment will be different and I would have to reconfigure it each time.

adamdubiel commented 9 years ago

Maybe yo ucan use Maven features to make it work?

<properties>
    <grunt.npm>npm</grunt.npm>
</properties>

// grunt maven configuration:
<plugin>
    <configuration>
        <npmExecutable>${grunt.npm}</npmExecutable>
    </configuration>
</plugin>

And so on CI you can run build with flag:

mvn grunt:npm -Dgrunt.npm=/usr/local/bin/npm