Git Product home page Git Product logo

vscode-xml's Introduction

XML Language Support by Red Hat

Join the chat at https://gitter.im/redhat-developer/vscode-xml Visual Studio Marketplace Installs eslint github action

Description

This VS Code extension provides support for creating and editing XML documents, based on the LemMinX XML Language Server.

Basic features

Features

Regular font Italics font
enabled by default requires additional configuration to enable

See the changelog for the latest release.

You might also find useful information in the Online XML Documentation or you can read this documentation inside vscode with the command Open XML Document available with Ctrl+Shift+P:

XML Open Documentation

Requirements

For running the binary version:

  • Windows, macOS, or Linux, on a x86_64 CPU
    • We do not currently support running on Linux installations without libc present
  • Java is not required for this version
  • The binary is automatically downloaded by vscode-xml if it is needed, with no additional action required on the part of the user.

For running the Java version (required if you want to run extensions to the base XML features):

  • Java JDK (or JRE) 8 or more recent
  • Ensure Java path is set in either:
    • xml.java.home in VSCode preferences
    • java.home in VSCode preferences
    • Environment variable JAVA_HOME or JDK_HOME
    • Note: The path should end at the parent folder that contains the bin folder. Example Path: /usr/lib/jvm/java-1.8.0 if bin exists at /usr/lib/jvm/java-1.8.0/bin.
    • Note: If the path is not set, the extension will attempt to find the path to the JDK or JRE.

See how to set java home for more information how this extension searches for Java.

Supported VS Code settings

The following settings are supported:

  • xml.java.home: Specifies the folder path to the JDK (8 or more recent) used to launch the XML Language Server if the Java server is being run. If not set, falls back to either the java.home preference or the JAVA_HOME or JDK_HOME environment variables.
  • xml.server.vmargs: Specifies extra VM arguments used to launch the XML Language Server. Eg. use -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication to bypass class verification, increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector.
  • xml.server.workDir: Set a custom folder path for cached XML Schemas. An absolute path is expected, although the ~ prefix (for the user home directory) is supported. Default is ~/.lemminx.
  • xml.server.preferBinary: If this setting is enabled, a binary version of the server will be launched even if Java is installed.
  • xml.server.binary.path: Specify the path of a custom binary version of the XML server to use. A binary will be downloaded if this is not set.
  • xml.server.binary.args: Command line arguments to supply to the binary server when the binary server is being used. Takes into effect after relaunching VSCode. Please refer to this website for the available options. For example, you can increase the maximum memory that the server can use to 1 GB by adding -Xmx1g
  • xml.server.silenceExtensionWarning: If this setting is enabled, do not warn about launching the binary server when there are extensions to the XML language server installed.
  • xml.server.binary.trustedHashes: List of the SHA256 hashes of trusted copies of the lemminx (XML language server) binary.
  • xml.trace.server: Trace the communication between VS Code and the XML language server in the Output view. Default is off.
  • xml.logs.client: Enable/disable logging to the Output view. Default is true.
  • xml.catalogs: Register XML catalog files.
  • xml.downloadExternalResources.enabled: Download external resources like referenced DTD, XSD. Default is true.
  • xml.fileAssociations: Allows XML schemas/ DTD to be associated to file name patterns.
  • xml.foldings.includeClosingTagInFold: Minimize the closing tag after folding. Default is false.
  • xml.preferences.quoteStyle: Preferred quote style to use for completion: single quotes, double quotes. Default is double.
  • xml.autoCloseTags.enabled : Enable/disable autoclosing of XML tags. Default is true. IMPORTANT: The following settings must be turned of for this to work: editor.autoClosingTags, editor.autoClosingBrackets.
  • xml.codeLens.enabled: Enable/disable XML CodeLens. Default is false.
  • xml.preferences.showSchemaDocumentationType: Specifies the source of the XML schema documentation displayed on hover and completion. Default is all.
  • xml.validation.enabled: Enable/disable all validation. Default is true.
  • xml.validation.namespaces.enabled: Enable/disable namespaces validation. Default is always. Ignored if xml.validation.enabled is set to false.
  • xml.validation.schema.enabled: Enable/disable schema based validation. Default is always. Ignored if xml.validation.enabled is set to false.
  • xml.validation.disallowDocTypeDecl: Enable/disable if a fatal error is thrown if the incoming document contains a DOCTYPE declaration. Default is false.
  • xml.validation.resolveExternalEntities: Enable/disable resolve of external entities. Default is false. Disabled in untrusted workspace.
  • xml.validation.noGrammar: The message severity when a document has no associated grammar. Defaults to hint.
  • xml.validation.filters: Allows XML validation filter to be associated to file name patterns.
  • xml.symbols.enabled: Enable/disable document symbols (Outline). Default is true.
  • xml.symbols.excluded: Disable document symbols (Outline) for the given file name patterns. Updating file name patterns does not automatically reload the Outline view for the relevant file(s). Each file must either be reopened or changed, in order to trigger an Outline view reload.
  • xml.symbols.maxItemsComputed: The maximum number of outline symbols and folding regions computed (limited for performance reasons). Default is 5000.
  • xml.symbols.showReferencedGrammars: Show referenced grammars in the Outline. Default is true.
  • xml.symbols.filters: Allows XML symbols filter to be associated to file name patterns.
  • files.trimTrailingWhitespace: Now affects XML formatting. Enable/disable trailing whitespace trimming when formatting an XML document. Default is false.
  • See Formatting settings for a detailed list of the formatting settings.

