Skip to content

Commit

Permalink
Merge pull request #257 from hhpatel14/MTA-4035
Browse files Browse the repository at this point in the history
Update sources and targets to match mta-cli 7.1.1, and parsing method to generate correct tree
  • Loading branch information
dymurray authored Nov 20, 2024
2 parents 54196b2 + dc58e31 commit 7905d91
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jboss.tools.intellij.windup.cli;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import org.jboss.tools.intellij.windup.model.WindupConfiguration.*;
Expand All @@ -22,6 +23,9 @@ public static List<Ruleset> parseRuleset(String resultFilePath) {
currentThread.setContextClassLoader(jacksonClassLoader);

ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory());
// Configure to ignore unknown properties
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

File yamlFile = new File(resultFilePath);
List<WindupConfiguration.Ruleset> ruleSets = objectMapper.readValue(
yamlFile, new TypeReference<List<WindupConfiguration.Ruleset>>(){}
Expand Down Expand Up @@ -78,9 +82,9 @@ public static void parseIncidents (List<WindupConfiguration.Ruleset> rulesets, W
String input = inputs.get(0);
String filePath = incident.getUri();;
incident.ruleId = entry.getKey();
String absolutePath = filePath.substring(filePath.indexOf("/source-code") + "/source-code".length());
// System.out.println("input: " + input);
// System.out.println("Absolute path: "+input + absolutePath);
//System.out.println("-----------filePath-------------: " + filePath);
String absolutePath = filePath.substring(filePath.indexOf("/opt/input/source") + "/opt/input/source".length());
// System.out.println("------------------ Absolute path -------------: " + input + absolutePath);
incident.file = input + absolutePath;
incident.setUri(input + absolutePath);
// System.out.println("File path of the incidents: " + incident.file);
Expand Down
115 changes: 85 additions & 30 deletions src/main/resources/META-INF/web/webroot/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,83 @@
"ui-type": ["select-many", "text"],
"required": true,
"available-options": [
"azure",
"camel",
"camel2",
"camel3",
"camel3.1",
"camel3.10",
"camel3.11",
"camel3.12",
"camel3.13",
"camel3.14",
"camel3.15",
"camel3.16",
"camel3.17",
"camel3.18",
"camel3.19",
"camel3.2",
"camel3.20",
"camel3.21",
"camel3.3",
"camel3.4",
"camel3.5",
"camel3.6",
"camel3.7",
"camel3.8",
"camel3.9",
"camel4",
"cloud",
"camel4.1",
"cloud-readiness",
"discovery",
"drools",
"drools6",
"eap",
"eap6",
"eap7",
"eap7.1",
"eap8",
"eapxp",
"eapxp2",
"eapxp3",
"eapxp5",
"fsw",
"fsw6",
"fuse",
"fuse6",
"hibernate",
"jakarta",
"java",
"hibernate-search",
"hibernate-search5",
"hibernate4",
"hibernate5",
"hibernate5.1",
"hibernate5.3",
"hibernate6",
"hibernate6.1",
"hibernate6.2",
"jakarta-ee",
"jakarta-ee8",
"jakarta-ee9",
"java-ee",
"java-ee6",
"java-ee7",
"jbpm",
"jbpm6",
"jws",
"jws6",
"linux",
"openjdk",
"openjdk11",
"openjdk17",
"openjdk18",
"openjdk19",
"openjdk20",
"openjdk21",
"openjdk7",
"openliberty",
"quarkus",
"quarkus3",
"resteasy",
"resteasy3",
"rhr"
],
"editable": true
Expand All @@ -65,57 +117,60 @@
"ui-type": ["select-many", "text"],
"required": false,
"available-options": [
"agroal",
"amazon",
"apicurio",
"artemis",
"avro",
"camel",
"config",
"camel2",
"camel3",
"drools",
"drools5",
"eap",
"eap4",
"eap5",
"eap6",
"eap7",
"eap8",
"eap7.0",
"eap7.1",
"eapxp",
"elytron",
"flyway",
"glassfish",
"hibernate",
"hibernate-search",
"hibernate-search4",
"hibernate3.9",
"hibernate4",
"hibernate5.0",
"hibernate5.1",
"jakarta-ee",
"jakarta-ee7",
"java",
"java-ee",
"jbpm",
"jboss",
"javaee",
"jdbs",
"jbpm",
"jbpm5",
"jonas",
"jrun",
"jsonb",
"jsonp",
"kafka",
"keycloak",
"kubernetes",
"liquibase",
"log4j",
"logging",
"micrometer",
"narayana",
"openjdk",
"openjdk11",
"openshift",
"opentelemetry",
"openjdk18",
"openjdk19",
"openjdk20",
"openjdk21",
"openjdk8",
"oraclejdk",
"oraclejdk7",
"orion",
"picocli",
"resin",
"resteasy",
"resteasy2",
"rmi",
"rpc",
"seam",
"seam2",
"soa",
"spring",
"spring-boot",
"soa-p",
"soa-p5",
"sonic",
"sonicesb",
"springboot",
"thorntail",
"weblogic",
"websphere"
Expand Down

0 comments on commit 7905d91

Please sign in to comment.