You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a minor problem, but I think it makes the guide hard to follow.
In the Default configuration section of the Helidon MP Config Guide a code snippet with a Main class is provided:
That archetype project does not provide a Main.java file, just a GreetingProvider.java and a GreetResource.java. That means that something besides those two classes is providing the 'main entry point'. Looking at the MANIFEST.MF of the jar file, it appears that the main class is being provided by the Helidon framework:
Main-Class: io.helidon.microprofile.cdi.Main
Which is OK. The problem is that adding the Main.java file in the tutorial does not change that, the io.helidon.microprofile.cdi.Main is still the entry point. In practical terms, this means that the Main.java file that the user is writing as he/she goes through the tutorial is being completely ignored when packaging and running the project, which makes the tutorial very hard to follow since the code does not do what it is supposed to do.
Steps to reproduce
Create the project using archetype in the code snippet above.
Add the Main.java to the project according to the snippet above.
Package the application: mvn package.
Run the packaged application: java -jar target target/java_jar_file.jar.
See how the code provided in the Main.java file is ignored.
Please correct me if anything is wrong with the description I did in this bug report. I'm very much a noob in Helidon.
I would still like to be able to follow the tutorials and have the project use the Main.java so that I can continue to learn Helidon. How can I do that?
In advance, thank you very much 🙂
The text was updated successfully, but these errors were encountered:
At some point the quickstart archetypes were updated to use the built-in Main, and looks like the Config guide was not properly updated. So we need to fix that. I also quickly checked the other guides and they seem OK wrt Main.
To continue working with the guide add the following property to the project's pom.xml:
Environment Details
Problem Description
It is a minor problem, but I think it makes the guide hard to follow.
In the Default configuration section of the Helidon MP Config Guide a code snippet with a Main class is provided:
The class is supposed to be added to the archetype template code generated earlier in the tutorial, in the section Create a sample Helidon MP project:
That archetype project does not provide a
Main.java
file, just aGreetingProvider.java
and aGreetResource.java
. That means that something besides those two classes is providing the 'main entry point'. Looking at theMANIFEST.MF
of the jar file, it appears that the main class is being provided by the Helidon framework:Which is OK. The problem is that adding the
Main.java
file in the tutorial does not change that, theio.helidon.microprofile.cdi.Main
is still the entry point. In practical terms, this means that theMain.java
file that the user is writing as he/she goes through the tutorial is being completely ignored when packaging and running the project, which makes the tutorial very hard to follow since the code does not do what it is supposed to do.Steps to reproduce
Main.java
to the project according to the snippet above.mvn package
.java -jar target target/java_jar_file.jar
.Main.java
file is ignored.Please correct me if anything is wrong with the description I did in this bug report. I'm very much a noob in Helidon.
I would still like to be able to follow the tutorials and have the project use the
Main.java
so that I can continue to learn Helidon. How can I do that?In advance, thank you very much 🙂
The text was updated successfully, but these errors were encountered: