title: JavaFX Maven Plug-in: No plugin found for prefix 'jfx' in the current project and in the plugin groups
body: <p>I'm trying to create an executable jar for my JavaFX application within an Eclipse Maven Project.</p>
  
  <p>I'm following this thread:
  <a href="https://stackoverflow.com/questions/34388367/javafx-application-with-maven-in-eclipse">JavaFx Application with Maven in Eclipse</a></p>
  
  <p>And this turotial:
  <a href="https://www.youtube.com/watch?v=wbjW8rYlook" rel="nofollow noreferrer">https://www.youtube.com/watch?v=wbjW8rYlook</a></p>
  
  <p>I'm getting a<br> <code>No plugin found for prefix 'jfx' in the current project and in the plugin groups</code><br> error when trying to run the goal: <code>jfx:jar</code></p>
  
  <p>Full build error:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO] Downloading: https://repo.maven.apache.org/maven2/com/zenjava/javafx-maven-plugin/8.1.2/javafx-maven-plugin-8.1.2.pom
  [WARNING] Failed to retrieve plugin descriptor for com.zenjava:javafx-maven-plugin:8.1.2: Plugin com.zenjava:javafx-maven-plugin:8.1.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.zenjava:javafx-maven-plugin:jar:8.1.2
  [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.3.2: Plugin org.apache.maven.plugins:maven-release-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2
  [INFO] Downloading: https://repo.maven.apache.org/maven2/com/zenjava/maven-metadata.xml
  [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
  [INFO] Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
  [WARNING] Could not transfer metadata com.zenjava/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  [WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  [WARNING] Failure to transfer com.zenjava/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.zenjava/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  [WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  [WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.831 s
  [INFO] Finished at: 2017-01-18T15:36:52+08:00
  [INFO] Final Memory: 9M/22M
  [INFO] ------------------------------------------------------------------------
  [ERROR] No plugin found for prefix 'jfx' in the current project and in the plugin groups [com.zenjava, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\alexismatunog\Documents\My Docs\03_OE\Java\workspace\Maven\m2\repository), central (https://repo.maven.apache.org/maven2)] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
  </code></pre>
  
  <p>I've already tried the following in attempt to solve this problem:<br>
  1. Enter <code>mvn clean install</code> (BUILD SUCCESS)<br>
  2. Added <code>&lt;pluginGroup&gt;com.zenjava&lt;/pluginGroup&gt;</code> on settings.xml<br></p>
  
  <p>Also, I've already added the <code>&lt;plugin&gt;</code> node in my pom.xml</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;com.zenjava&lt;/groupId&gt;
          &lt;artifactId&gt;javafx-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;8.1.2&lt;/version&gt;
          &lt;configuration&gt;
              &lt;mainClass&gt;com.sample.MainApp&lt;/mainClass&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>How can I solve this problem?</p>
  
  <p>===========================================================<br>
  <b>UPDATE 1:</b><br>
  After following Jaydeep's answer, I'm getting a password prompt after trying to open the cacerts file and unable to proceed further.<br>
  <a href="https://i.stack.imgur.com/CA7Dg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CA7Dg.png" alt="IMG1"></a> </p>
  
  <p>===========================================================<br>
  <b>UPDATE 2:</b><br>
  Default password for cacerts is "changeit".
  <b>Build is successful</b> after importing the root cert. 
  Also, I've updated my pom file with jfx plugin version 8.7.0 as advised by FibreFoX.</p>