title: Scala macro expand to compiler option
body: <p>My original task is to have some object containing a distribution version of my application currently installed. This is necessary to be able to request the currently running version via http-endpoint (different clients run different versions).</p>
  
  <p>So I thought that was a perfect task for macro. The problem is my build system is maven and I thought of passing the version number (available in maven properties in <code>pom.xml</code> as a compile option to retrieve it later from macro). </p>
  
  <pre><code>object ProjectVersion {
     def applicationVersion(): String = macro getVersion
     def getVersion(c: Context)(): c.Expr[Unit] = {
        //?
     }
  }
  </code></pre>
  
  <p>Googling the problem did not give any sensible result. Can someone please give an advice if it is even possible?</p>