From f8c53f6c23f63dfefe8514b715ab65dd9d1ceddb Mon Sep 17 00:00:00 2001 From: Fangjun Zhou Date: Mon, 19 Feb 2024 13:02:19 -0600 Subject: [PATCH 1/2] Added nixpkg support --- .gitignore | 5 ++++- flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 38 ++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index 993fb23a4..68ca14a1f 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,7 @@ bin/ jdt-language-server-latest.tar.gz jdtls/ -!.mvn/wrapper/maven-wrapper.jar \ No newline at end of file +!.mvn/wrapper/maven-wrapper.jar + +# Nix artifacts +result/ diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..1428e7a09 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1708296515, + "narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b98a4e1746acceb92c509bc496ef3d0e5ad8d4aa", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..17c710392 --- /dev/null +++ b/flake.nix @@ -0,0 +1,38 @@ +{ + description = "Java Debug Flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + with flake-utils.lib; + eachSystem [ + system.x86_64-linux + system.x86_64-darwin + ] + ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + packages.default = pkgs.maven.buildMavenPackage { + pname = "vscode-debug"; + version = "0.51.0"; + + src = ./.; + mvnHash = "sha256-Fx1EVnWRjRGBvVN7RfYCx+tBuPgG1gte3w8oVJkAkj8="; + + buildPhase = '' + mvn clean package + ''; + + installPhase = '' + cp -r . $out + ''; + }; + } + ); +} From cca0569308b7691479c2528acc1da85d88543710 Mon Sep 17 00:00:00 2001 From: Fangjun Zhou Date: Mon, 19 Feb 2024 13:02:43 -0600 Subject: [PATCH 2/2] Added maven-enforcer-plugin --- pom.xml | 379 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 202 insertions(+), 177 deletions(-) diff --git a/pom.xml b/pom.xml index 8911c9d58..ce7daeee1 100644 --- a/pom.xml +++ b/pom.xml @@ -1,183 +1,208 @@ - - 4.0.0 - com.microsoft.java - java-debug-parent - ${base.name} :: Parent - The Java Debug Server is an implementation of Visual Studio Code (VSCode) Debug Protocol. It can be used in Visual Studio Code to debug Java programs. - https://github.com/Microsoft/java-debug - 0.51.0 - pom - - Java Debug Server for Visual Studio Code - UTF-8 - 4.0.5 - ${basedir} - + - - - Eclipse Public License 1.0 - https://github.com/Microsoft/java-debug/blob/master/LICENSE.txt - repo - - - - - - akaroml - Rome Li - roml@microsoft.com - - - testforstephen - Jinbo Wang - jinbwan@microsoft.com - - - andxu - Andy Xu - andxu@microsoft.com - - - yaohaizh - Yaohai Zheng - yaozheng@microsoft.com - - - - - Microsoft - https://www.microsoft.com - - - - scm:git:git://github.com/Microsoft/java-debug.git - scm:git:ssh://github.com:Microsoft/java-debug.git - https://github.com/Microsoft/java-debug/tree/master - - - - com.microsoft.java.debug.core - com.microsoft.java.debug.plugin - com.microsoft.java.debug.repository - com.microsoft.java.debug.target - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 2.15 - - - - integration-tests - - integration-test - verify - - - - ${failsafeArgLine} - - ${skip.integration.tests} - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - get-libs - - copy - - validate - - - - false - ${basedir}/lib/ - - true - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.1.0 - - - com.puppycrawl.tools - checkstyle - 8.29 - - - com.github.sevntu-checkstyle - sevntu-checkstyle-maven-plugin - 1.24.1 - - - - ${checkstyleDir}/check_style.xml - true - - - - org.eclipse.tycho - target-platform-configuration - ${tycho-version} - - p2 - - - com.microsoft.java - com.microsoft.java.debug.tp - ${project.version} - - - - - - - - - org.eclipse.tycho - tycho-maven-plugin - ${tycho-version} - true - - - - - - activate-in-module - - - ${basedir}/../check_style.xml - - - - ${basedir}/.. - - - - - - oss.sonatype.org - https://oss.sonatype.org/content/repositories/snapshots/ - - true - - - + true + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.1.0 + + + com.puppycrawl.tools + checkstyle + 8.29 + + + com.github.sevntu-checkstyle + + sevntu-checkstyle-maven-plugin + 1.24.1 + + + + + ${checkstyleDir}/check_style.xml + true + + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + p2 + + + com.microsoft.java + + com.microsoft.java.debug.tp + ${project.version} + + + + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + + + + activate-in-module + + + ${basedir}/../check_style.xml + + + + ${basedir}/.. + + + + + + oss.sonatype.org + + https://oss.sonatype.org/content/repositories/snapshots/ + + true + + +