Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse 如何从maven创建nodejs原型_Eclipse_Node.js_Maven_Maven Plugin_Maven Eclipse Plugin - Fatal编程技术网

Eclipse 如何从maven创建nodejs原型

Eclipse 如何从maven创建nodejs原型,eclipse,node.js,maven,maven-plugin,maven-eclipse-plugin,Eclipse,Node.js,Maven,Maven Plugin,Maven Eclipse Plugin,该项目当前的默认性质是“org.eclipse.jdt.core.javanature”(Java性质),但我希望将该项目的默认性质更改为org.nodeeclipse.ui.nodenauture(nodejs) 在maven原型中,我应该在哪里指定这个插件,以及在哪个阶段 org.apache.maven.plugins maven eclipse插件 2.9 org.nodeeclipse.ui.NodeNature org.eclipse.wst.jsdt.core.jsNature

该项目当前的默认性质是“org.eclipse.jdt.core.javanature”(Java性质),但我希望将该项目的默认性质更改为org.nodeeclipse.ui.nodenauture(nodejs)

在maven原型中,我应该在哪里指定这个插件,以及在哪个阶段


org.apache.maven.plugins
maven eclipse插件
2.9
org.nodeeclipse.ui.NodeNature
org.eclipse.wst.jsdt.core.jsNature
tern.eclipse.ide.core.ternature
com.eclipsesource.jshint.ui.builder
这对我没用,有什么想法吗


谢谢

看起来您想用节点替换Java特性。在AICT中,引用的页面给出了通过pom向默认值添加属性的说明。默认值在.project文件中定义。。。将该文件中的“buildspec”和“natures”标记替换为:

    <buildSpec>
            <buildCommand>
                    <name>com.eclipsesource.jshint.ui.builder</name>
                    <arguments>
                    </arguments>
            </buildCommand>
    </buildSpec>
    <natures>
            <nature>org.nodeclipse.ui.NodeNature</nature>
            <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
            <nature>tern.eclipse.ide.core.ternnature</nature>
    </natures>

com.eclipsesource.jshint.ui.builder
org.nodeeclipse.ui.NodeNature
org.eclipse.wst.jsdt.core.jsNature
tern.eclipse.ide.core.ternature

你可能还需要在项目的根目录中添加一个.jshintrc文件,但我认为你可以在Preferences->JSHint面板中构建它

你说的“following plugin”是什么意思?我在pom.xml中使用了“maven eclipse plugin”,但这不起作用。谢谢。但是我不想手动更改.project文件,我想使用我的原型在项目创建时将项目的性质设置为nodejs。
    <buildSpec>
            <buildCommand>
                    <name>com.eclipsesource.jshint.ui.builder</name>
                    <arguments>
                    </arguments>
            </buildCommand>
    </buildSpec>
    <natures>
            <nature>org.nodeclipse.ui.NodeNature</nature>
            <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
            <nature>tern.eclipse.ide.core.ternnature</nature>
    </natures>