Telemetry

With your approval, the vscode-xml extension collects anonymous usage data and sends it to Red Hat servers to help improve our products and services. Read our privacy statement to learn more. This extension respects the redhat.telemetry.enabled setting, which you can learn more about at https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-disable-telemetry-reporting

LemMinX Binary

As a part of the release process, vscode-xml builds a binary version of the LemMinX XML Language Server. The stable releases of the binary, which are used in the vscode-xml releases, are available at https://download.jboss.org/jbosstools/vscode/stable/lemminx-binary/. The latest snapshot build of the binary, which tracks the HEAD of this repository, is available at https://download.jboss.org/jbosstools/vscode/snapshots/lemminx-binary/LATEST/.

Articles

Custom XML Extensions

The LemMinX - XML Language Server can be extended to support custom completion, hover, validation, rename, etc. Please see the extensions documentation for more information.

Contributing

This is an open source project open to anyone. Contributions are extremely welcome!

For information on getting started, refer to the CONTRIBUTING instructions.

Click on Switch to Pre-Release Version to enjoy the latest changes.

Switch to Pre-Release

Feedback

License

EPL 2.0, See LICENSE file.

vscode-xml's People

Contributors

a2975667 avatar angelozerr avatar bricksdont avatar brunoborges avatar cirolosapio avatar claui avatar datho7561 avatar dependabot[bot] avatar dkwon17 avatar fbricon avatar felixfbecker avatar gitmensch avatar gorkem avatar invinciblejai avatar jessicajhee avatar junestepp avatar mkhl avatar nblyumberg avatar nikolaskomonen avatar ralish avatar rgrunber avatar rzgry avatar rzhao271 avatar snjeza avatar sympatheticmoose avatar twoseascharlie avatar vladik-vitre avatar vorburger avatar wangxi761 avatar xoviat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-xml's Issues

Hover error

When I hover on a pom.xml I see the hover content as Unsupported Markup content received. Kind is: undefined.

Improve detection of java executable

In my case I have an installed java but not a JAVA_HOME. My java path is in my Windows PATH variable.

To use this java without configuring VSCode preferences, you could search it:

  • with where java command in OS Windows
  • with which java command for other OS.

This idea was done in Eclipse Bluesky to find the node process. Here the Java code:

