0

I use this banner.txt file for my JHipster project. Here is an extract from my banner.txt file

enter image description here

Here is an extract from my pom.xml file

<?xml version="1.0" encoding="UTF-8"?>
<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
                             https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.entrainement.blog</groupId>
    <artifactId>blog</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>Blog</name>
    <description>Description for blog</description>

    <repositories>
        <!-- jhipster-needle-maven-repository -->
    </repositories>

    <pluginRepositories>
        <!-- jhipster-needle-maven-plugin-repository -->
    </pluginRepositories>

    <!-- jhipster-needle-distribution-management -->

    <properties>
        <!-- Build properties -->
        <maven.version>3.8.5</maven.version>
        <java.version>11</java.version>
        <node.version>v16.14.0</node.version>
        <npm.version>8.6.0</npm.version>
        <app-version>${version}</app-version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <start-class>org.entrainement.blog.BlogApp</start-class>
        <argLine>-Djava.security.egd=file:/dev/./urandom -Xmx512m</argLine>
        <m2e.apt.activation>jdt_apt</m2e.apt.activation>
        <run.addResources>false</run.addResources>
        <!-- These remain empty unless the corresponding profile is active -->
        <profile.no-liquibase />
        <profile.api-docs />
        <profile.tls />
        <profile.e2e />

        <!-- Dependency versions -->
        <jhipster-dependencies.version>7.8.1</jhipster-dependencies.version>
        <!-- The spring-boot version should match the one managed by
        https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/${jhipster-dependencies.version} -->
        <spring-boot.version>2.6.6</spring-boot.version>
        <!-- The hibernate version should match the one managed by
        https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/${spring-boot.version} -->
        <hibernate.version>5.6.7.Final</hibernate.version>
        <!-- The liquibase version should match the one managed by
        https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/${spring-boot.version} -->
        <liquibase.version>4.6.1</liquibase.version>
        <liquibase-hibernate5.version>4.6.1</liquibase-hibernate5.version>
        <h2.version>1.4.200</h2.version>
        <validation-api.version>2.0.1.Final</validation-api.version>
        <jaxb-runtime.version>2.3.3</jaxb-runtime.version>
        <archunit-junit5.version>0.22.0</archunit-junit5.version>
        <mapstruct.version>1.4.2.Final</mapstruct.version>
        <!-- Plugin versions -->
        <maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
        <maven-site-plugin.version>3.11.0</maven-site-plugin.version>
        <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
        <maven-javadoc-plugin.version>3.3.2</maven-javadoc-plugin.version>
        <maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
        <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
        <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
        <maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
        <maven-idea-plugin.version>2.2.1</maven-idea-plugin.version>
        <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
        <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
        <maven-war-plugin.version>3.3.2</maven-war-plugin.version>
        <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
        <checkstyle.version>10.1</checkstyle.version>
        <nohttp-checkstyle.version>0.0.10</nohttp-checkstyle.version>
        <frontend-maven-plugin.version>1.12.1</frontend-maven-plugin.version>
        <checksum-maven-plugin.version>1.11</checksum-maven-plugin.version>
        <maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version>
        <git-commit-id-plugin.version>5.0.0</git-commit-id-plugin.version>
        <modernizer-maven-plugin.version>2.4.0</modernizer-maven-plugin.version>
        <jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
        <jib-maven-plugin.version>3.2.1</jib-maven-plugin.version>
        <jib-maven-plugin.image>eclipse-temurin:11-jre-focal</jib-maven-plugin.image>
        <jib-maven-plugin.architecture>amd64</jib-maven-plugin.architecture>
        <lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
        <properties-maven-plugin.version>1.1.0</properties-maven-plugin.version>
        <sonar-maven-plugin.version>3.9.1.2184</sonar-maven-plugin.version>
        <!-- jhipster-needle-maven-property -->
    </properties>

The issue is that when i run the applcation, under "WELCOME" it displays ${app-version} not it's value 0.0.1-SNAPSHOT.

Does anyone have an idea tow to solve this issue ?

Thanks

./mvnw clean package

Sayddus24
  • 1
  • 1
  • Does this answer your question? [Application version does not show up in Spring Boot banner.txt](https://stackoverflow.com/questions/34519759/application-version-does-not-show-up-in-spring-boot-banner-txt) – Gaël Marziou Aug 05 '23 at 17:11
  • No, I've tried the solutions listed, but they still don't work. – Sayddus24 Aug 07 '23 at 13:00
  • All these solutions work, if they don't work on your project it's because there are some errors in your project but we can't say what because we only see a part of it.. From what you showed, your bannert.txt does not reference the correct Spring Boot variable name. Also your pom.xml does not make sense, you declare a property but don't use it. What is your level in Spring Boot and maven? – Gaël Marziou Aug 07 '23 at 13:23
  • This is a pom file generated with Jhipster. In the basic project that is generated in the bannert.txt file, they used ${spring-boot.version} and I want to display the contents of the ${app-version} varibale. – Sayddus24 Aug 07 '23 at 13:46
  • As explained above in the linked question and in the spring boot doc, the name of the variable is not ${app-version}, it is ${application.version}. The property you defined inyour pom.ml has no effect. Raed, the doc: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.spring-application.banner – Gaël Marziou Aug 07 '23 at 14:30

0 Answers0