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

The include at the end to build the executable JAR is missing the production profile #114

Open
DominiqueComte opened this issue Jun 5, 2024 · 4 comments
Labels

Comments

@DominiqueComte
Copy link
Contributor

At the end of the tutorial, in the "Build an executable JAR" paragraph, the build instructions are missing the "production" profile that actually builds the frontend files to include in the JAR.

Without this, running the jar and trying to access the application produces an error page and this in the console:

java.lang.IllegalStateException: 

  Failed to find the following files: 
      - ./generated/jar-resources/lit-renderer.ts
      - ./generated/jar-resources/vaadin-time-picker/timepickerConnector.js
 [etc...]

includes in AsciiDoc do not seem to support a parameter that could contain the missing "-Pproduction" (for Maven), though.

@DominiqueComte DominiqueComte changed the title The macro at the end to build the executable JAR is missing the production profile The include at the end to build the executable JAR is missing the production profile Jun 5, 2024
@robertmcnees
Copy link
Contributor

Hi @DominiqueComte. I went through the guide and I see the same thing. Using ./gradlew bootRun will produce the desired results, but the instructions on the .jar file are incorrect. In addition to the problem you described in this issue the name of the .jar file is also incorrect. That is a common problem in our guides unfortunately.

You mention the AsciiDoc include files. Going forward I think we should favor correct information rather than standardized information if we have to choose one. That said, I think there is room for both using a new standard file. This is a pattern that I've implemented in a few guides, for example RabbitMQ.

For this guide specifically, I think that we should update the sections to roughly track:

  • Run the Application - ./gradlew bootRun
  • Preparing to Build the Application - modifying property files to set the profile
  • Building the Application - if guide specific configuration is handled in the 'Preparing to Build the Application' section, then hopefully this can remain common.

@DominiqueComte
Copy link
Contributor Author

Could the instructions remain standard by merging the production profile into the default build ?
This way the frontend is simply built by using the usual Maven goals.

@Buzzardo
Copy link
Contributor

Buzzardo commented Jul 8, 2024

We should use includes only when they 100% match the need of the guide.

I am leaving this issue open in case you want to address it be merging the production profile.

@DominiqueComte
Copy link
Contributor Author

I tried moving the contents of the "production" profile to the default build to avoid changing the build instructions, it works fine.
But when following the tutorial and generating the project from Spring Initializr, the production profile is there in the generated POM so the instructions still do not match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants