Преглед изворни кода

fixing the JSON library to work with the nix build.

Lucas Albertins пре 2 година
родитељ
комит
80fb1659db

+ 1 - 1
flake.nix

@@ -25,7 +25,7 @@
             version = "0.0.1";
             name = "${pname}-${version}";
             src = pkgs.nix-gitignore.gitignoreSource [ "*.nix" ] ./.;
-            mvnHash = "sha256-KobtWkq/VH3b6W64rEpIxCu3RITTETyYmDcO5l/RLE8=";
+            mvnHash = "sha256-PUUlNgRvBiZZVH3zxTmQW92nBo90nm+FSS1Ryw/0rB0=";
             nativeBuildInputs = [
               pkgs.makeWrapper
             ];

+ 7 - 7
pom.xml

@@ -44,11 +44,6 @@
 			<artifactId>h2</artifactId>
 			<scope>runtime</scope>
 		</dependency>
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-configuration-processor</artifactId>
-			<optional>true</optional>
-		</dependency>
 		<dependency>
 			<groupId>org.projectlombok</groupId>
 			<artifactId>lombok</artifactId>
@@ -59,11 +54,16 @@
 			<artifactId>spring-boot-starter-test</artifactId>
 			<scope>test</scope>
 		</dependency>
-		<dependency>
+	 	<dependency>
         	<groupId>org.asynchttpclient</groupId>
         	<artifactId>async-http-client</artifactId>
         	<version>3.0.0.Beta2</version>
-        </dependency>
+        </dependency> 
+        <dependency>
+  			<groupId>org.json</groupId>
+  				<artifactId>json</artifactId>
+  				<version>20220924</version>
+		</dependency>
 	</dependencies>
 
 	<build>

+ 1 - 1
src/main/java/ua/be/wee/model/EnactmentController.java

@@ -7,8 +7,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.json.JSONException;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.configurationprocessor.json.JSONException;
 import org.springframework.stereotype.Component;
 
 import ua.be.wee.model.nodes.Activity;

+ 2 - 2
src/main/java/ua/be/wee/model/util/AsyncHttpClientService.java

@@ -18,8 +18,8 @@ import org.asynchttpclient.DefaultAsyncHttpClientConfig;
 import org.asynchttpclient.Dsl;
 import org.asynchttpclient.Request;
 import org.asynchttpclient.Response;
-import org.springframework.boot.configurationprocessor.json.JSONException;
-import org.springframework.boot.configurationprocessor.json.JSONObject;
+import org.json.JSONException;
+import org.json.JSONObject;
 
 import ua.be.wee.model.EnactmentController;
 import ua.be.wee.model.nodes.AutomatedActivity;

+ 2 - 7
src/main/java/ua/be/wee/model/util/HTTPRequestClient.java

@@ -7,22 +7,17 @@ import java.net.http.HttpRequest.BodyPublisher;
 import java.net.http.HttpResponse;
 import java.time.Duration;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
-import java.util.stream.Collectors;
 
-import org.springframework.boot.configurationprocessor.json.JSONException;
-import org.springframework.boot.configurationprocessor.json.JSONObject;
+import org.json.JSONException;
+import org.json.JSONObject;
 
-import ua.be.wee.model.nodes.Artifact;
 import ua.be.wee.model.nodes.AutomatedActivity;
-import ua.be.wee.model.nodes.ports.DataInputPort;
-import ua.be.wee.model.pt.TraceArtifact;
 import ua.be.wee.service.FileStorageService;
 import ua.be.wee.service.FileStorageServiceImpl;