Skip to content

Commit

Permalink
updating ol features list xsd, xml and json to 24.0.0.9 features (#302)
Browse files Browse the repository at this point in the history
* updating ol features list xsd, xml and json to 24.0.0.9 features

Signed-off-by: Arun Venmany <[email protected]>

* updating ol features list xsd, xml and json to 24.0.0.9 features

Signed-off-by: Arun Venmany <[email protected]>

---------

Signed-off-by: Arun Venmany <[email protected]>
  • Loading branch information
arunvenmany-ibm authored Sep 12, 2024
1 parent f110acb commit 9de2a28
Show file tree
Hide file tree
Showing 16 changed files with 27,209 additions and 188,091 deletions.
2 changes: 1 addition & 1 deletion lemminx-liberty/src/it/schema-gen-ol-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<runtimeArtifact>
<groupId>io.openliberty</groupId>
<artifactId>openliberty-runtime</artifactId>
<version>24.0.0.8</version>
<version>24.0.0.9</version>
</runtimeArtifact>
</configuration>
<executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testWorkspace() throws BadLocationException, IOException, URISyntaxE
testWorkspaceFolders.add(testWorkspace);
LibertyProjectsManager.getInstance().setWorkspaceFolders(testWorkspaceFolders);

String schemaFileName = "ol-24.0.0.8.xsd";
String schemaFileName = "ol-24.0.0.9.xsd";
File schemaFile = new File(LibertyUtils.getTempDir(LibertyProjectsManager.getInstance().getWorkspaceFolder(serverXmlFile.toURI().toString())), schemaFileName);
String serverGenXSDURI = schemaFile.toPath().toUri().toString().replace("///", "/");

Expand Down Expand Up @@ -79,8 +79,8 @@ public void testGetFeatures() throws BadLocationException {

CompletionItem jaxrsCompletion = c("jaxrs-2.1", "jaxrs-2.1");

// would be 337 if mpConfig-1.4 was not already specified - this is using ol-24.0.0.8
final int TOTAL_ITEMS = 337; // total number of available completion items
// would be 344 if mpConfig-1.4 was not already specified - this is using ol-24.0.0.9
final int TOTAL_ITEMS = 344; // total number of available completion items

XMLAssert.testCompletionFor(serverXML, null, serverXmlFile.toURI().toString(), TOTAL_ITEMS, jaxrsCompletion);

Expand All @@ -89,7 +89,7 @@ public void testGetFeatures() throws BadLocationException {
XMLAssert.testCompletionFor(serverXML, null, serverXmlFile.toURI().toString(), TOTAL_ITEMS, websocket);

// Verify that a feature list was NOT generated. It should have downloaded the features.json from Maven Central.
String featureListName = "featurelist-ol-24.0.0.8.xml";
String featureListName = "featurelist-ol-24.0.0.9.xml";
File featurelistFile = new File(LibertyUtils.getTempDir(LibertyProjectsManager.getInstance().getWorkspaceFolder(serverXmlFile.toURI().toString())), featureListName);

org.junit.jupiter.api.Assertions.assertFalse(featurelistFile.exists(), "Found unexpected generated featurelist file: "+featureListName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public class LibertyXSDURIResolver implements URIResolverExtension, IExternalGra

// Changing this to contain the version in the file name since the file is copied to the local .lemminx cache.
// This is how we ensure the latest default server schema gets used in each developer environment.
private static final String XSD_RESOURCE_URL = "https://github.com/OpenLiberty/liberty-language-server/blob/master/lemminx-liberty/src/main/resources/schema/xsd/liberty/server-cached-24.0.0.8.xsd";
private static final String XSD_CLASSPATH_LOCATION = "/schema/xsd/liberty/server-cached-24.0.0.8.xsd";
private static final String XSD_RESOURCE_URL = "https://github.com/OpenLiberty/liberty-language-server/blob/master/lemminx-liberty/src/main/resources/schema/xsd/liberty/server-cached-24.0.0.9.xsd";
private static final String XSD_CLASSPATH_LOCATION = "/schema/xsd/liberty/server-cached-24.0.0.9.xsd";

/**
* SERVER_XSD_RESOURCE is the server schema that is located at XSD_CLASSPATH_LOCATION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public class FeatureService {

// This file is copied to the local .lemminx cache.
// This is how we ensure the latest default featurelist xml gets used in each developer environment.
private static final String FEATURELIST_XML_RESOURCE_URL = "https://github.com/OpenLiberty/liberty-language-server/blob/master/lemminx-liberty/src/main/resources/featurelist-cached-24.0.0.8.xml";
private static final String FEATURELIST_XML_CLASSPATH_LOCATION = "/featurelist-cached-24.0.0.8.xml";
private static final String FEATURELIST_XML_RESOURCE_URL = "https://github.com/OpenLiberty/liberty-language-server/blob/master/lemminx-liberty/src/main/resources/featurelist-cached-24.0.0.9.xml";
private static final String FEATURELIST_XML_CLASSPATH_LOCATION = "/featurelist-cached-24.0.0.9.xml";

/**
* FEATURELIST_XML_RESOURCE is the featurelist xml that is located at FEATURELIST_XML_CLASSPATH_LOCATION
Expand Down Expand Up @@ -139,7 +139,7 @@ private List<Feature> getDefaultFeatures() {
if (defaultFeatures == null) {
// Changing this to contain the version in the file name since the file is copied to the local .lemminx cache.
// This is how we ensure the latest default features json gets used in each developer environment.
InputStream is = getClass().getClassLoader().getResourceAsStream("features-cached-24.0.0.8.json");
InputStream is = getClass().getClassLoader().getResourceAsStream("features-cached-24.0.0.9.json");
InputStreamReader reader = new InputStreamReader(is, StandardCharsets.UTF_8);

// Only need the public features
Expand Down
Loading

0 comments on commit 9de2a28

Please sign in to comment.