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

Create Maven plugin command to generate JBang project #13538

Merged

Conversation

geoandri
Copy link
Contributor

@geoandri geoandri commented Nov 28, 2020

Creates a new command to generate a Quarkus JBang project (e.g. mvn io.quarkus:quarkus-maven-plugin:1.9.2.Final:create-jbang).

Supports setting extensions and JBang wrapper inclusion in the generated project.

Closes #13209

@ghost ghost added area/codestarts area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/jbang Issues related to when using jbang.dev with Quarkus area/maven area/platform Issues related to definition and interaction with Quarkus Platform labels Nov 28, 2020
@geoandri
Copy link
Contributor Author

The CI failure seems unrelated. Also, I am wondering if this should be documented and what's the appropriate section.

@ia3andy ia3andy self-requested a review November 30, 2020 18:10
@ia3andy
Copy link
Contributor

ia3andy commented Nov 30, 2020

Thanks @geoandri I will have a look tomorrow :)

@ia3andy
Copy link
Contributor

ia3andy commented Dec 1, 2020

cc @maxandersen, as you can see, there is a warning saying it's experimental..

Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice we will need the CLI pretty soon too 👍

I think we should change the outputDirectory when not specified to ${basedir}/jbang-with-quarkus and create the directories if they don't exists.

I've got an error when using the generated project:

