I built a maven application that I am going to deploy as a Jar file. I had it running locally during testing with "mvn jetty:run"
Building the Jar file meant I needed a main() method to reference as an entry point, so I created one but do not know what to put in it to get the Jar to run; it just finishes with exit code 0.
So what can I put in my main method that will make the executable run my code similar to how it was built with "mvn jetty:run" ?
Below is a snapshot of my MainView class.
@SuppressWarnings("serial")
@Route(value = "")
@PWA(name = "Project Base for Vaadin Flow", shortName = "Project Base")
@Theme(value = Lumo.class, variant = Lumo.DARK)
public class MainView extends SplitLayout{
public MainView() {
MainLayout fillview = new MainLayout();
setOrientation(Orientation.VERTICAL);
setSplitterPosition(0);
// addThemeVariants(SplitLayoutVariant.LUMO_SMALL);
addToPrimary(fillview.primaryLayout());
addToSecondary(fillview.secondaryLayout());
}
public static void main(String args[]){
MainView build = new MainView();
build;
}
}
I did not have a main() method before the Jar creation, it would simply run MainView.
I know syntactically calling "build;" doesn't work but it shows what I am trying to do.