Skip to content

Commit

Permalink
Split microprofile.jdt project (#331)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Zegray <ryan.zegray@gmail.com>
  • Loading branch information
rzgry committed Jul 9, 2020
1 parent 4887bc1 commit 1b9e6e1
Show file tree
Hide file tree
Showing 240 changed files with 10,089 additions and 810 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ cache:
- "$HOME/.m2/wrapper"

script:
- "cd microprofile.jdt && ./mvnw clean verify"
- "cd microprofile.jdt && ./mvnw clean install"
- "cd ../quarkus.jdt.ext && ./mvnw clean verify"
- "cd ../microprofile.ls/com.redhat.microprofile.ls && ./mvnw clean install"
- "cd ../../quarkus.ls.ext/com.redhat.quarkus.ls && ./mvnw clean verify"

Expand Down
3 changes: 2 additions & 1 deletion buildAll.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cd microprofile.jdt && .\mvnw.cmd clean verify ^
cd microprofile.jdt && .\mvnw.cmd clean install ^
&& cd ..\quarkus.jdt.ext && .\mvnw.cmd clean verify ^
&& cd ..\microprofile.ls\com.redhat.microprofile.ls && .\mvnw.cmd clean install ^
&& cd ..\..\quarkus.ls.ext\com.redhat.quarkus.ls && .\mvnw.cmd clean verify ^
&& cd ..\..
3 changes: 2 additions & 1 deletion buildAll.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cd microprofile.jdt && ./mvnw clean verify \
cd microprofile.jdt && ./mvnw clean install \
&& cd ../quarkus.jdt.ext && ./mvnw clean verify \
&& cd ../microprofile.ls/com.redhat.microprofile.ls && ./mvnw clean install \
&& cd ../../quarkus.ls.ext/com.redhat.quarkus.ls && ./mvnw clean verify \
&& cd ../..
6 changes: 2 additions & 4 deletions microprofile.jdt/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# quarkus-jdt-ls-extension
# microprofile-jdt-ls-extension

Simple jdt.ls extension which communicates with VSCode-Quarkus.

The main functionality is written in `SampleDelegateCommandHandler.java`.
jdt.ls extension providing MicroProfile support
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
public class JDTMicroProfileProject {

public static final String MICROPROFILE_CONFIG_PROPERTIES_FILE = "META-INF/microprofile-config.properties";

@Deprecated
public static final String APPLICATION_PROPERTIES_FILE = "application.properties";
@Deprecated
public static final String APPLICATION_YAML_FILE = "application.yaml";

private final List<IConfigSource> configSources;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
<bundle id="com.redhat.microprofile.jdt.core" version="0.0.0">
<category name="core"/>
</bundle>
<bundle id="com.redhat.microprofile.jdt.quarkus.source" version="0.0.0">
<category name="sdk"/>
</bundle>
<bundle id="com.redhat.microprofile.jdt.quarkus" version="0.0.0">
<category name="core"/>
</bundle>
<category-def name="core" label="microprofile.jdt.ls extension"/>
<category-def name="sdk" label="microprofile.jdt.ls extension (Developer Resources)"/>
</site>
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Require-Bundle: org.junit,
org.eclipse.buildship.core,
org.eclipse.ltk.core.refactoring,
org.eclipse.text,
com.redhat.microprofile.jdt.core,
com.redhat.microprofile.jdt.quarkus
com.redhat.microprofile.jdt.core
Import-Package: com.google.gson
Export-Package: com.redhat.microprofile.jdt.core,
com.redhat.microprofile.jdt.internal.core,
com.redhat.microprofile.jdt.core.contextpropagation,
com.redhat.microprofile.jdt.core.faulttolerance,
com.redhat.microprofile.jdt.core.health,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!.jar
!*.jar
15 changes: 2 additions & 13 deletions microprofile.jdt/com.redhat.microprofile.jdt.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</parent>
<artifactId>com.redhat.microprofile.jdt.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>quarkus.jdt.ls :: test</name>
<description>quarkus.jdt.ls Test Plugin</description>
<name>microprofile.jdt.ls :: test</name>
<description>microprofile.jdt.ls Test Plugin</description>

<properties>
<deploySourceFolder>${project.build.directory}/projects</deploySourceFolder>
Expand All @@ -26,17 +26,6 @@
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<dependency-resolution>
<extraRequirements>
<requirement>
<id>com.redhat.microprofile.jdt.quarkus</id>
<versionRange>0.0.0</versionRange>
<type>eclipse-plugin</type>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3))
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11-openj9.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3))
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=/Users/fbricon/Dev/GRADLE_CACHE
java.home=/Users/fbricon/.sdkman/candidates/java/11.0.6.hs-adpt
gradle.user.home=
java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11-openj9.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.source=1.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*******************************************************************************
* Copyright (c) 2019 Red Hat Inc. and others.
* All rights reserved. This program and the accompanying materials
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Red Hat Inc. - initial API and implementation
*******************************************************************************/
package com.redhat.microprofile.jdt.core;

