title: No plugin found for prefix 'exec' in the current project and in the plug in groups org.codehaus.mojo
body: <p>I have read several questions with similar issue and the Help 1 page. Unfortunately, I am stuck. </p>
  
  <p>One possible reason could be caused by proxy but there is no such proxy here. Additionally, all maven projects in my PC have been successfully updated when I update it from Eclipse. So I discard this possibility. </p>
  
  <p>Other thing I checked was to look for codehaus in my local repository and I find it (C:\Users\myUser.m2\repository\org\codehaus\mojo). </p>
  
  <p>Another try, I tried add pluginGroups/pluginGroup in settings.
  The project is a very simple hello word using spring batch with only a Tasklet and its execute method. There isn't public static void main method.</p>
  
  <p>Command.exe with the whole error printed after I added the Matteo recommendation:</p>
  
  <pre><code>C:\temp\TaskletJavaConfig\spring-batch-helloworld&gt;mvn compile exec:java -e
  Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
  Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\
  bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
  [INFO] Error stacktraces are turned on.
  [INFO] Scanning for projects...
  Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-p
  lugin/1.1/exec-maven-plugin-1.1.pom
  [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:exec-maven-
  plugin:1.1: Plugin org.codehaus.mojo:exec-maven-plugin:1.1 or one of its depende
  ncies could not be resolved: Failed to read artifact descriptor for org.codehaus
  .mojo:exec-maven-plugin:jar:1.1
  Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
  -deploy-plugin/2.7/maven-deploy-plugin-2.7.pom
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
  n-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or
  one of its dependencies could not be resolved: Failed to read artifact descripto
  r for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
  Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
  -site-plugin/3.3/maven-site-plugin-3.3.pom
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
  n-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one
  of its dependencies could not be resolved: Failed to read artifact descriptor fo
  r org.apache.maven.plugins:maven-site-plugin:jar:3.3
  Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
  -antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
  n-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or
  one of its dependencies could not be resolved: Failed to read artifact descripto
  r for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
  Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
  -assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
  n-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plu
  gin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read
  artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-b
  eta-5
  Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
  -dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
  [WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave
  n-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin
  :2.8 or one of its dependencies could not be resolved: Failed to read artifact d
  escriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
  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:mave
  n-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 des
  criptor for org.apache.maven.plugins:maven-release-plugin:jar:2.3.2
  Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metada
  ta.xml
  Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
  -metadata.xml
  [WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/
  to central (https://repo.maven.apache.org/maven2): sun.security.validator.Valida
  torException: PKIX path building failed: sun.security.provider.certpath.SunCertP
  athBuilderException: unable to find valid certification path to requested target
  
  [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xm
  l from/to central (https://repo.maven.apache.org/maven2): sun.security.validator
  .ValidatorException: PKIX path building failed: sun.security.provider.certpath.S
  unCertPathBuilderException: 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.securit
  y.validator.ValidatorException: PKIX path building failed: sun.security.provider
  .certpath.SunCertPathBuilderException: unable to find valid certification path t
  o requested target
  [WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from h
  ttps://repo.maven.apache.org/maven2 was cached in the local repository, resoluti
  on will not be reattempted until the update interval of central has elapsed or u
  pdates 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.sec
  urity.provider.certpath.SunCertPathBuilderException: unable to find valid certif
  ication path to requested target
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 4.094 s
  [INFO] Finished at: 2016-01-13T12:48:00-06:00
  [INFO] Final Memory: 13M/123M
  [INFO] ------------------------------------------------------------------------
  [ERROR] No plugin found for prefix 'exec' in the current project and in the plug
  in groups [org.codehaus.mojo, org.apache.maven.plugins] available from the repos
  itories [local (C:\Users\myUser\.m2\repository), central (https://repo.maven.ap
  ache.org/maven2)] -&gt; [Help 1]
  org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found
  for prefix 'exec' in the current project and in the plugin groups [org.codehaus.
  mojo, org.apache.maven.plugins] available from the repositories [local (C:\Users
  \myUser\.m2\repository), central (https://repo.maven.apache.org/maven2)]
          at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.r
  esolve(DefaultPluginPrefixResolver.java:93)
          at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginF
  orPrefix(MojoDescriptorCreator.java:265)
          at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDesc
  riptor(MojoDescriptorCreator.java:219)
          at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcul
  ator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
          at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcul
  ator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
  eStarter.java:89)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:497)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
  cher.java:289)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
  a:229)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
  uncher.java:415)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
  356)
  [ERROR]
  [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 rea
  d the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF
  orPrefixException
  
  C:\temp\TaskletJavaConfig\spring-batch-helloworld&gt;
  </code></pre>
  
  <p>Evidence that there is no proxy </p>
  
  <pre><code>C:\temp\TaskletJavaConfig\spring-batch-helloworld&gt;netsh winhttp show proxy
  
  Current WinHTTP proxy settings:
  
      Direct access (no proxy server).
  </code></pre>
  
  <p>pom.xml </p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
         &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
         &lt;groupId&gt;com.test&lt;/groupId&gt;
         &lt;artifactId&gt;spring-batch-helloworld&lt;/artifactId&gt;
         &lt;version&gt;20131227&lt;/version&gt;
         &lt;name&gt;spring batch hello world&lt;/name&gt;
         &lt;packaging&gt;jar&lt;/packaging&gt;
  
         &lt;!-- pluginRepositories&gt;
                &lt;pluginRepository&gt;
                       &lt;id&gt;numberformat-releases&lt;/id&gt;
                       &lt;url&gt;https://raw.github.com/numberformat/20130213/master/repo&lt;/url&gt;
                &lt;/pluginRepository&gt;
         &lt;/pluginRepositories--&gt;
  
         &lt;properties&gt;
                &lt;spring.framework.version&gt;3.2.1.RELEASE&lt;/spring.framework.version&gt;
                &lt;spring.batch.version&gt;3.0.0.M2&lt;/spring.batch.version&gt;
         &lt;/properties&gt;
  
         &lt;repositories&gt;
                &lt;repository&gt;
                       &lt;id&gt;spring-s3&lt;/id&gt;
                       &lt;name&gt;Spring Maven MILESTONE Repository&lt;/name&gt;
                       &lt;url&gt;http://maven.springframework.org/milestone&lt;/url&gt;
                &lt;/repository&gt;
         &lt;/repositories&gt;
         &lt;dependencies&gt;
                &lt;dependency&gt;
                       &lt;groupId&gt;commons-lang&lt;/groupId&gt;
                       &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
                       &lt;version&gt;2.6&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                       &lt;groupId&gt;org.springframework.batch&lt;/groupId&gt;
                       &lt;artifactId&gt;spring-batch-core&lt;/artifactId&gt;
                       &lt;version&gt;${spring.batch.version}&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                       &lt;groupId&gt;org.springframework.batch&lt;/groupId&gt;
                       &lt;artifactId&gt;spring-batch-infrastructure&lt;/artifactId&gt;
                       &lt;version&gt;${spring.batch.version}&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                       &lt;groupId&gt;log4j&lt;/groupId&gt;
                       &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                       &lt;version&gt;1.2.17&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                       &lt;groupId&gt;junit&lt;/groupId&gt;
                       &lt;artifactId&gt;junit&lt;/artifactId&gt;
                       &lt;version&gt;4.8.2&lt;/version&gt;
                       &lt;scope&gt;test&lt;/scope&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                       &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                       &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
                       &lt;version&gt;${spring.framework.version}&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                       &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                       &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
                       &lt;version&gt;${spring.framework.version}&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                       &lt;groupId&gt;hsqldb&lt;/groupId&gt;
                       &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
                       &lt;version&gt;1.8.0.7&lt;/version&gt;
                &lt;/dependency&gt;
         &lt;/dependencies&gt;
  &lt;!-- added after Matteo recommendation--&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
              &lt;configuration&gt;
   &lt;mainClass&gt;org.springframework.batch.core.launch.support.CommandLineJobRunner&lt;/mainClass&gt;
              &lt;arguments&gt;
                  &lt;argument&gt;com.test.config.HelloWorldJobConfig&lt;/argument&gt;
                  &lt;argument&gt;helloWorldJob&lt;/argument&gt;
              &lt;/arguments&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/build&gt;
         &lt;!-- build&gt;
                &lt;plugins&gt;
                       &lt;plugin&gt;
                             &lt;groupId&gt;github.numberformat&lt;/groupId&gt;
                             &lt;artifactId&gt;blog-plugin&lt;/artifactId&gt;
                             &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
                             &lt;configuration&gt;
                                    &lt;gitUrl&gt;https://github.com/numberformat/wordpress/tree/master/${project.version}/${project.artifactId}&lt;/gitUrl&gt;
                             &lt;/configuration&gt;
                             &lt;executions&gt;
                                    &lt;execution&gt;
                                           &lt;id&gt;1&lt;/id&gt;
                                           &lt;phase&gt;site&lt;/phase&gt;
                                           &lt;goals&gt;
                                                  &lt;goal&gt;generate&lt;/goal&gt;
                                           &lt;/goals&gt;
                                    &lt;/execution&gt;
                             &lt;/executions&gt;
                       &lt;/plugin&gt;
                &lt;/plugins&gt;
         &lt;/build--&gt;
  
  &lt;!-- Run the application using:
  mvn compile exec:java -Dexec.mainClass=org.springframework.batch.core.launch.support.CommandLineJobRunner -Dexec.args="com.test.config.HelloWorldJobConfig helloWorldJob"
  --&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Settings.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  
    &lt;pluginGroups&gt;
                 &lt;pluginGroup&gt;org.codehaus.mojo&lt;/pluginGroup&gt;
    &lt;/pluginGroups&gt;
  
     &lt;proxies&gt;
     &lt;/proxies&gt;
     &lt;servers&gt;
     &lt;/servers&gt;
     &lt;mirrors&gt;
     &lt;/mirrors&gt;
     &lt;profiles&gt;
    &lt;/profiles&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>Logs with only mvn org.codehaus.mojo</p>
  
  <pre><code>C:\temp\TaskletJavaConfig\spring-batch-helloworld&gt;mvn org.codehaus.mojo:exec-mav
  en-plugin:1.1:java
  Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
  Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\
  bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
  [INFO] Scanning for projects...
  Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-p
  lugin/1.1/exec-maven-plugin-1.1.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.356 s
  [INFO] Finished at: 2016-01-13T15:29:20-06:00
  [INFO] Final Memory: 10M/123M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Plugin org.codehaus.mojo:exec-maven-plugin:1.1 or one of its dependencie
  s could not be resolved: Failed to read artifact descriptor for org.codehaus.moj
  o:exec-maven-plugin:jar:1.1: Could not transfer artifact org.codehaus.mojo:exec-
  maven-plugin:pom:1.1 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 certificatio
  n path to requested target -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
  ch.
  [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 rea
  d the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
  onException
  
  C:\temp\TaskletJavaConfig\spring-batch-helloworld&gt;mvn compile mvn org.codehaus.m
  ojo:exec-maven-plugin:1.1:java
  Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
  Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\
  bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
  [INFO] Scanning for projects...
  Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-p
  lugin/1.1/exec-maven-plugin-1.1.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.250 s
  [INFO] Finished at: 2016-01-13T15:31:03-06:00
  [INFO] Final Memory: 11M/123M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Plugin org.codehaus.mojo:exec-maven-plugin:1.1 or one of its dependencie
  s could not be resolved: Failed to read artifact descriptor for org.codehaus.moj
  o:exec-maven-plugin:jar:1.1: Could not transfer artifact org.codehaus.mojo:exec-
  maven-plugin:pom:1.1 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 certificatio
  n path to requested target -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
  ch.
  [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 rea
  d the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
  onException
  </code></pre>