title: Is there a way to use variables within a systemPath for a system-scope dependency?
body: <p>I am currently in the process of creating a mod for a game. I need to include dependencies that are common across all platforms (Win and Mac), as well as parts of Apache Commons in the jar. Due to how this is going to be distributed via the Steam Workshop, I am not allowed to distribute dependency jars alongside the mod, thus everything must be included in a single jar.</p>
  <p>I build via <em>mvn package</em>. My <em>pom.xml</em> is:</p>
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;Flameborn&lt;/groupId&gt;
      &lt;artifactId&gt;InSpire&lt;/artifactId&gt;
      &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;description&gt;Blind Accessibility Interface for Slay the Spire&lt;/description&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
          &lt;SlayTheSpire.version&gt;01-27-2020&lt;/SlayTheSpire.version&gt;
          &lt;ModTheSpire.version&gt;3.8.0&lt;/ModTheSpire.version&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.evacipated.cardcrawl&lt;/groupId&gt;
              &lt;artifactId&gt;modthespire&lt;/artifactId&gt;
              &lt;version&gt;${ModTheSpire.version}&lt;/version&gt;
              &lt;scope&gt;system&lt;/scope&gt;
              &lt;systemPath&gt;${SteamPath}/workshop/content/646570/1605060445/ModTheSpire.jar&lt;/systemPath&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;basemod&lt;/groupId&gt;
              &lt;artifactId&gt;basemod&lt;/artifactId&gt;
              &lt;version&gt;5.0.0&lt;/version&gt;
              &lt;scope&gt;system&lt;/scope&gt;
              &lt;systemPath&gt;${SteamPath}/workshop/content/646570/1605833019/BaseMod.jar&lt;/systemPath&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.10&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-exec&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;platform-windows&lt;/id&gt;
              &lt;activation&gt;
                  &lt;os&gt;
                      &lt;family&gt;windows&lt;/family&gt;
                  &lt;/os&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;SteamPath&gt;C:/Program Files (x86)/Steam/steamapps&lt;/SteamPath&gt;
              &lt;/properties&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.megacrit.cardcrawl&lt;/groupId&gt;
                      &lt;artifactId&gt;slaythespire&lt;/artifactId&gt;
                      &lt;version&gt;${SlayTheSpire.version}&lt;/version&gt;
                      &lt;scope&gt;system&lt;/scope&gt;
                      &lt;systemPath&gt;${SteamPath}/common/SlayTheSpire/desktop-1.0.jar&lt;/systemPath&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                          &lt;version&gt;1.8&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;phase&gt;package&lt;/phase&gt;
                                  &lt;configuration&gt;
                                      &lt;target&gt;
                                          &lt;copy file=&quot;target/${project.artifactId}.jar&quot; tofile=&quot;${Steam.path}/common/SlayTheSpire/mods/${project.artifactId}.jar&quot;/&gt;
                                      &lt;/target&gt;
                                  &lt;/configuration&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;run&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;platform-mac&lt;/id&gt;
              &lt;activation&gt;
                  &lt;os&gt;
                      &lt;family&gt;mac&lt;/family&gt;
                  &lt;/os&gt;
              &lt;/activation&gt;
              &lt;properties&gt;
                  &lt;SteamPath&gt;${user.home}/Library/Application Support/Steam/steamapps&lt;/SteamPath&gt;
              &lt;/properties&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.megacrit.cardcrawl&lt;/groupId&gt;
                      &lt;artifactId&gt;slaythespire&lt;/artifactId&gt;
                      &lt;version&gt;${SlayTheSpire.version}&lt;/version&gt;
                      &lt;scope&gt;system&lt;/scope&gt;
                      &lt;systemPath&gt;${SteamPath}/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources/desktop-1.0.jar&lt;/systemPath&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                          &lt;version&gt;1.8&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;phase&gt;package&lt;/phase&gt;
                                  &lt;configuration&gt;
                                      &lt;target&gt;
                                          &lt;copy file=&quot;target/${project.artifactId}.jar&quot; tofile=&quot;${Steam.path}/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources/mods/${project.artifactId}.jar&quot;/&gt;
                                      &lt;/target&gt;
                                  &lt;/configuration&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;run&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
      &lt;build&gt;
          &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.coveo&lt;/groupId&gt;
                  &lt;artifactId&gt;fmt-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.10&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;verbose&gt;false&lt;/verbose&gt;
                      &lt;filesNamePattern&gt;.*\.java&lt;/filesNamePattern&gt;
                      &lt;skip&gt;false&lt;/skip&gt;
                      &lt;skipSortingImports&gt;false&lt;/skipSortingImports&gt;
                      &lt;style&gt;google&lt;/style&gt;
                      &lt;displayFiles&gt;false&lt;/displayFiles&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;format&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2.4&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;minimizeJar&gt;true&lt;/minimizeJar&gt;
                              &lt;filters&gt; 
                                  &lt;filter&gt;
                                      &lt;artifact&gt;org.apache.commons:commons-lang3&lt;/artifact&gt;
                                      &lt;includes&gt;
                                          &lt;include&gt;**&lt;/include&gt;
                                      &lt;/includes&gt;
                                  &lt;/filter&gt; 
                                  &lt;filter&gt;
                                      &lt;artifact&gt;org.apache.commons:commons-exec&lt;/artifact&gt;
                                      &lt;includes&gt;
                                          &lt;include&gt;**&lt;/include&gt;
                                      &lt;/includes&gt;
                                  &lt;/filter&gt; 
                              &lt;/filters&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
              &lt;/resource&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                  &lt;filtering&gt;false&lt;/filtering&gt;
                  &lt;excludes&gt;
                      &lt;exclude&gt;ModTheSpire.json&lt;/exclude&gt;
                  &lt;/excludes&gt;
              &lt;/resource&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
                  &lt;includes&gt;
                      &lt;include&gt;ModTheSpire.json&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  <p>I am getting the following errors:</p>
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project InSpire: Error creating shaded jar: Some problems were encountered while processing the POMs:
  [ERROR] [WARNING] 'dependencies.dependency.systemPath' for com.megacrit.cardcrawl:slaythespire:jar should use a variable instead of a hard-coded path /Users/User/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources/desktop-1.0.jar @ line 168, column 19
  [ERROR] [WARNING] 'profiles.profile[platform-mac].dependencies.dependency.systemPath' for com.megacrit.cardcrawl:slaythespire:jar should use a variable instead of a hard-coded path /Users/User/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources/desktop-1.0.jar @ line 154, column 23
  [ERROR] [ERROR] 'dependencies.dependency.systemPath' for com.evacipated.cardcrawl:modthespire:jar must specify an absolute path but is ${SteamPath}/workshop/content/646570/1605060445/ModTheSpire.jar @ line 175, column 19
  [ERROR] [ERROR] 'dependencies.dependency.systemPath' for basemod:basemod:jar must specify an absolute path but is ${SteamPath}/workshop/content/646570/1605833019/BaseMod.jar @ line 182, column 19
  [ERROR] : 4 problems were encountered while building the effective model for Flameborn:InSpire:0.0.1
  [ERROR] [WARNING] 'dependencies.dependency.systemPath' for com.megacrit.cardcrawl:slaythespire:jar should use a variable instead of a hard-coded path /Users/User/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources/desktop-1.0.jar @ line 168, column 19
  [ERROR] [WARNING] 'profiles.profile[platform-mac].dependencies.dependency.systemPath' for com.megacrit.cardcrawl:slaythespire:jar should use a variable instead of a hard-coded path /Users/User/Library/Application Support/Steam/steamapps/common/SlayTheSpire/SlayTheSpire.app/Contents/Resources/desktop-1.0.jar @ line 154, column 23
  [ERROR] [ERROR] 'dependencies.dependency.systemPath' for com.evacipated.cardcrawl:modthespire:jar must specify an absolute path but is ${SteamPath}/workshop/content/646570/1605060445/ModTheSpire.jar @ line 175, column 19
  [ERROR] [ERROR] 'dependencies.dependency.systemPath' for basemod:basemod:jar must specify an absolute path but is ${SteamPath}/workshop/content/646570/1605833019/BaseMod.jar @ line 182, column 19
  </code></pre>