import static com.redhat.microprofile.commons.metadata.ItemMetadata.CONFIG_PHASE_BUILD_TIME;
Expand Down Expand Up @@ -30,119 +39,9 @@ public void configItemIntBoolDefaultValueTest() throws Exception {
String booleanDefault = "false";
String intDefault = "0";

assertProperties(infoFromClasspath, 257 /* properties from JAR */ + //
assertProperties(infoFromClasspath,
9 /* properties from Java sources with ConfigProperty */ + //
2 /* properties from Java sources with ConfigRoot */ + //
7 /* static properties from microprofile-context-propagation-api */,

// @ConfigItem(name = ConfigItem.PARENT)
// boolean enable;
p("quarkus-core", "quarkus.log.console.async", "boolean",
"Indicates whether to log asynchronously", true,
"io.quarkus.runtime.logging.AsyncConfig", "enable", null, CONFIG_PHASE_RUN_TIME, booleanDefault),


// @ConfigItem
// boolean enable;
p("quarkus-core", "quarkus.log.file.enable", "boolean",
"If file logging should be enabled", true,
"io.quarkus.runtime.logging.FileConfig", "enable", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem(name = ConfigItem.PARENT)
// boolean enable;
p("quarkus-core", "quarkus.log.file.async", "boolean",
"Indicates whether to log asynchronously", true,
"io.quarkus.runtime.logging.AsyncConfig", "enable", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem
// boolean enable;
p("quarkus-core", "quarkus.log.syslog.enable", "boolean",
"If syslog logging should be enabled", true,
"io.quarkus.runtime.logging.SyslogConfig", "enable", null, CONFIG_PHASE_RUN_TIME, booleanDefault),


// @ConfigItem
// public boolean useCountingFraming;
p("quarkus-core", "quarkus.log.syslog.use-counting-framing", "boolean",
"Set to {@code true} if the message being sent should be prefixed with the size of the message", true,
"io.quarkus.runtime.logging.SyslogConfig", "useCountingFraming", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem
// boolean blockOnReconnect;
p("quarkus-core", "quarkus.log.syslog.block-on-reconnect", "boolean",
"Enables or disables blocking when attempting to reconnect a\n" +
"{@link org.jboss.logmanager.handlers.SyslogHandler.Protocol#TCP\n" +
"TCP} or {@link org.jboss.logmanager.handlers.SyslogHandler.Protocol#SSL_TCP SSL TCP} protocol", true,
"io.quarkus.runtime.logging.SyslogConfig", "blockOnReconnect", null, CONFIG_PHASE_RUN_TIME, booleanDefault),


// @ConfigItem(name = ConfigItem.PARENT)
// boolean enable;
p("quarkus-core", "quarkus.log.syslog.async", "boolean",
"Indicates whether to log asynchronously", true,
"io.quarkus.runtime.logging.AsyncConfig", "enable", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem
// public boolean enabled;
p("quarkus-resteasy-common", "quarkus.resteasy.gzip.enabled", "boolean",
"If gzip is enabled", true,
"io.quarkus.resteasy.common.deployment.ResteasyCommonProcessor.ResteasyCommonConfigGzip", "enabled", null, CONFIG_PHASE_BUILD_TIME, booleanDefault),

// @ConfigItem
// public boolean basic;
p("quarkus-vertx-http", "quarkus.http.auth.basic", "boolean",
"If basic auth should be enabled. If both basic and form auth is enabled then basic auth will be enabled in silent mode.\n" +
"\n" +
"If no authentication mechanisms are configured basic auth is the default.", true,
"io.quarkus.vertx.http.runtime.AuthConfig", "basic", null, CONFIG_PHASE_BUILD_AND_RUN_TIME_FIXED, booleanDefault),

// @ConfigItem
// public boolean enabled;
p("quarkus-vertx-http", "quarkus.http.auth.form.enabled", "boolean",
"If form authentication is enabled", true,
"io.quarkus.vertx.http.runtime.FormAuthConfig", "enabled", null, CONFIG_PHASE_BUILD_AND_RUN_TIME_FIXED, booleanDefault),

// @ConfigItem
// public boolean useAsyncDNS;
p("quarkus-vertx-core", "quarkus.vertx.use-async-dns", "boolean",
"Enables the async DNS resolver.", true,
"io.quarkus.vertx.core.runtime.config.VertxConfiguration", "useAsyncDNS", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem
// public int reconnectAttempts;
p("quarkus-vertx-core", "quarkus.vertx.eventbus.reconnect-attempts", "int",
"The number of reconnection attempts.", true,
"io.quarkus.vertx.core.runtime.config.EventBusConfiguration", "reconnectAttempts", null, CONFIG_PHASE_RUN_TIME, intDefault),

// @ConfigItem
// public boolean reusePort;
p("quarkus-vertx-core", "quarkus.vertx.eventbus.reuse-port", "boolean",
"Whether or not to reuse the port.", true,
"io.quarkus.vertx.core.runtime.config.EventBusConfiguration", "reusePort", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem
// public boolean ssl;
p("quarkus-vertx-core", "quarkus.vertx.eventbus.ssl", "boolean",
"Enables or Disabled SSL.", true,
"io.quarkus.vertx.core.runtime.config.EventBusConfiguration", "ssl", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem
// public boolean tcpKeepAlive;
p("quarkus-vertx-core", "quarkus.vertx.eventbus.tcp-keep-alive", "boolean",
"Whether or not to keep the TCP connection opened (keep-alive).", true,
"io.quarkus.vertx.core.runtime.config.EventBusConfiguration", "tcpKeepAlive", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem
// public boolean trustAll;
p("quarkus-vertx-core", "quarkus.vertx.eventbus.trust-all", "boolean",
"Enables or disables the trust all parameter.", true,
"io.quarkus.vertx.core.runtime.config.EventBusConfiguration", "trustAll", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// @ConfigItem
// public boolean clustered;
p("quarkus-vertx-core", "quarkus.vertx.cluster.clustered", "boolean",
"Enables or disables the clustering.", true,
"io.quarkus.vertx.core.runtime.config.ClusterConfiguration", "clustered", null, CONFIG_PHASE_RUN_TIME, booleanDefault),

// GreetingConstructorResource(
// @ConfigProperty(name = "greeting.constructor.message") String message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,10 @@ public void configQuickstartFromClasspath() throws Exception {
MicroProfileProjectInfo infoFromClasspath = getMicroProfileProjectInfoFromMavenProject(
MavenProjectName.config_quickstart, MicroProfilePropertiesScope.SOURCES_AND_DEPENDENCIES);

assertProperties(infoFromClasspath, 257 /* properties from JAR */ + //
assertProperties(infoFromClasspath,
9 /* properties from Java sources with ConfigProperty */ + //
2 /* properties from Java sources with ConfigRoot */ + //
7 /* static properties from microprofile-context-propagation-api */,

// io.quarkus.deployment.ApplicationConfig
p("quarkus-core", "quarkus.application.name", "java.util.Optional<java.lang.String>",
"The name of the application.\nIf not set, defaults to the name of the project (except for tests where it is not set at all).",
true, "io.quarkus.runtime.ApplicationConfig", "name", null,
CONFIG_PHASE_BUILD_AND_RUN_TIME_FIXED, null),

p("quarkus-core", "quarkus.application.version", "java.util.Optional<java.lang.String>",
"The version of the application.\nIf not set, defaults to the version of the project (except for tests where it is not set at all).",
true, "io.quarkus.runtime.ApplicationConfig", "version", null,
CONFIG_PHASE_BUILD_AND_RUN_TIME_FIXED, null),

// GreetingResource
// @ConfigProperty(name = "greeting.message")
// String message;
Expand Down Expand Up @@ -94,15 +82,7 @@ public void configQuickstartFromClasspath() throws Exception {

// setName(@ConfigProperty(name = "greeting.method.name") Optional<String> name)
p(null, "greeting.method.name", "java.util.Optional", null, false,
"org.acme.config.GreetingMethodResource", null, "setName(QOptional<QString;>;)V", 0, null),

// @ConfigRoot / CustomExtensionConfig / property1
p(null, "quarkus.custom-extension.property1", "java.lang.String", null, false,
"org.acme.config.CustomExtensionConfig", "property1", null, CONFIG_PHASE_BUILD_TIME, null),

// @ConfigRoot / CustomExtensionConfig / property2
p(null, "quarkus.custom-extension.property2", "java.lang.Integer", null, false,
"org.acme.config.CustomExtensionConfig", "property2", null, CONFIG_PHASE_BUILD_TIME, null));
"org.acme.config.GreetingMethodResource", null, "setName(QOptional<QString;>;)V", 0, null));

assertPropertiesDuplicate(infoFromClasspath);
}
Expand All @@ -113,8 +93,7 @@ public void configQuickstartFromJavaSources() throws Exception {
MicroProfileProjectInfo infoFromJavaSources = getMicroProfileProjectInfoFromMavenProject(
MavenProjectName.config_quickstart, MicroProfilePropertiesScope.ONLY_SOURCES);

assertProperties(infoFromJavaSources, 9 /* properties from Java sources with ConfigProperty */ + //
2 /* properties from Java sources with ConfigRoot */,
assertProperties(infoFromJavaSources, 9 /* properties from Java sources with ConfigProperty */,

// GreetingResource
// @ConfigProperty(name = "greeting.message")
Expand Down Expand Up @@ -160,15 +139,7 @@ public void configQuickstartFromJavaSources() throws Exception {

// setName(@ConfigProperty(name = "greeting.method.name") Optional<String> name)
p(null, "greeting.method.name", "java.util.Optional", null, false,
"org.acme.config.GreetingMethodResource", null, "setName(QOptional<QString;>;)V", 0, null),

// @ConfigRoot / CustomExtensionConfig / property1
p(null, "quarkus.custom-extension.property1", "java.lang.String", null, false,
"org.acme.config.CustomExtensionConfig", "property1", null, CONFIG_PHASE_BUILD_TIME, null),

// @ConfigRoot / CustomExtensionConfig / property2
p(null, "quarkus.custom-extension.property2", "java.lang.Integer", null, false,
"org.acme.config.CustomExtensionConfig", "property2", null, CONFIG_PHASE_BUILD_TIME, null));
"org.acme.config.GreetingMethodResource", null, "setName(QOptional<QString;>;)V", 0, null));

assertPropertiesDuplicate(infoFromJavaSources);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void getProjectLabelQuarkusMaven() throws Exception {
IJavaProject quarkusMaven = BasePropertiesManagerTest.loadMavenProject(MavenProjectName.using_vertx);
List<ProjectLabelInfoEntry> projectLabelEntries = ProjectLabelManager.getInstance().getProjectLabelInfo();
assertProjectLabelInfoContainsProject(projectLabelEntries, quarkusMaven);
assertLabels(projectLabelEntries, quarkusMaven, "quarkus", "microprofile", "maven");
assertLabels(projectLabelEntries, quarkusMaven, "microprofile", "maven");
}

@Test
Expand All @@ -59,7 +59,7 @@ public void getProjectLabelQuarkusGradle() throws Exception {
.loadGradleProject(GradleProjectName.quarkus_gradle_project);
List<ProjectLabelInfoEntry> projectLabelEntries = ProjectLabelManager.getInstance().getProjectLabelInfo();
assertProjectLabelInfoContainsProject(projectLabelEntries, quarkusGradle);
assertLabels(projectLabelEntries, quarkusGradle, "quarkus", "microprofile", "gradle");
assertLabels(projectLabelEntries, quarkusGradle, "microprofile", "gradle");
}

@Test
Expand All @@ -72,8 +72,8 @@ public void getProjectLabelMultipleProjects() throws Exception {
List<ProjectLabelInfoEntry> projectLabelEntries = ProjectLabelManager.getInstance().getProjectLabelInfo();

assertProjectLabelInfoContainsProject(projectLabelEntries, quarkusMaven, quarkusGradle, maven, gradle);
assertLabels(projectLabelEntries, quarkusMaven, "quarkus", "microprofile", "maven");
assertLabels(projectLabelEntries, quarkusGradle, "quarkus", "microprofile", "gradle");
assertLabels(projectLabelEntries, quarkusMaven, "microprofile", "maven");
assertLabels(projectLabelEntries, quarkusGradle, "microprofile", "gradle");
assertLabels(projectLabelEntries, maven, "maven");
assertLabels(projectLabelEntries, gradle, "gradle");
}
Expand Down

0 comments on commit 1b9e6e1

Please sign in to comment.