./jbang src/GreetingResource.java                                                                                                                            13209-cli-command-to-create-jbang-project
Downloading JBang...
Installing JBang...
[jbang] Resolving dependencies...
[jbang]     Resolving io.quarkus:quarkus-resteasy:999-SNAPSHOT...Done
[jbang] Dependencies resolved
[jbang] Building jar...
[jbang] Post build with io.quarkus.launcher.JBangIntegration
Warning: failed to load configurator: java.util.ServiceConfigurationError: org.jboss.logmanager.EmbeddedConfigurator: io.quarkus.bootstrap.logging.InitialConfigurator not a subtype
        at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:591)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1238)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1266)
        at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1301)
        at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1386)
        at org.jboss.logmanager.LogContext.getConfigurator(LogContext.java:219)
        at org.jboss.logmanager.LogContext.<clinit>(LogContext.java:38)
        at org.slf4j.impl.Slf4jLoggerFactory.getLogger(Slf4jLoggerFactory.java:34)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
        at org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher.<clinit>(DefaultRepositoryEventDispatcher.java:45)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.newInstance(DefaultServiceLocator.java:164)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.getInstances(DefaultServiceLocator.java:139)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.getInstance(DefaultServiceLocator.java:125)
        at org.eclipse.aether.impl.DefaultServiceLocator.getService(DefaultServiceLocator.java:278)
        at org.eclipse.aether.internal.impl.DefaultMetadataResolver.initService(DefaultMetadataResolver.java:119)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.newInstance(DefaultServiceLocator.java:169)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.getInstances(DefaultServiceLocator.java:139)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.getInstance(DefaultServiceLocator.java:125)
        at org.eclipse.aether.impl.DefaultServiceLocator.getService(DefaultServiceLocator.java:278)
        at org.apache.maven.repository.internal.DefaultVersionResolver.initService(DefaultVersionResolver.java:108)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.newInstance(DefaultServiceLocator.java:169)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.getInstances(DefaultServiceLocator.java:139)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.getInstance(DefaultServiceLocator.java:125)
        at org.eclipse.aether.impl.DefaultServiceLocator.getService(DefaultServiceLocator.java:278)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.initService(DefaultRepositorySystem.java:143)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.newInstance(DefaultServiceLocator.java:169)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.getInstances(DefaultServiceLocator.java:139)
        at org.eclipse.aether.impl.DefaultServiceLocator$Entry.getInstance(DefaultServiceLocator.java:125)
        at org.eclipse.aether.impl.DefaultServiceLocator.getService(DefaultServiceLocator.java:278)
        at io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext.newRepositorySystem(BootstrapMavenContext.java:662)
        at io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext.getRepositorySystem(BootstrapMavenContext.java:223)
        at io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext.resolveRemoteRepos(BootstrapMavenContext.java:476)
        at io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext.getRemoteRepositories(BootstrapMavenContext.java:231)
        at io.quarkus.bootstrap.JBangBuilderImpl.postBuild(JBangBuilderImpl.java:27)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at io.quarkus.launcher.JBangIntegration.postBuild(JBangIntegration.java:77)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at dev.jbang.IntegrationManager.runIntegration(IntegrationManager.java:94)
        at dev.jbang.cli.BaseBuildCommand.buildJar(BaseBuildCommand.java:206)
        at dev.jbang.cli.BaseBuildCommand.build(BaseBuildCommand.java:129)
        at dev.jbang.cli.Run.prepareArtifacts(Run.java:70)
        at dev.jbang.cli.Run.doCall(Run.java:59)
        at dev.jbang.cli.BaseCommand.call(BaseCommand.java:80)
        at dev.jbang.cli.BaseCommand.call(BaseCommand.java:12)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
        at picocli.CommandLine.access$1200(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
        at picocli.CommandLine.execute(CommandLine.java:2058)
        at dev.jbang.Main.main(Main.java:14)
[jbang] [ERROR] Issue running postBuild()
[jbang] Run with --verbose for more details

@ia3andy
Copy link
Contributor

ia3andy commented Dec 1, 2020

ahh this is the error you were talking about @geoandri.. @maxandersen didn't we fix it already?

@maxandersen
Copy link
Member

Hmm. Let me release new jbang. Wasn't sure it was needed. Looks like it is.

@ia3andy
Copy link
Contributor

ia3andy commented Dec 1, 2020

@maxandersen
Copy link
Member

yeah, remember when I said I wasn't a fan of us hardcoding that ? :)

@maxandersen
Copy link
Member

jbang 0.55.2 is out now and here I get this:

❯ jbang tes.java
[jbang] Resolving dependencies...
[jbang]     Resolving io.quarkus:quarkus-resteasy:1.10.2.Final...Done
[jbang]     Resolving io.quarkus:quarkus-smallrye-metrics:1.10.2.Final...Done
[jbang] Dependencies resolved
[jbang] Building jar...
[jbang] Post build with io.quarkus.launcher.JBangIntegration
Dec 01, 2020 1:53:26 PM org.jboss.threads.Version <clinit>
INFO: JBoss Threads version 3.1.1.Final
Dec 01, 2020 1:53:26 PM io.quarkus.deployment.QuarkusAugmentor run
INFO: Quarkus augmentation completed in 809ms
__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2020-12-01 13:53:27,975 INFO  [io.quarkus] (main) Quarkus 1.10.2.Final on JVM started in 0.878s. Listening on: http://0.0.0.0:8080
2020-12-01 13:53:27,995 INFO  [io.quarkus] (main) Profile prod activated.
2020-12-01 13:53:27,995 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy, smallrye-me

so here it works. issue was a mysterious collison of jboss logging that haven't bee a problem for a year...but now avoided by jbang not shadowing it.

@ia3andy
Copy link
Contributor

ia3andy commented Dec 1, 2020

@geoandri could you update the jbang wrappers (by generating new ones) and make the requested output directory change?

@geoandri
Copy link
Contributor Author

geoandri commented Dec 1, 2020

Thanks for looking at this @ia3andy .
I will address your comments later today. It's not clear to me what

update the jbang wrappers (by generating new ones)

means . Are you referring to {resource.class-name}.tpl.qute.java file?

@ia3andy
Copy link
Contributor

ia3andy commented Dec 1, 2020

Thanks for looking at this @ia3andy .
I will address your comments later today. It's not clear to me what

update the jbang wrappers (by generating new ones)

means . Are you referring to {resource.class-name}.tpl.qute.java file?

@geoandri I mean you need to update those files (they are generated following those instructions https://github.com/jbangdev/jbang#wrapper-install, you need to udpate jbang first):

@ia3andy
Copy link
Contributor

ia3andy commented Dec 1, 2020

yeah, remember when I said I wasn't a fan of us hardcoding that ? :)

@maxandersen Could we make them always use the latest?

@geoandri
Copy link
Contributor Author

geoandri commented Dec 1, 2020

Oh, ok got it, in order to have a working generated JBang project.

@geoandri geoandri force-pushed the 13209-cli-command-to-create-jbang-project branch from 983c950 to d877882 Compare December 2, 2020 05:28
@geoandri
Copy link
Contributor Author

geoandri commented Dec 2, 2020

Hi @ia3andy,

I have pushed the changes. There is a failure in the CI which seems unrelated.

@ia3andy
Copy link
Contributor

ia3andy commented Dec 2, 2020

@geoandri I don't see the update jbang wrappers in the changes?

The generated jbang project still doesn't work for that reason..

Also, could you add a message like this to display info about the generated project:

invocation.log().info("-----------");
if (!extensionsToAdd.isEmpty()) {
    invocation.log().info("selected extensions: \n"
        + extensionsToAdd.stream().map(e -> "- " + e.getGroupId() + ":" + e.getArtifactId() + "\n")
            .collect(Collectors.joining()));
}

final CodestartProjectDefinition projectDefinition = getCatalog(invocation.getPlatformDescriptor()).createProject(input);
            projectDefinition.generate(projectDir);

invocation.log().info("\n-----------\n" + MessageIcons.NOOP_ICON + " "
                            + projectDefinition.getRequiredCodestart(CodestartType.PROJECT).getName()
                            + " project has been successfully generated in:\n--> "
                            + projectDir.toString() + "\n-----------");

@geoandri
Copy link
Contributor Author

geoandri commented Dec 2, 2020

I misunderstood, I thought that they were already updated in the latest master because I rebased my branch against the latest master and it worked.

geoandri@mermigas:~/projects/jbang$ mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create-jbang -Dextensions="resteasy-jsonb"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:999-SNAPSHOT:create-jbang (default-cli) @ standalone-pom ---

applying codestarts...
🔠 java
🗃 quarkus-jbang
🛠 jbang-wrapper
🐒 jbang-resteasy-code
[INFO]
[INFO] ========================================================================
[WARNING] Quarkus JBang project is an experimental feature.
[INFO] ========================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.229 s
[INFO] Finished at: 2020-12-02T20:53:48+02:00
[INFO] ------------------------------------------------------------------------
geoandri@mermigas:~/projects/jbang$ jbang jbang-with-quarkus/src/GreetingResource.java


--/ __ / / / / _ | / _ / /// / / / __/
-/ /
/ / // / __ |/ , / ,< / // /\ \
--___
// |//|//||_//
2020-12-02 20:54:06,127 INFO [io.quarkus] (main) Quarkus 999-SNAPSHOT on JVM started in 0.653s. Listening on: http://0.0.0.0:8080
2020-12-02 20:54:06,143 INFO [io.quarkus] (main) Profile prod activated.
2020-12-02 20:54:06,143 INFO [io.quarkus] (main) Installed features: [cdi, resteasy, resteasy-jsonb]

I will update jbang and push the changes.

@geoandri geoandri force-pushed the 13209-cli-command-to-create-jbang-project branch from b325c03 to 54a3162 Compare December 2, 2020 20:14
@geoandri
Copy link
Contributor Author

geoandri commented Dec 3, 2020

Hi @ia3andy ,

I have addressed you comments and pushed latest changes. A failure in CI again that seems unrelated.

Thanks

@ia3andy
Copy link
Contributor

ia3andy commented Dec 3, 2020

I still get this error :-/

Warning: failed to load configurator: java.util.ServiceConfigurationError: org.jboss.logmanager.EmbeddedConfigurator: io.quarkus.bootstrap.logging.InitialConfigurator not a subtype

@maxandersen @geoandri do you get it too?

@geoandri
Copy link
Contributor Author

geoandri commented Dec 3, 2020

No @ia3andy ,

I built it and used it in my Windows machine as well and works as expected.

C:\Users\A669415\projects>mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create-jbang
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/software/amazon/awssdk/bom/2.15.35/bom-2.15.35.pom
Downloaded from central: https://repo.maven.apache.org/maven2/software/amazon/awssdk/bom/2.15.35/bom-2.15.35.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/software/amazon/awssdk/aws-sdk-java-pom/2.15.35/aws-sdk-java-pom-2.15.35.pom
Downloaded from central: https://repo.maven.apache.org/maven2/software/amazon/awssdk/aws-sdk-java-pom/2.15.35/aws-sdk-java-pom-2.15.35.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-bom/1.5.0/smallrye-common-bom-1.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-bom/1.5.0/smallrye-common-bom-1.5.0.pom (0 B at 0 B/s)
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:999-SNAPSHOT:create-jbang (default-cli) @ standalone-pom ---
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-io/1.5.0/smallrye-common-io-1.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-io/1.5.0/smallrye-common-io-1.5.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-parent/1.5.0/smallrye-common-parent-1.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-parent/1.5.0/smallrye-common-parent-1.5.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-annotation/1.5.0/smallrye-common-annotation-1.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-annotation/1.5.0/smallrye-common-annotation-1.5.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-expression/1.5.0/smallrye-common-expression-1.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-expression/1.5.0/smallrye-common-expression-1.5.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-function/1.5.0/smallrye-common-function-1.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-function/1.5.0/smallrye-common-function-1.5.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-constraint/1.5.0/smallrye-common-constraint-1.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-constraint/1.5.0/smallrye-common-constraint-1.5.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-classloader/1.5.0/smallrye-common-classloader-1.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-classloader/1.5.0/smallrye-common-classloader-1.5.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/logging/jboss-logging-annotations/2.2.0.Final/jboss-logging-annotations-2.2.0.Final.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/jboss/logging/jboss-logging-annotations/2.2.0.Final/jboss-logging-annotations-2.2.0.Final.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/logging/jboss-logging-tools-parent/2.2.0.Final/jboss-logging-tools-parent-2.2.0.Final.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/jboss/logging/jboss-logging-tools-parent/2.2.0.Final/jboss-logging-tools-parent-2.2.0.Final.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/reactive/mutiny/0.11.0/mutiny-0.11.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/reactive/mutiny/0.11.0/mutiny-0.11.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/reactive/mutiny-project/0.11.0/mutiny-project-0.11.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/reactive/mutiny-project/0.11.0/mutiny-project-0.11.0.pom (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-io/1.5.0/smallrye-common-io-1.5.0.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-constraint/1.5.0/smallrye-common-constraint-1.5.0.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-expression/1.5.0/smallrye-common-expression-1.5.0.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-annotation/1.5.0/smallrye-common-annotation-1.5.0.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-function/1.5.0/smallrye-common-function-1.5.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-io/1.5.0/smallrye-common-io-1.5.0.jar (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-classloader/1.5.0/smallrye-common-classloader-1.5.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-classloader/1.5.0/smallrye-common-classloader-1.5.0.jar (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/logging/jboss-logging-annotations/2.2.0.Final/jboss-logging-annotations-2.2.0.Final.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-constraint/1.5.0/smallrye-common-constraint-1.5.0.jar (0 B at 0 B/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-expression/1.5.0/smallrye-common-expression-1.5.0.jar (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/smallrye/reactive/mutiny/0.11.0/mutiny-0.11.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-annotation/1.5.0/smallrye-common-annotation-1.5.0.jar (0 B at 0 B/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/common/smallrye-common-function/1.5.0/smallrye-common-function-1.5.0.jar (0 B at 0 B/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/smallrye/reactive/mutiny/0.11.0/mutiny-0.11.0.jar (0 B at 0 B/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/jboss/logging/jboss-logging-annotations/2.2.0.Final/jboss-logging-annotations-2.2.0.Final.jar (0 B at 0 B/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-universe-bom/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-universe-bom/maven-metadata.xml (1.8 kB at 5.6 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bom/maven-metadata.xml (3.1 kB at 23 kB/s)

applying codestarts...
? java
? quarkus-jbang
? jbang-wrapper
? jbang-resteasy-code


? jbang project has been successfully generated in:
--> C:\Users\A669415\projects\jbang-with-quarkus

[INFO]
[INFO] ========================================================================
[WARNING] Quarkus JBang project is an experimental feature.
[INFO] ========================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.486 s
[INFO] Finished at: 2020-12-03T11:19:01+02:00
[INFO] ------------------------------------------------------------------------

C:\Users\A669415\projects>cd jbang-with-quarkus

C:\Users\A669415\projects\jbang-with-quarkus>jbang src\GreetingResource.java
[jbang] Resolving dependencies...
[jbang] Resolving io.quarkus:quarkus-resteasy:999-SNAPSHOT...Done
[jbang] Dependencies resolved
[jbang] Building jar...
[jbang] Post build with io.quarkus.launcher.JBangIntegration
Dec 03, 2020 11:19:36 AM io.quarkus.deployment.QuarkusAugmentor run
WARN: Using Java versions older than 11 to build Quarkus applications is deprecated and will be disallowed in a future release!
Dec 03, 2020 11:19:36 AM org.jboss.threads.Version
INFO: JBoss Threads version 3.1.1.Final
Dec 03, 2020 11:19:37 AM io.quarkus.deployment.QuarkusAugmentor run
INFO: Quarkus augmentation completed in 1461ms


--/ __ / / / / _ | / _ / /// / / / __/
-/ /
/ / // / __ |/ , / ,< / // /\
--___
// |//|//||_//
2020-12-03 11:19:40,975 INFO [io.quarkus] (main) Quarkus 999-SNAPSHOT on JVM started in 2.055s. Listening on: http://0.0.0.0:8080
2020-12-03 11:19:40,986 INFO [io.quarkus] (main) Profile prod activated.
2020-12-03 11:19:40,987 INFO [io.quarkus] (main) Installed features: [cdi, resteasy]

@ia3andy
Copy link
Contributor

ia3andy commented Dec 3, 2020

@geoandri ok I needed a clean install :)

It's weird that the CI has been failing on the same one multiple time, can you rebase on latest master?

@ia3andy ia3andy changed the title Create command to generate JBang project Create Maven plugin command to generate JBang project Dec 3, 2020
Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good piece of work!

I hope you will also provide a PR to plug this to the soon coming Quarkus CLI https://github.com/quarkusio/quarkus/tree/master/devtools/cli/src/main/java/io/quarkus/cli

Also you could add a picocli jbang example: #13208

@ia3andy ia3andy merged commit 18796ff into quarkusio:master Dec 3, 2020
@ghost ghost added this to the 1.11 - master milestone Dec 3, 2020
@geoandri
Copy link
Contributor Author

geoandri commented Dec 3, 2020

Thanks @ia3andy ,

I will have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codestarts area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/jbang Issues related to when using jbang.dev with Quarkus area/maven area/platform Issues related to definition and interaction with Quarkus Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce a new CLI command to create JBang Quarkus projects
3 participants