title: Compile and execute a JDK preview feature with Maven
body: <p>With <a href="http://jdk.java.net/12/" rel="noreferrer">JDK/12 EarlyAccess Build 10</a>, the JEP-325 Switch Expressions has been integrated as a preview feature in the JDK. A sample code for the expressions (as in the JEP as well):</p>
  
  <pre><code>Scanner scanner = new Scanner(System.in);
  Day day = Day.valueOf(scanner.next());
  switch (day) {
      case MONDAY, TUESDAY -&gt; System.out.println("Back to work.") ;
      case WEDNESDAY -&gt; System.out.println("Wait for the end of week...") ;
      case THURSDAY,FRIDAY -&gt; System.out.println("Plan for the weekend?");
      case SATURDAY, SUNDAY -&gt; System.out.println("Enjoy the holiday!");
  }
  </code></pre>
  
  <p>where <code>Day</code> being an enum as </p>
  
  <pre><code>public enum Day {
      MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
  }
  </code></pre>
  
  <p>The <a href="http://openjdk.java.net/jeps/12" rel="noreferrer">Preview Language and VM Features JEP-12</a> already elaborate how a feature can be enabled during compile and runtime using <code>javac</code> and <code>java</code>.</p>
  
  <p>How can one try out this feature using Maven?</p>