public static String getNodeJsLocation() {
		String res = "/path/to/node";
		String[] command = new String[] {"/bin/bash", "-c", "which node"};
		if (Platform.getOS().equals(Platform.OS_WIN32)) {
			command = new String[] {"cmd", "/c", "where node"};
		}
		BufferedReader reader = null;
		try {
			Process p = Runtime.getRuntime().exec(command);
			reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
			res = reader.readLine();
		} catch (IOException e) {
			Activator.getDefault().getLog().log(
					new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), e.getMessage(), e));
		} finally {
			IOUtils.closeQuietly(reader);
		}

		// Try default install path as last resort
		if (res == null && Platform.getOS().equals(Platform.OS_MACOSX)) {
			res = "/usr/local/bin/node";
		}

		if (res != null && Files.exists(Paths.get(res))) {
			return res;
		} else if (!alreadyWarned){
			warnNodeJSMissing();
			alreadyWarned = true;
		}
		return null;
	}

It should be cool to adapt this Java code in TypeScript and to discover java instead of node.

Error messages hard to read

When editing pom.xml file with an error, the error message showed by XML extension is very hard to read.
screen shot 2018-11-19 at 10 12 24 am
It's too long
It has too much information and unnecessary details
It does not provide clear action items

Please consider improve the message by:

  1. Remove all the namespaces before the actual element names: e.g. {"http://maven.apache.org/POM/4.0.0":name2} -> name2
  2. Incorporate proper formatting/coloring to improve readability
  3. Check similarity of the node name and rank the most possible one on top

Sample:

[XML] Invalid content was found starting with element 'name2'.
Possible values:
-> name
description
packaging
url
...

Code completion is sometimes "one off"

Code completion is "one off" in some places of the XML file in the attached mini.zip.

At this position it should suggest edmx:Include and edmx:IncludeAnnotations, instead it suggests nothing:

image

Instead it shows these suggestions when triggering code completion one level up in the XML tree (where it should instead suggest edmx:Reference and others):
image

To make things more confusing this only happens with suggestions for the "outer" XSD (here: edmx). Suggestions for elements in the "inner" XSD (here: edm) work fine - only edm:PropertyRef is allowed and suggested here:
image

To make things even more confusing the "one off" suggestions only show when pressing Control-Space on "white space". Once I type a < the correct suggestions show:
image

Discrepancy in completion between prefixed and default namespaces

I have XML files that use an "outer" namespace which in turn imports an "inner" namespace.

If the "inner" namespace is declared as the default namespace via xmlns="...", code completion works fine in the "outer" and the "inner" part, e.g.:
image

However if the "inner" namespace is declared with a namespace prefix via xmlns:edm="...", code completion for constructs in the "outer" namespace also shows top-level elements from the "inner" namespace that are not allowed by the "outer" XSD in that place:
image

This effect only shows on "level 1", i.e. directly below the root element of the "outer" namespace, where no elements of the "inner" namespace are allowed at all.

On "level 2", i.e. within children of the root element, code completion works fine and only shows allowed elements.

Test project is attached: vscode-xml-catalog-test.zip

  • examples/mini-catalog.xml works as expected
  • examples/mini-catalog-prefix.xml has the above strange behavior in one place.

No IntelliSense on .xsd files

Originally reported here: eclipse/lemminx#111

I am trying to get autocompletion while authoring an XSD.
For this, I declared the XSD as an instance of the XSD meta schema:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified"
           elementFormDefault="qualified"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.w3.org/2001/XMLSchema
                               http://www.w3.org/2001/XMLSchema.xsd">

</xs:schema>

However, I am not getting any autocompletion or hovers.

If I rename the file to have a .xml extension, it works as expected.

It would be great if the extension didn't depend on specific file extensions, but just checked if the file started with a <?xml declaration, because there are many files that are XML but don't use a .xml extension, e.g. .xsd, .ps1xml or .csproj.

Output channel log:

Sep 10, 2018 2:18:30 PM org.eclipse.lsp4xml.XMLLanguageServer initialize
INFO: Initializing LSP4XML server

(no errors)

Version: vscode-xml-0.1.0-199.vsix

No end-tag completion on empty character

Given:

<foo>
    <bar>
     // press ctrl-space here
</foo>

There's no completion until I press <. While I understand autocompletion is triggered on <, explicit completion requests (ctrl+space), should also return results from anywhere in the document. In this case, it should return </bar>.
The current behavior is very frustrating.

