1

プロジェクトの現在のデフォルトの性質は ' org.eclipse.jdt.core.javanature ' (Java の性質) ですが、プロジェクトのデフォルトの性質をorg.nodeclipse.ui.NodeNature ' (nodejs)に変更したいです。

このプラグインは、maven archetype のどこで、どのフェーズで指定する必要がありますか。

https://maven.apache.org/plugins/maven-eclipse-plugin/examples/provide-project-natures-and-build-commands.html

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <version>2.9</version>
            <configuration>

                <projectnature>org.nodeclipse.ui.NodeNature</projectnature>
                <projectnature>org.eclipse.wst.jsdt.core.jsNature</projectnature>
                <projectnature>tern.eclipse.ide.core.ternnature</projectnature>

                <buildcommand>com.eclipsesource.jshint.ui.builder</buildcommand>


            </configuration>
        </plugin>
    </plugins>

</build>

それは私のために働いていません.何か考えはありますか?.

ありがとう

4

1 に答える 1

0

Java Nature を Node のものに置き換えたいようです。AFAICT、参照されているページには、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>

プロジェクトのルートにも .jshintrc ファイルを追加する必要があるかもしれませんが、Preferences -> JSHint パネルでビルドできると思います

于 2015-06-24T21:34:54.817 に答える