title: Replace @variables@ within an application.properties from another project in Spring Boot
body: <p>We have an <code>application.properties</code> file in one project:</p>
  
  <pre><code>  src
     |--- main
          |--- resources
                   |--- application.properties
  </code></pre>
  
  <p>It contains some <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/howto-properties-and-configuration.html" rel="nofollow noreferrer">Maven project property <code>@variables@</code></a> to initialise some properties such as:</p>
  
  <pre><code>info.app.branch=@branch.name@
  </code></pre>
  
  <p>As I understand through some experimentation and the above documentation, these are replaced by <code>spring-boot-starter-parent</code>, before it copies them over into <code>target/classes/config</code>.</p>
  
  <p>In a dependent project, we explicitly copy the <code>application.properties</code> file over from the parent project's JAR using the <a href="https://maven.apache.org/plugins/maven-dependency-plugin/" rel="nofollow noreferrer">Maven dependency plugin</a>.</p>
  
  <pre><code>&lt;artifactItem&gt;
      &lt;groupId&gt;...&lt;/groupId&gt;
      &lt;artifactId&gt;...&lt;/artifactId&gt;
      &lt;outputDirectory&gt;${project.build.directory}/classes&lt;/outputDirectory&gt;
      &lt;includes&gt;config/application.properties&lt;/includes&gt;
  &lt;/artifactItem&gt;
  </code></pre>
  
  <p>As such, it's already in the <code>target/classes/config</code> directory, and no replacement of the <code>@variables@</code> takes place.</p>
  
  <p>How can I ensure that Spring boot correctly replaces these variables?</p>