This may be a server-side issue (or not). cc @angelozerr

Extension doesn't properly recognize Java 10

Formatting removes xml-stylesheet processing instruction attributes

When formatting document with the xml-stylesheet processing instruction,
it removes all attributes, except version and encoding.

Example:
<?xml-stylesheet href="my-style.css" type="text/css"?>
becomes
<?xml-stylesheet?>

However,
<?xml-stylesheet href="my-style.css" encoding="UTF-8" type="text/css"?>
becomes
<?xml-stylesheet encoding="UTF-8"?>

It seems like it treats the processing instruction xml-stylesheet like xml.
The xml-stylesheet does not have attributes encoding or version, but it has attribute href and type.

XML catalog settings

Please give the capability to configure teh XML catalog settings of lsp4xml language server with VSCode. Thanks!

Warnings in extension development

Not a blocking issue. Just some annoying warning messages in debug console if I have xml extension installed.

[redhat.vscode-xml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[xml]', provide the URI of a resource or 'null' for any resource.
[redhat.vscode-xml] Accessing a window scoped configuration for a resource is not expected. To associate 'xml.completion.autoCloseTags' to a resource, define its scope to 'resource' in configuration contributions in 'package.json'.

The first one:

let closeBrackets = configXML.get("[xml]")["editor.autoClosingBrackets"];

let configXML = workspace.getConfiguration(undefined, null), ConfigXML.get("[xml]") should work.

The second one:

disposable = activateTagClosing(tagRequestor, { xml: true, xsl: true }, 'xml.completion.autoCloseTags');

if (!workspace.getConfiguration(void 0, document.uri).get<boolean>(configName)) {

vscode-xml/package.json

Lines 152 to 156 in 32b586c

"xml.completion.autoCloseTags": {
"type": "boolean",
"default": true,
"description": "Enable/disable autoclosing of XML tags. \n\nIMPORTANT: Turn off editor.autoClosingTags for this to work",
"scope": "window"

Getting a ContentIllegalInProlog error in my maven.config file

${workspaceRoot}/.mvn/maven.config

--settings .mvn/local-settings.xml

leads to

[xml] Content is not allowed in prolog. [ContentIllegalInProlog]

This is not an XML file as far as I can tell. Trying to point Maven at a mirror using project specific settings. Maven from command line works fine.

Simplify getSettings()

getSettings should mostly be equivalent to

let configXML = workspace.getConfiguration('xml');
// add missing log file settings
let settings: Settings = {
    configXML
}
return settings;

That makes all xml settings automatically sent to the server, so no need to change anything here when new settings are added to package.json

CodeAction doesn't work in VSCode

I have tried to test code action in VSCode but it doesn't work altough with Eclipse LSP4E it works?

Here a sample:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<bean>
	                      dddddddddddddddddd
	</bean>
</beans>

Code action to remove dddddddddddddddddd is displayed, but when I click on it, it doesn't work?

vscodecodeactionbug
Have you an idea? i sit a problem from lsp4xml? Thanks for your investigation.

Ensure the extension works with a proxy

Enable the server to be started with proxy values if they exist.

Existing default vscode preferences already there for proxy information.
Just search proxy in preferences.

how to use the android layout xsd for completion?

I want to write the android layout xml file in vscode, with this plugin and the xsd file from repo,

but there are two xsd files, I don't how to config the association between them, could you please give a sample? (with element type and attribute completion)

if systemId set to the android-layout.xsd, element could be completed but attribute doesn't;
if using the android-attribute.xsd, none of them work.

Add readme

provide a project description with

  • requirements,
  • features
  • building instructions
  • installation instructions (see download area)

XML catalog support apparently not working

I need to validate XML files against their XML schemas, and injecting xsi:schemaLocations into those files is not possible/feasible.

XML catalogs should solve that, yet I can't get that to work.

What I tried in USER SETTINGS:

    "xml.catalogs": [
        "O:\\git\\odata-csdl-schemas\\catalog.xml"
    ]

The file O:\git\odata-csdl-schemas\catalog.xml contains

<?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <uri name="urn:oasis:names:tc:entity:xmlns:xml:catalog" uri="jar:file:/C:/eclipse-Photon/plugins/org.eclipse.wst.standard.schemas_1.0.800.v201711201732.jar!/xsd/xmlcatalog11.xsd" />
  <uri name="http://docs.oasis-open.org/odata/ns/edmx" uri="http://localhost/odata-schemas/edmx.xsd" />
  <uri name="http://docs.oasis-open.org/odata/ns/edm" uri="http://localhost/odata-schemas/edm.xsd" />
</catalog>

The first entry is copied from Eclipse's system_catalog.xml and should help validate the catalog.xml - it doesn't.

The second and third entries map the XML namespaces I'm actually interested in to local copies of the corresponding XML Schema files. The files are accessible via my local web server at the URIs listed in the file. Neither validation nor code completion are working as expected.

Removing the first entry with the jar: URL doesn't make the other two work.

What am I doing wrong?

Thanks in advance
Ralf

vscode xml 0.3.0 is broken?

I have installed vscode-xml-0.3.0-630.vsix and nothing is working (hover, completion, etc). I have checked that in the trace that vscode client sends requests, but there is never response from the lsp4xml server.

I don't know if it's an issue with lsp4xml? It works with Eclipse IDE (LSP4E)

I'm using VSCode:

Version : 1.29.1 (system setup)
Validation : bc24f98b5f70467bc689abf41cc5550ca637088e
Date : 2018-11-15T19:13:36.375Z
Electron: 2.0.12
Chrome : 61.0.3163.100
Node.js : 8.9.3
V8 : 6.1.534.41
Architecture : x64

Use org.eclipse.lsp4xml-all.jar?

I have noticed in https://github.com/gorkem/vscode-xml/blob/master/src/javaServerStarter.ts#L33 that you consume the org.eclipse.lsp4xml-all.jar which contains only https://github.com/angelozerr/lsp4xml/tree/master/org.eclipse.lsp4xml and their dependencies but it doesn't contains extension projects https://github.com/angelozerr/lsp4xml/tree/master/extensions (to have completion, validation for XML Schema, compleetion for Emmet, etc)

I would like to clarify if org.eclipse.lsp4xml-all.jar should exist? In my Eclipse client https://github.com/angelozerr/lsp4e-xml, I'm using all JARs https://github.com/angelozerr/lsp4e-xml/tree/master/org.eclipse.lsp4e.xml/server and I build the Jar command with those files?

@fbricon I believe that you want not to have an org.eclipse.lsp4xml-all.jar , no?

'npm run build-server' doesn't work on Windows

npm run build-server

> [email protected] build-server C:\jbtgit\vscode-xml
> gulp build_server

[20:06:23] Using gulpfile C:\jbtgit\vscode-xml\gulpfile.js
[20:06:23] Starting 'build_server'...
'..' is not recognized as an internal or external command,
operable program or batch file.
[20:06:23] 'build_server' errored after 111 ms
[20:06:23] Error: Command failed: ../lsp4xml/mvnw.cmd clean verify -DskipTests
    at checkExecSyncError (child_process.js:481:13)
    at Object.execSync (child_process.js:521:13)
    at C:\jbtgit\vscode-xml\gulpfile.js:14:5
    at taskWrapper (C:\jbtgit\vscode-xml\node_modules\undertaker\lib\set-task.js                            :13:15)
    at bound (domain.js:280:14)
    at runBound (domain.js:293:12)
    at asyncRunner (C:\jbtgit\vscode-xml\node_modules\async-done\index.js:55:18)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-server: `gulp build_server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-server script.
npm ERR! This is probably not a problem with npm. There is likely additional log                            ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Snjeza\AppData\Roaming\npm-cache\_logs\2018-09-11T18_06_23                            _623Z-debug.log

no code completion on nested xml elements

Good day,
I will like to report an issue I noticed.

I created a custom xsd schema for a xml file. Am using Vscode with your vscode-xml extension.

The schema works for only the top elements giving me all its attributes from my xsd file but not on the nested elements in the xml file.

I used the same xsd schema file in Jetbrain Intellij and it worked fine.

Here is an example of my issue.
xml_schema_error2

I will really appreciate it if you could solve this problem in vscode for me. Thanks

And nice work on this project.

Prevent `splitAttributes` from splitting elements with one attribute

When splitAttributes is enabled, elements with one attribute get split onto multiple line. For example:

<myelement key="some_key">hellow</myelement>

becomes

<myelement
          key="some_key">hellow</myelement>

The splitAttributes comment says it will split multiple attributes onto a new line. I'm not sure if this is the expected behavior but it would nice to have elements with one attribute stay on the same line.

// Split multiple attributes each onto a new line
"xml.format.splitAttributes": true,

Get XML format command to preserve whitespace as XML value

I frequently want to space-separate a value in my XSL output and do so by using the following XSL

    <xsl:template match="d:blah">
        <xsl:text> </xsl:text>
        <xsl:element name="{local-name()}">
            <xsl:apply-templates />
        </xsl:element>
    </xsl:template>

But when I format the XSL using your extension, it removes the space from between the xsl:text tags. Please can you add a setting to preserve whitespace?

Problems with npm run build-server on Windows

When trying to build vscode-xml on Windows 10 Enterprise 1803 I run into a few issues:

  1. npm install ends with warnings
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  1. npm run build-server ends with an error:
Couldn't find "C:\Temp\vscode-xml-build-test\lsp4xml\.mvn\wrapper\maven-wrapper.jar", downloading it ...
Downloading from: "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: Could not create SSL/TLS secure
channel."
At line:1 char:1
+ (New-Object Net.WebClient).DownloadFile('https://repo.maven.apache.or ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Finished downloading "C:\Temp\vscode-xml-build-test\lsp4xml\.mvn\wrapper\maven-wrapper.jar"
Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
  1. After manually downloading the maven-wrapper.jar I ran into another maven-related error so I decided to look over at https://github.com/angelozerr/lsp4xml where I found the hint to
  • Run ./mvnw clean verify (OSX, Linux) or mvnw.cmd clean verify (Windows)
    Doing that gave me another bunch of errors:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for lsp4xml 0.0.3-SNAPSHOT:
[INFO]
[INFO] lsp4xml ............................................ SUCCESS [  0.109 s]
[INFO] org.eclipse.lsp4xml ................................ SUCCESS [ 20.310 s]
[INFO] lsp4xml-extensions ................................. SUCCESS [  0.016 s]
[INFO] org.eclipse.lsp4xml.extensions.emmet ............... FAILURE [ 25.260 s]
[INFO] org.eclipse.lsp4xml.extensions.web ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  45.833 s
[INFO] Finished at: 2018-11-09T11:06:25+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project org.eclipse.lsp4xml.extensions.emmet: There are test failures.
  1. Ignoring these errors I headed back to vscode-xml and re-ran npm run build-server which then succeeded.

So apparently just some steps are missing in CONTRIBUTING.md:

  • cd ../lsp4xml
  • Run ./mvnw clean verify (OSX, Linux) or mvnw.cmd clean verify (Windows)
  • cd ../vscode-xml

Plus the advice to ignore certain warnings or errors 😃

Implement Autoclosing of tags

DTD validation problems not refreshing correctly

When I change a dtd <!ELEMENT> declaration the file doesn't validate automatically. I have to force restart VSCode to see, if my changes fixed the problem.

Example:

<?xml version="1.0"?>
<!DOCTYPE student [
  <!ELEMENT student (surname,id)>
  <!ELEMENT surname (#PCDATA)>
]>
<student>
  <surname>Smith</surname>
  <id>567896</id>
</student>

This file is invalid because its missing <!ELEMENT id (#PCDATA)>. Adding the line doesn't cause the error to disappear, only after restarting VSCode the problem is it fixed.

I'm using VSCode 1.27.2 on Kali Linux. Java JDK is openjdk-10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.