title: Access a Java variable from Jenkins
body: <p>I am trying to find out if I could get the value of a variable declared inside a Java program or maven-plugin and store it in a Jenkins environment variable.</p>
  
  <p>This is because the Jenkins file has to create a new git branch from dev and call it <code>Release-9.0.86</code> for example but the version number is inside a <code>pom.xml</code>.</p>
  
  <p>I have already written a maven-plugin that retrieves the version from the <code>pom.xml</code> an writes it into another XML file, but I need to know if I could send the version to Jenkins to handle it.</p>