Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - Create Picocli example codestart for Quarkus JBang project type #13826

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
ce87437
Adding picocli codestart
jtama Dec 2, 2020
3ab9121
Add exposed option to ResourceProperties
Nov 27, 2020
19edc83
Add RuntimeInitializedPackageBuildItem
zachgk Oct 27, 2020
9ff7e16
Add a proper warning in RuntimeInitializedPackageBuildItem
gsmet Dec 7, 2020
298cad3
Bump caffeine from 2.8.6 to 2.8.7
dependabot[bot] Dec 7, 2020
2eec59f
Use setters for Person
cdhermann Dec 7, 2020
d5d4ba6
SmallRye GraphQL 1.0.19 + tests for context propagation
jmartisk Nov 27, 2020
be7a2b3
Introduce new quarkus cli command create-jbang
geoandri Dec 7, 2020
880846a
Convert test logging level to debug
geoand Dec 8, 2020
1bf0de4
Remove an unnecessary modification of MetadataSources
yrodiere Dec 8, 2020
8e35c63
Support package names in PersistenceUnitDescriptor#getManagedClassNam…
yrodiere Dec 8, 2020
7f0d9f4
Scan for packages in the Hibernate ORM extension
yrodiere Dec 8, 2020
b804254
Test package-level annotations in the ORM extension
yrodiere Dec 8, 2020
c579cd3
Move a few indexing utils to IndexingUtil
yrodiere Dec 8, 2020
bfc5da6
Test that hardcoded lists of Hibernate ORM annotations stay up-to-date
yrodiere Dec 8, 2020
8ac4edb
Fix NPE in BytecodeRecorderImpl
yrodiere Dec 8, 2020
7fa2bed
Bump flyway-core from 7.3.0 to 7.3.1
dependabot[bot] Dec 8, 2020
257f4a4
Handle null gradle resource directory in dev mode
glefloch Dec 7, 2020
793cc5f
Simplify the form of CDI doc
gsmet Dec 9, 2020
e9c51a7
Update DefaultTokenStateManager to remove all session cookies when to…
sberyozkin Dec 8, 2020
2fc6833
Remove a few things handled by the bot from COMMITTERS.adoc
gsmet Dec 9, 2020
1b9c686
Create basic structure for k8s service binding handling
geoand Dec 7, 2020
84008d2
Add bare-bones example of PostgreSQL k8s service binding handling
geoand Dec 7, 2020
d208f56
micrometer export class member visibility
ebullient Dec 4, 2020
9f46e44
Move optional micrometer registries to quarkiverse extensions
ebullient Dec 8, 2020
9154e6e
Support SmallRye Config 1.10.0.
radcortez Dec 8, 2020
be760d9
Provide M2Eclipse metadata to silence errors in Eclipse
gsmet Dec 9, 2020
d01d4d4
Added link to cache quickstart in cache guide
saumya1singh Dec 9, 2020
6d5ff7f
Added link of gettingstarted quickstart in Getting Started guide
saumya1singh Dec 9, 2020
1b601fc
Added link of gettingstarted testing quickstart in Getting Started T…
saumya1singh Dec 9, 2020
a97f37e
Added link of JMS quickstart in JMS guide
saumya1singh Dec 9, 2020
9eff64b
Properly close the app launched in devmode from the IDE
aloubyansky Dec 7, 2020
181f6fd
Bump caffeine from 2.8.7 to 2.8.8
dependabot[bot] Dec 9, 2020
2114fd7
Quarkus ArC integration refactoring
mkouba Dec 4, 2020
656d604
Bump jib-core to 0.16.0
gastaldi Dec 9, 2020
f3ac461
Bump awssdk.version from 2.15.38 to 2.15.43
dependabot[bot] Dec 9, 2020
b1bdb56
Remove unused test injection code
stuartwdouglas Dec 10, 2020
d8be799
RESTEasy Reactive: Move more logic outside Quarkus
stuartwdouglas Nov 27, 2020
599e192
Add .env to .gitignore in generated projects
gsmet Dec 9, 2020
044b678
Qute type-safe templates: fix parameter assignability check
mkouba Dec 10, 2020
841760b
Fix the name of the Hibernate Search ORM + Elasticsearch extension in…
yrodiere Dec 7, 2020
30d666c
Factorize two nearly identical PersistenceProviderResolvers
yrodiere Dec 7, 2020
10ef158
Register Hibernate ORM integration listeners through build items
yrodiere Dec 7, 2020
36392b8
Separate HibernateOrmIntegration build items per persistence unit
yrodiere Dec 7, 2020
9b2386a
Per-PU configuration of Hibernate Search
yrodiere Dec 7, 2020
11c23bc
Disable Hibernate Search per PU when no indexed entities are found
yrodiere Dec 8, 2020
0afe5b7
Test Hibernate Search in multi-PU mode with one PU not using Hibernat…
yrodiere Dec 8, 2020
0936ea8
Clarify expectations in NoConfigIndexedEntityTest
yrodiere Dec 8, 2020
041e710
Remove dangling callout in Hibernate ORM documentation
yrodiere Dec 8, 2020
f30dcb3
Document multi-PU support in Hibernate Search
yrodiere Dec 8, 2020
21c288e
Prepare removal of transformed caching interceptor bindings
gwenneg Nov 30, 2020
5761ad1
process classes so field access can be replaced
evanchooly Dec 7, 2020
5b1e899
Remove the now useless em field from Hibernate Search ORM guide
gsmet Dec 10, 2020
cade32d
Ensure than an exception during serialization of json is properly han…
geoand Dec 10, 2020
d3eb31e
Allow repeatable interceptor bindings
Ladicek Nov 30, 2020
860dee9
Upgrade to Hibernate Search 6.0.0.Final
yrodiere Dec 7, 2020
7664478
Rely on SPI for Hibernate Search code substitutions
yrodiere Dec 7, 2020
2af5eea
Rely on SPIs to declare necessary reflection for Hibernate Search
yrodiere Dec 7, 2020
e94dff5
Stop suggesting that Hibernate Search 6 is work in progress
yrodiere Dec 10, 2020
21947b0
fix(k8s-service-binding): add missing ConfigItem in the service bindi…
machi1990 Dec 10, 2020
403cc79
First attempt to create Picocli example codestart for Quarkus JBang
nicobao Dec 9, 2020
182101d
Create Picocli codestart for Quarkus Jbang project type
nicobao Dec 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ updates:
- dependency-name: commons-io:commons-io
# Micrometer
- dependency-name: io.micrometer:micrometer-bom
- dependency-name: io.micrometer:micrometer-registry-stackdriver
# BouncyCastle
- dependency-name: org.bouncycastle:bcprov-jdk15on
- dependency-name: org.bouncycastle:bctls-jdk15on
Expand Down
2 changes: 1 addition & 1 deletion .github/native-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
{
"category": "Misc4",
"timeout": 65,
"test-modules": "smallrye-config smallrye-graphql picocli-native gradle micrometer-mp-metrics micrometer-native micrometer-prometheus smallrye-metrics logging-json jaxp"
"test-modules": "smallrye-config smallrye-graphql picocli-native gradle micrometer-mp-metrics micrometer-prometheus smallrye-metrics logging-json jaxp"
},
{
"category": "Spring",
Expand Down
8 changes: 1 addition & 7 deletions COMMITTERS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ While not absolute, here is some advice:
you should affect this milestone to it so that we can be sure it stays on the radar.
* If you think a pull request is worth mentioning in the release notes and/or
the announcement blog post, add the `release/noteworthy-feature` label.
* When merging a pull request, please affect the corresponding milestone to the pull request
and the resolved issues.
The current master branch is marked with ` - master` on GitHub.
Do NOT affect a PR to an old branch, see the <<backporting-process,backporting process>> for more details.
* Do NOT affect a PR to an old branch, see the <<backporting-process,backporting process>> for more details.

Obviously, each situation is different so use your own judgement,
and if in doubt, just ask for advice, the other committers are here to help.
Expand Down Expand Up @@ -182,9 +179,6 @@ some of the "excluding" labels.

Thus:

* When you merge a pull request, please affect it with the current milestone marked with "master".
* If the pull request has issues associated (i.e. if the pull request fixes some issues),
you should also affect the milestone assigned to the issues.
* If you close a pull request because the committers have decided to not merge it,
please add the appropriate `triage/` label: `triage/invalid`, `triage/out-of-date`,
`triage/wontfix` are usually in order.
Expand Down
80 changes: 21 additions & 59 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
<microprofile-reactive-streams-operators.version>1.0.1</microprofile-reactive-streams-operators.version>
<microprofile-rest-client.version>1.4.1</microprofile-rest-client.version>
<smallrye-common.version>1.5.0</smallrye-common.version>
<smallrye-config.version>1.9.3</smallrye-config.version>
<smallrye-config.version>1.10.0</smallrye-config.version>
<smallrye-health.version>2.2.5</smallrye-health.version>
<smallrye-metrics.version>2.4.4</smallrye-metrics.version>
<smallrye-open-api.version>2.0.16</smallrye-open-api.version>
<smallrye-graphql.version>1.0.18</smallrye-graphql.version>
<smallrye-graphql.version>1.0.19</smallrye-graphql.version>
<smallrye-opentracing.version>1.3.4</smallrye-opentracing.version>
<smallrye-fault-tolerance.version>4.3.2</smallrye-fault-tolerance.version>
<smallrye-jwt.version>2.4.0</smallrye-jwt.version>
Expand Down Expand Up @@ -93,7 +93,7 @@
<hibernate-orm.version>5.4.25.Final</hibernate-orm.version>
<hibernate-reactive.version>1.0.0.Beta1</hibernate-reactive.version>
<hibernate-validator.version>6.1.6.Final</hibernate-validator.version>
<hibernate-search.version>6.0.0.CR2</hibernate-search.version>
<hibernate-search.version>6.0.0.Final</hibernate-search.version>
<narayana.version>5.10.6.Final</narayana.version>
<jboss-transaction-api_1.2_spec.version>1.1.1.Final</jboss-transaction-api_1.2_spec.version>
<agroal.version>1.9</agroal.version>
Expand Down Expand Up @@ -131,7 +131,7 @@
<json-smart.version>2.3</json-smart.version>
<infinispan.version>11.0.4.Final</infinispan.version>
<infinispan.protostream.version>4.3.4.Final</infinispan.protostream.version>
<caffeine.version>2.8.6</caffeine.version>
<caffeine.version>2.8.8</caffeine.version>
<netty.version>4.1.49.Final</netty.version>
<reactive-streams.version>1.0.3</reactive-streams.version>
<jboss-logging.version>3.4.1.Final</jboss-logging.version>
Expand All @@ -148,7 +148,7 @@
<aws-lambda-java-events.version>3.6.0</aws-lambda-java-events.version>
<aws-lambda-serverless-java-container.version>1.3.1</aws-lambda-serverless-java-container.version>
<aws-xray.version>2.4.0</aws-xray.version>
<awssdk.version>2.15.38</awssdk.version>
<awssdk.version>2.15.43</awssdk.version>
<aws-alexa-sdk.version>2.37.1</aws-alexa-sdk.version>
<azure-functions-java-library.version>1.3.0</azure-functions-java-library.version>
<kotlin.version>1.4.20</kotlin.version>
Expand All @@ -160,7 +160,7 @@
<jprocesses.version>1.6.5</jprocesses.version>
<jboss-logmanager.version>1.0.6</jboss-logmanager.version>
<jgit.version>5.8.0.202006091008-r</jgit.version>
<flyway.version>7.3.0</flyway.version>
<flyway.version>7.3.1</flyway.version>
<yasson.version>1.0.8</yasson.version>
<liquibase.version>4.2.0</liquibase.version>
<snakeyaml.version>1.27</snakeyaml.version>
Expand Down Expand Up @@ -191,7 +191,7 @@
<jzlib.version>1.1.1</jzlib.version>
<checker-qual.version>2.5.2</checker-qual.version>
<error-prone-annotations.version>2.2.0</error-prone-annotations.version>
<jib-core.version>0.15.0</jib-core.version>
<jib-core.version>0.16.0</jib-core.version>
<google-http-client.version>1.34.0</google-http-client.version>
<scram-client.version>2.1</scram-client.version>
<!-- Make sure to check compatibility between these 2 gRPC components before upgrade -->
Expand Down Expand Up @@ -1943,6 +1943,16 @@
<artifactId>quarkus-kubernetes-client-deployment-internal</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-kubernetes-service-binding</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-kubernetes-service-binding-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-openshift-client</artifactId>
Expand Down Expand Up @@ -2769,6 +2779,10 @@
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -4801,58 +4815,6 @@
<version>${grpc.version}</version>
</dependency>

<!-- Micrometer -->
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
<version>${threetenbp.version}</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-stackdriver</artifactId>
<version>${micrometer.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.android</groupId>
<artifactId>annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
<version>${google-auth.version}</version>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-credentials</artifactId>
<version>${google-auth.version}</version>
</dependency>

<!-- Picocli -->
<dependency>
<groupId>info.picocli</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public enum Capability {
SECURITY_ELYTRON_LDAP,
SECURITY_JPA,
QUARTZ,
KUBERNETES_SERVICE_BINDING,
/**
* @deprecated
* @see io.quarkus.deployment.metrics.MetricsCapabilityBuildItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import io.quarkus.builder.item.MultiBuildItem;

/**
* A class that will be initialized at runtime in native mode.
*/
public final class RuntimeInitializedClassBuildItem extends MultiBuildItem {

private final String className;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.quarkus.deployment.builditem.nativeimage;

import io.quarkus.builder.item.MultiBuildItem;

/**
* A package that will be initialized at runtime in native mode.
* <p>
* WARNING: this build item should not be used in Quarkus itself and is only provided
* to simplify the early stages of external extensions development.
* <p>
* For Quarkus development, please take the time to surgically mark individual classes as runtime initialized.
*/
public final class RuntimeInitializedPackageBuildItem extends MultiBuildItem {

private final String packageName;

public RuntimeInitializedPackageBuildItem(String packageName) {
this.packageName = packageName;
}

public String getPackageName() {
return packageName;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.deployment.dev;

import java.io.Closeable;
import java.io.File;
import java.nio.file.Path;
import java.util.Collections;
Expand All @@ -20,11 +21,12 @@
import io.quarkus.bootstrap.util.QuarkusModelHelper;
import io.quarkus.bootstrap.utils.BuildToolHelper;

@SuppressWarnings("unused")
public class IDEDevModeMain implements BiConsumer<CuratedApplication, Map<String, Object>> {
public class IDEDevModeMain implements BiConsumer<CuratedApplication, Map<String, Object>>, Closeable {

private static final Logger log = Logger.getLogger(IDEDevModeMain.class.getName());

private IsolatedDevModeMain delegate;

@Override
public void accept(CuratedApplication curatedApplication, Map<String, Object> stringObjectMap) {
Path appClasses = (Path) stringObjectMap.get("app-classes");
Expand Down Expand Up @@ -58,10 +60,23 @@ public void accept(CuratedApplication curatedApplication, Map<String, Object> st
log.error("Failed to load workspace, hot reload will not be available", e);
}

new IsolatedDevModeMain().accept(curatedApplication,
terminateIfRunning();
delegate = new IsolatedDevModeMain();
delegate.accept(curatedApplication,
Collections.singletonMap(DevModeContext.class.getName(), devModeContext));
}

@Override
public void close() {
terminateIfRunning();
}

private void terminateIfRunning() {
if (delegate != null) {
delegate.close();
}
}

private DevModeContext.ModuleInfo toModule(WorkspaceModule module) throws BootstrapGradleException {
AppArtifactKey key = new AppArtifactKey(module.getArtifactCoords().getGroupId(),
module.getArtifactCoords().getArtifactId(), module.getArtifactCoords().getClassifier());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ Set<String> checkForFileChange() {
outputPath = rootPath;
doCopy = false;
}
if (rootPath == null) {
if (rootPath == null || outputPath == null) {
continue;
}
Path root = Paths.get(rootPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,22 @@

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.ProviderNotFoundException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;

import org.jboss.jandex.CompositeIndex;
import org.jboss.jandex.Index;
import org.jboss.jandex.IndexReader;
import org.jboss.jandex.IndexView;
import org.jboss.jandex.Indexer;
import org.jboss.logging.Logger;
Expand Down Expand Up @@ -55,11 +49,6 @@ public class ApplicationArchiveBuildStep {

private static final Logger LOGGER = Logger.getLogger(ApplicationArchiveBuildStep.class);

private static final String JANDEX_INDEX = "META-INF/jandex.idx";

// At least Jandex 2.1 is needed
private static final int REQUIRED_INDEX_VERSION = 8;

IndexDependencyConfiguration config;

@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
Expand Down Expand Up @@ -125,7 +114,7 @@ private List<ApplicationArchive> scanForOtherIndexes(QuarkusBuildCloseablesBuild

//get paths that are included via marker files
Set<String> markers = new HashSet<>(applicationArchiveFiles);
markers.add(JANDEX_INDEX);
markers.add(IndexingUtil.JANDEX_INDEX);
addMarkerFilePaths(markers, root, curateOutcomeBuildItem, indexedPaths, appArchives, buildCloseables, classLoader,
indexCache);

Expand Down Expand Up @@ -271,47 +260,19 @@ private static Index indexFilePath(Path path) throws IOException {
return indexer.complete();
}

private static Index handleJarPath(Path path, IndexCache indexCache) throws IOException {
private static Index handleJarPath(Path path, IndexCache indexCache) {
return indexCache.cache.computeIfAbsent(path, new Function<Path, Index>() {
@Override
public Index apply(Path path) {
try (JarFile file = new JarFile(path.toFile())) {
ZipEntry existing = file.getEntry(JANDEX_INDEX);
if (existing != null) {
try (InputStream in = file.getInputStream(existing)) {
IndexReader reader = new IndexReader(in);
if (reader.getIndexVersion() < REQUIRED_INDEX_VERSION) {
LOGGER.warnf(
"Re-indexing %s - at least Jandex 2.1 must be used to index an application dependency",
path);
return indexJar(file);
} else {
return reader.read();
}
}
}
return indexJar(file);
try {
return IndexingUtil.indexJar(path);
} catch (IOException e) {
throw new RuntimeException("Failed to process " + path, e);
}
}
});
}

private static Index indexJar(JarFile file) throws IOException {
Indexer indexer = new Indexer();
Enumeration<JarEntry> e = file.entries();
while (e.hasMoreElements()) {
JarEntry entry = e.nextElement();
if (entry.getName().endsWith(".class")) {
try (InputStream inputStream = file.getInputStream(entry)) {
indexer.index(inputStream);
}
}
}
return indexer.complete();
}

/**
* When running in hot deployment mode we know that java archives will never change, there is no need
* to re-index them each time. We cache them here to reduce the hot reload time.
Expand Down
Loading