allegro / grunt-maven-plugin

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

Support for custom npm command line options #42

Closed derkd closed 10 years ago

derkd commented 10 years ago

We use grunt karma and it tries to compile something. On windows we there for need Windows 7 SDK. Karma has a javascript fallback but now the build fails with exit code 1 on the npm rebuild. If I manually do a npm rebuild --ignore-scripts it will pass.

adamdubiel commented 10 years ago

Would adding an option to pass extra command line arguments for npm be enough? You could configure your build to call --ignore-scripts.

derkd commented 10 years ago

How can I do this? I now use the goal: npm-offline which calls the npm rebuild (without --ignore-scripts).

adamdubiel commented 10 years ago

You can't at the moment, but i will add an option to do this :) Tomorrow will be okay for you? I will rename this issue.

derkd commented 10 years ago

The sooner the better but tomorrow is fine :) Thanks! How long will it take to be on maven central?

adamdubiel commented 10 years ago

After i do it i will upload to Central, so tomorrow on central.

derkd commented 10 years ago

Great!

On Tue, Jun 17, 2014 at 12:36 PM, Adam Dubiel notifications@github.com wrote:

After i do it i will upload to Central, so tomorrow on central.

Reply to this email directly or view it on GitHub https://github.com/allegro/grunt-maven-plugin/issues/42#issuecomment-46291208 .

adamdubiel commented 10 years ago

Can you check out 1.3.2-snapshot? It has npmOptions and npmRebuildOptions configuration exposed, should work as expected.

derkd commented 10 years ago

Ok thanks. I will try to test it. Propably Friday. Derk Dukker - via HopOn June 17, 2014 at 14:46 GMT, Adam Dubiel notifications@github.com wrote:Can you check out 1.3.2-snapshot? It has npmOptions and npmRebuildOptions configuration exposed, should work as expected.—Reply to this email directly or view it on GitHub.

derkd commented 10 years ago

just had some time to check it and got a nullpointer when adding:

<target>buildprod</target>
                    <gruntBuildDirectory>${basedir}/frontend</gruntBuildDirectory>
                    <npmOfflineModulesFilePath>frontend</npmOfflineModulesFilePath>
                    <npmOfflineModulesFile>node_modules.tar</npmOfflineModulesFile>
<npmRebuildOptions>
                        <npmRebuildOption>--ignore-scripts</npmRebuildOption>
                    </npmRebuildOptions>

Caused by: java.lang.NullPointerException
        at java.util.HashMap.putAll(Unknown Source)
        at pl.allegro.tdr.gruntmaven.executable.Executable.addEnvironmentVars(Ex
ecutable.java:99)
        at pl.allegro.tdr.gruntmaven.ExecNpmOfflineMojo.createNpmInstallExecutab
le(ExecNpmOfflineMojo.java:76)
        at pl.allegro.tdr.gruntmaven.ExecNpmOfflineMojo.getExecutables(ExecNpmOf
flineMojo.java:48)
        at pl.allegro.tdr.gruntmaven.AbstractExecutableMojo.execute(AbstractExec
utableMojo.java:85)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
        ... 20 more
adamdubiel commented 10 years ago

Fixed, thats actually different bug introduced in latest release, try snapshot now.

derkd commented 10 years ago

It works!

On Wed, Jun 18, 2014 at 11:59 AM, Adam Dubiel notifications@github.com wrote:

Fixed, thats actually different bug introduced in latest release, try snapshot now.

Reply to this email directly or view it on GitHub https://github.com/allegro/grunt-maven-plugin/issues/42#issuecomment-46416669 .

adamdubiel commented 10 years ago

Great, closing issue and releasing :)