Minimal set of dependencies to enable xml editing with syntax highlighting in NetBeans Platform application?

Issue

How do I find out what is the minimum set of dependencies to add to a pom file for a NetBeans platform application to be able to edit xml files with syntax highlighting? In other words, does anybody know how to enable XML editor support in a basic NetBeans platform application?

It works great if I just add the whole ide cluster, but then it does all sorts of other things that I do not care about. I just want the minimum functionality to handle XML files. I do not need everything else ide cluster contains.

Any help is appreciated.

Solution

This is what we have figured out the best configuration is in case somebody is interested (creates a robust IDE which handles XML, HTML, image and PDF files and not anything else that is not needed):

    <dependency>
        <groupId>org.netbeans.cluster</groupId>
        <artifactId>platform</artifactId>
        <version>${netbeans.version}</version>
        <type>pom</type>
        <exclusions>
        ... <!-- add a bunch of exclusions from list1 below -->
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.netbeans.cluster</groupId>
        <artifactId>ide</artifactId>
        <version>${netbeans.version}</version>
        <type>pom</type>
        <exclusions>
        ... <!-- add a bunch of exclusions from list2 below -->
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.netbeans.api</groupId>
        <artifactId>org-netbeans-modules-nbjunit</artifactId>
        <version>${netbeans.version}</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.netbeans.api</groupId>
        <artifactId>org-netbeans-modules-jellytools-platform</artifactId>
        <version>${netbeans.version}</version>
        <scope>runtime</scope>
    </dependency>

List1:

                <groupId>org.netbeans.external</groupId>
                <artifactId>net-java-html-boot-fx</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-api-htmlui</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-jdesktop-layout</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-api-htmlui</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-api-visual</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-core-execution</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-libs-javafx</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-libs-jsr223</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-autoupdate-cli</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-core-kit</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-templates</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-templatesui</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-compat</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-execution-compat8</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-options</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openide-util-enumerations</artifactId>

List2:

                <groupId>org.netbeans.external</groupId>
                <artifactId>com-google-guava</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>com-googlecode-javaewah-JavaEWAH</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>com-jcraft-jzlib</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-apache-commons-codec</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-apache-commons-httpclient</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-apache-commons-io</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-apache-commons-lang</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-apache-ws-commons-util</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-apache-xmlrpc</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-core-contenttype</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-core-jobs</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-core-net</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-core-runtime</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-core-runtime-compatibility-auth</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-equinox-app</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-equinox-common</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-equinox-preferences</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-equinox-registry</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-equinox-security</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-jgit</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-jgit-java7</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-bugzilla-core</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-commons-core</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-commons-net</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-commons-repositories-core</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-commons-xmlrpc</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-tasks-core</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-wikitext-confluence-core</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-wikitext-core</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-wikitext-markdown-core</artifactId>
                <groupId>org.netbeans.external</groupId>
                <artifactId>org-eclipse-mylyn-wikitext-textile-core</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-api-debugger</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-core-browser</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-core-browser-webview</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-core-ide</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-core-multitabs-project</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-lib-terminalemulator</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-libs-antlr4-runtime</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-libs-commons_compress</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-libs-commons_net</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-libs-git</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-libs-ini4j</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-libs-jaxb</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-libs-jsch-agentproxy</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-libs-smack</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-libs-svnClientAdapter</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-libs-svnClientAdapter-javahl</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-libs-svnClientAdapter-svnkit</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-libs-swingx</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-bugtracking</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-bugtracking-bridge</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-bugtracking-commons</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-bugzilla</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-code-analysis</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-css-prep</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-db</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-db-core</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-db-dataview</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-db-drivers</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-db-kit</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-db-metadata-model</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-db-mysql</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-db-sql-editor</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-db-sql-visualeditor</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-dbapi</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-derby</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-dlight-nativeexecution</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-dlight-nativeexecution-nb</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-dlight-terminal</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-docker-api</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-docker-editor</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-docker-ui</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-editor-bookmarks</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-editor-global-format</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-editor-indent-project</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-editor-macros</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-editor-plain</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-editor-plain-lib</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-extexecution-impl</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-extexecution-process</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-extexecution-process-jdk9</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-git</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-gototest</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-gsf-codecoverage</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-gsf-testrunner</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-gsf-testrunner-ui</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-html-custom</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-hudson</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-hudson-git</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-hudson-mercurial</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-hudson-subversion</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-hudson-tasklist</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-hudson-ui</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-ide-kit</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-javascript2-debug</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-javascript2-debug-ui</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-jellytools-ide</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-languages</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-localhistory</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-localtasks</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-mercurial</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-mylyn-util</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-notifications</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-parsing-ui</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-print-editor</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-project-ant</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-project-ant-compat8</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-project-ant-ui</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-project-libraries</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-project-libraries-ui</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-project-spi-intern</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-project-spi-intern-impl</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-projectui</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-projectui-buildmenu</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-properties-syntax</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-schema2beans</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-selenium2</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-selenium2-server</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-server</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-spellchecker</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-spellchecker-apimodule</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-spellchecker-bindings-htmlxml</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-spellchecker-bindings-properties</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-spellchecker-dictionary_en</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-spellchecker-kit</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-subversion</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-swing-validation</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-target-iterator</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-tasklist-kit</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-tasklist-projectint</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-tasklist-todo</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-tasklist-ui</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-team-commons</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-team-ide</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-terminal-nb</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-usersguide</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-utilities-project</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-versioning</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-versioning-core</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-versioning-indexingbridge</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-versioning-masterfs</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-versioning-system-cvss-installer</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-versioning-ui</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-versioning-util</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-modules-web-webkit-debugging</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-xml-catalog-ui</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-xml-jaxb-api</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-modules-xml-wsdl-model</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-spi-debugger-ui</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-netbeans-spi-viewmodel</artifactId>
                <groupId>org.netbeans.modules</groupId>
                <artifactId>org-netbeans-swing-dirchooser</artifactId>
                <groupId>org.netbeans.api</groupId>
                <artifactId>org-openidex-util</artifactId>

Also, by default, application is launched with very small default JVM memory configuration. I found that increasing memory to at least 1Gig works great. So, pass following arguments to the executable:

-J-Xms1G -J-Xmx1G

Answered By – Nikita Visnevski

Answer Checked By – Katrina (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.