Node.js 使用grunt maven插件运行package.json脚本

Node.js 使用grunt maven插件运行package.json脚本,node.js,maven,gruntjs,npm,Node.js,Maven,Gruntjs,Npm,我在package.json中添加了以下内容: "scripts": { "tsc": "tsc", "tsc:w": "tsc -w", "lite": "lite-server", "start": "concurrent \"npm run tsc:w\" \"npm run lite\" " }, 我使用grunt maven插件运行npm和grunt的目标,如下所示: <pluginExecution>

我在package.json中添加了以下内容:

"scripts": {
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "start": "concurrent \"npm run tsc:w\" \"npm run lite\" "
  },
我使用grunt maven插件运行npm和grunt的目标,如下所示:

<pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>pl.allegro</groupId>
                                        <artifactId>
                                            grunt-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.5.1,)
                                        </versionRange>
                                        <goals>
                                            <goal>
                                                create-resources
                                            </goal>
                                            <goal>npm</goal>
                                            <goal>grunt</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>

快板
grunt maven插件
[1.5.1,)
创造资源
npm
咕哝
现在,我希望我能够使用目标或Grunt运行npm启动脚本。如何才能做到这一点

我知道grunt有一个typescript插件,但我想知道如何使用grunt运行这个npm

        <plugin>
            <groupId>org.eclipse.m2e</groupId>
            <artifactId>lifecycle-mapping</artifactId>
            <version>1.0.0</version>
            <configuration>
                <lifecycleMappingMetadata>
                    <pluginExecutions>
                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>
                                    org.apache.maven.plugins
                                </groupId>
                                <artifactId>
                                    maven-war-plugin
                                </artifactId>
                                <versionRange>
                                    [2.1.1,)
                                </versionRange>
                                <goals>
                              <goal>exploded</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <ignore></ignore>
                            </action>
                        </pluginExecution>
                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>pl.allegro</groupId>
                                <artifactId>
                                    grunt-maven-plugin
                                </artifactId>
                                <versionRange>
                                    [1.5.1,)
                                </versionRange>
                                <goals>
                                    <goal>
                                        create-resources
                                    </goal>
                                    <goal>npm</goal>
                                    <goal>grunt</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <ignore></ignore>
                            </action>
                        </pluginExecution>
                    </pluginExecutions>
                </lifecycleMappingMetadata>
            </configuration>
        </plugin>

org.eclipse.m2e
生命周期映射
1.0.0
org.apache.maven.plugins
maven战争插件
[2.1.1,)
爆炸了的
快板
grunt maven插件
[1.5.1,)
创造资源
npm
咕哝

Hmm,这真的在
内部吗?你应该在
元素中定义
grunt maven插件。如果是,你能发布它吗?这有什么关系?它实际上意味着一切:)。所以我猜没有定义grunt maven插件的
部分,对吗?确定有一个wrapper在上面,然后请发布。
只是告诉M2Eclipse在遇到未知插件执行时不要引发错误。