Upgrade LS to Boot 3.1
This commit is contained in:
@@ -5,4 +5,4 @@ cd ../headless-services
|
||||
./mvnw clean install -Dmaven.test.skip=true
|
||||
|
||||
cd $workdir
|
||||
./mvnw -Psnapshot -Pe426 clean install -Dmaven.test.skip=true
|
||||
./mvnw -Psnapshot -Pe428 clean install -Dmaven.test.skip=true
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
<configuration>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- encoders are assigned the type
|
||||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
|
||||
<configuration>
|
||||
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
|
||||
<import class="ch.qos.logback.core.ConsoleAppender"/>
|
||||
|
||||
<appender name="STDOUT" class="ConsoleAppender">
|
||||
<target>System.err</target>
|
||||
<encoder>
|
||||
<encoder class="PatternLayoutEncoder">
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<root level="OFF">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
-->
|
||||
</configuration>
|
||||
@@ -13,7 +13,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.1.1</version>
|
||||
<relativePath></relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration combine.self="append">
|
||||
<argLine>--add-opens app/app=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED</argLine>
|
||||
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
languageserver.extension-id=vscode-concourse
|
||||
spring.main.banner-mode=off
|
||||
logging.level.org.springframework.ide.vscode.commons.languageserver.util.CompletionServerCapabilityRegistration=debug
|
||||
languageserver.completion-trigger-characters.concourse-task-yaml=abcdefghijklmnopqrsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_
|
||||
languageserver.completion-trigger-characters.concourse-pipeline-yaml=abcdefghijklmnopqrsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
logging:
|
||||
level:
|
||||
org:
|
||||
springframework:
|
||||
ide:
|
||||
vscode: debug
|
||||
@@ -1,17 +1,18 @@
|
||||
<configuration>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- encoders are assigned the type
|
||||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
|
||||
<configuration>
|
||||
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
|
||||
<import class="ch.qos.logback.core.ConsoleAppender"/>
|
||||
|
||||
<appender name="STDOUT" class="ConsoleAppender">
|
||||
<target>System.err</target>
|
||||
<encoder>
|
||||
<encoder class="PatternLayoutEncoder">
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<root level="OFF">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
-->
|
||||
</configuration>
|
||||
@@ -1,17 +1,18 @@
|
||||
<configuration>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- encoders are assigned the type
|
||||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
|
||||
<configuration>
|
||||
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
|
||||
<import class="ch.qos.logback.core.ConsoleAppender"/>
|
||||
|
||||
<appender name="STDOUT" class="ConsoleAppender">
|
||||
<target>System.err</target>
|
||||
<encoder>
|
||||
<encoder class="PatternLayoutEncoder">
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<root level="OFF">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
-->
|
||||
</configuration>
|
||||
@@ -53,18 +53,20 @@ public class PropertiesLoader {
|
||||
private ConfigurationMetadataRepositoryJsonBuilder builder = ConfigurationMetadataRepositoryJsonBuilder.create();
|
||||
|
||||
public ConfigurationMetadataRepository load(IClasspath classPath) {
|
||||
try {
|
||||
IClasspathUtil.getBinaryRoots(classPath, (cpe) -> !cpe.isSystem()).forEach(fileEntry -> {
|
||||
if (fileEntry.exists()) {
|
||||
if (fileEntry.isDirectory()) {
|
||||
loadFromOutputFolder(fileEntry.toPath());
|
||||
} else {
|
||||
loadFromJar(fileEntry.toPath());
|
||||
if (classPath != null) {
|
||||
try {
|
||||
IClasspathUtil.getBinaryRoots(classPath, (cpe) -> !cpe.isSystem()).forEach(fileEntry -> {
|
||||
if (fileEntry.exists()) {
|
||||
if (fileEntry.isDirectory()) {
|
||||
loadFromOutputFolder(fileEntry.toPath());
|
||||
} else {
|
||||
loadFromJar(fileEntry.toPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
LOG.log(Level.SEVERE, "Failed to retrieve classpath", e);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
LOG.log(Level.SEVERE, "Failed to retrieve classpath", e);
|
||||
}
|
||||
}
|
||||
ConfigurationMetadataRepository repository = builder.build();
|
||||
return repository;
|
||||
|
||||
@@ -57,9 +57,9 @@ public class LoggerNameProviderTest {
|
||||
@BeforeEach
|
||||
public void setup() throws Exception {
|
||||
CachingValueProvider.TIMEOUT = Duration.ofSeconds(20);
|
||||
System.out.println("Setting test up.");
|
||||
// System.out.println("Setting test up.");
|
||||
project = projects.mavenProject("tricky-getters-boot-1.3.1-app");
|
||||
System.out.println("Done setting test up: ");
|
||||
// System.out.println("Done setting test up: ");
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@@ -69,7 +69,7 @@ public class LoggerNameProviderTest {
|
||||
|
||||
@Test
|
||||
void directResults() throws Exception {
|
||||
System.out.println("directResults() - start");
|
||||
// System.out.println("directResults() - start");
|
||||
LoggerNameProvider p = create();
|
||||
String query = "jboss";
|
||||
List<String> directQueryResults = getResults(p, query);
|
||||
@@ -81,12 +81,12 @@ public class LoggerNameProviderTest {
|
||||
*/
|
||||
// assertElements(directQueryResults, JBOSS_RESULTS);
|
||||
assertElementsAtLeast(directQueryResults, JBOSS_RESULTS);
|
||||
System.out.println("directResults() - end");
|
||||
// System.out.println("directResults() - end");
|
||||
}
|
||||
|
||||
@Test
|
||||
void cachedResults() throws Exception {
|
||||
System.out.println("cachedResults() - start");
|
||||
// System.out.println("cachedResults() - start");
|
||||
LoggerNameProvider p = create();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
@@ -100,14 +100,14 @@ public class LoggerNameProviderTest {
|
||||
assertElementsAtLeast(directQueryResults, JBOSS_RESULTS);
|
||||
|
||||
long duration = System.currentTimeMillis() - startTime;
|
||||
System.out.println(i + ": " + duration + " ms");
|
||||
// System.out.println(i + ": " + duration + " ms");
|
||||
}
|
||||
System.out.println("cachedResults() - end");
|
||||
// System.out.println("cachedResults() - end");
|
||||
}
|
||||
|
||||
@Test
|
||||
void incrementalResults() throws Exception {
|
||||
System.out.println("incrementalResults() - start");
|
||||
// System.out.println("incrementalResults() - start");
|
||||
String fullQuery = "jboss";
|
||||
|
||||
LoggerNameProvider p = create();
|
||||
@@ -116,14 +116,14 @@ public class LoggerNameProviderTest {
|
||||
List<String> results = getResults(p, query);
|
||||
// dumpResults(query, results);
|
||||
if (i == fullQuery.length()) {
|
||||
System.out.println("Verifying final result!");
|
||||
// System.out.println("Verifying final result!");
|
||||
//Not checking for exact equals because... quircks of JDT search engine means it
|
||||
// will actually finds less results than if we derive them by filtering incrementally.
|
||||
//If all works well, we should never find fewer results than Eclipse does.
|
||||
assertElementsAtLeast(results, JBOSS_RESULTS);
|
||||
}
|
||||
}
|
||||
System.out.println("incrementalResults() - end");
|
||||
// System.out.println("incrementalResults() - end");
|
||||
}
|
||||
|
||||
private LoggerNameProvider create() {
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<configuration>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- encoders are assigned the type
|
||||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
|
||||
<configuration>
|
||||
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
|
||||
<import class="ch.qos.logback.core.ConsoleAppender"/>
|
||||
|
||||
<appender name="STDOUT" class="ConsoleAppender">
|
||||
<target>System.err</target>
|
||||
<encoder>
|
||||
<encoder class="PatternLayoutEncoder">
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--
|
||||
<root level="info">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<root level="OFF">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
-->
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user