From b363022c104f43dfd058635609f1abbc3edc66ef Mon Sep 17 00:00:00 2001 From: Victor Rubezhny Date: Tue, 18 Jul 2023 20:16:25 +0200 Subject: [PATCH] [build] Create Lemminx-Maven Uber Zip This PR also makes the build, when executed with `-Pgenerate-vscode-jars ` argument, to pack the contents of `vscode-lemminx-maven-jars` directory to `lemminx-maven--vscode-uber-jars.zip` and upload this archive to the releass/snapshots repositories. Issue: #430 --- CONTRIBUTING.md | 8 +++--- Jenkinsfile | 2 +- lemminx-maven/pom.xml | 29 +++++++++++++++++----- lemminx-maven/src/assembly/vscode-uber.xml | 15 +++++++++++ 4 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 lemminx-maven/src/assembly/vscode-uber.xml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0729ae9e..8d53d279 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,11 +48,13 @@ The LemMinX-Maven extension must be debugged remotely as it's most useful when c $ mvnw.cmd verify -DskipTests -Pgenerate-vscode-jars ``` -2. Clone and build VSCode-XML extension, See: [VSCode-XML Extension Contribution Guide](https://github.com/redhat-developer/vscode-xml/blob/main/CONTRIBUTING.md#steps) +This produces the `/lemminx-maven/target/vscode-lemminx-maven-jars` directory containing all the Jars required to run LemMinX-Maven extension in VSCode XML as well as the `lemminx-maven--vscode-uber-jars.zip` Zip-archive with the contents of this directory. -3. Try running the VSCode-XML extension to make sure everything is correctly installed and XML editor works (validation, content assist, hovers, etc. for XML tags and attributes) +2. Clone and build VSCode-XML extension, See: [VSCode-XML Extension Contribution Guide](https://github.com/redhat-developer/vscode-xml/blob/main/CONTRIBUTING.md#steps). -4. Copy `/lemminx-maven/target/vscode-lemminx-maven-jars` directory to VSCode-XML extension project directory and make sure it's visible in `vscode-xml`project in VSCode +3. Try running the VSCode-XML extension to make sure everything is correctly installed and XML editor works (validation, content assist, hovers, etc. for XML tags and attributes). + +4. Copy `/lemminx-maven/target/vscode-lemminx-maven-jars` directory to VSCode-XML extension project directory and make sure it's visible in `vscode-xml`project in VSCode . 5. In VSCode modify `vscode-xml/package.json` adding the following configuration to the `contributes` section: diff --git a/Jenkinsfile b/Jenkinsfile index abae3d97..2fd42894 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline{ stages{ stage("Maven Build"){ steps { - sh 'mvn -B verify --file lemminx-maven/pom.xml -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true' + sh 'mvn -B verify --file lemminx-maven/pom.xml -Pgenerate-vscode-jars -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true' } post { always { diff --git a/lemminx-maven/pom.xml b/lemminx-maven/pom.xml index 8a923a7c..f5791860 100644 --- a/lemminx-maven/pom.xml +++ b/lemminx-maven/pom.xml @@ -194,15 +194,15 @@ maven-assembly-plugin 3.6.0 - - - src/assembly/deps.xml - - zip-with-dependencies package + + + src/assembly/deps.xml + + single @@ -249,7 +249,6 @@ copy - @@ -260,6 +259,24 @@ true + + maven-assembly-plugin + 3.6.0 + + + lemminx-maven-vscode-uber-zip + package + + + src/assembly/vscode-uber.xml + + + + single + + + + diff --git a/lemminx-maven/src/assembly/vscode-uber.xml b/lemminx-maven/src/assembly/vscode-uber.xml new file mode 100644 index 00000000..7bc57227 --- /dev/null +++ b/lemminx-maven/src/assembly/vscode-uber.xml @@ -0,0 +1,15 @@ + + vscode-uber-jars + + zip + + false + + + target/vscode-lemminx-maven-jars + + + +