forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add very basic support for command line only applications
Relates to: quarkusio#284
- Loading branch information
Showing
31 changed files
with
1,033 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../main/java/io/quarkus/deployment/builditem/MainAfterStartupBytecodeRecorderBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.quarkus.deployment.builditem; | ||
|
||
import org.jboss.builder.item.MultiBuildItem; | ||
|
||
import io.quarkus.deployment.recording.BytecodeRecorderImpl; | ||
|
||
public final class MainAfterStartupBytecodeRecorderBuildItem extends MultiBuildItem { | ||
|
||
private final BytecodeRecorderImpl bytecodeRecorder; | ||
|
||
public MainAfterStartupBytecodeRecorderBuildItem(BytecodeRecorderImpl bytecodeRecorder) { | ||
this.bytecodeRecorder = bytecodeRecorder; | ||
} | ||
|
||
public BytecodeRecorderImpl getBytecodeRecorder() { | ||
return bytecodeRecorder; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
core/deployment/src/main/java/io/quarkus/deployment/builditem/MainArgsBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package io.quarkus.deployment.builditem; | ||
|
||
import org.jboss.builder.item.SimpleBuildItem; | ||
|
||
import io.quarkus.deployment.recording.BytecodeRecorderImpl; | ||
import io.quarkus.runtime.MainArgsSupplier; | ||
|
||
public final class MainArgsBuildItem extends SimpleBuildItem implements BytecodeRecorderImpl.ReturnedProxy, MainArgsSupplier { | ||
@Override | ||
public String __returned$proxy$key() { | ||
return MainArgsSupplier.class.getName(); | ||
} | ||
|
||
@Override | ||
public boolean __static$$init() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public String[] getArgs() { | ||
throw new IllegalStateException(); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
core/deployment/src/main/java/io/quarkus/deployment/builditem/ShutdownBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.deployment.builditem; | ||
|
||
import org.jboss.builder.item.SimpleBuildItem; | ||
|
||
public final class ShutdownBuildItem extends SimpleBuildItem { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
core/runtime/src/main/java/io/quarkus/runtime/MainArgsSupplier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.runtime; | ||
|
||
public interface MainArgsSupplier { | ||
|
||
String[] getArgs(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2018 Red Hat, Inc. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>quarkus-command-line-runner-parent</artifactId> | ||
<groupId>io.quarkus</groupId> | ||
<version>999-SNAPSHOT</version> | ||
<relativePath>../</relativePath> | ||
</parent> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>quarkus-command-line-runner</artifactId> | ||
<name>Quarkus - Command Line Runner - Deployment</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-arc</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-command-line-runner-runtime</artifactId> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-extension-processor</artifactId> | ||
<version>${project.version}</version> | ||
</path> | ||
</annotationProcessorPaths> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
16 changes: 16 additions & 0 deletions
16
...r/deployment/src/main/java/io/quarkus/clrunner/deployment/CommandLineRunnerBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.quarkus.clrunner.deployment; | ||
|
||
import org.jboss.builder.item.MultiBuildItem; | ||
|
||
public final class CommandLineRunnerBuildItem extends MultiBuildItem { | ||
|
||
private final String className; | ||
|
||
public CommandLineRunnerBuildItem(String className) { | ||
this.className = className; | ||
} | ||
|
||
public String getClassName() { | ||
return className; | ||
} | ||
} |
Oops, something went wrong.