0

I have been struggling since so many hrs to get rid of this error and unable to find out rootcause of project build failure. Any suggestion would be great help?
Here is the problem, I am not using maven-gpg-plugin but maven still throws below exception:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (default) 
on project beam-parent: Exit code: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (default) on project beam-parent: Exit code: 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
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:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

Pom file:

 <plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <configuration>
      <additionalparam>-Xdoclint:missing</additionalparam>
    </configuration>
  </plugin>

  <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
      <source>1.8</source>
      <target>1.8</target>
      <testSource>1.8</testSource>
      <testTarget>1.8</testTarget>
    </configuration>
  </plugin>

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
      <systemPropertyVariables>
        <beamTestPipelineOptions>
        </beamTestPipelineOptions>
      </systemPropertyVariables>
    </configuration>
  </plugin>

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
  </plugin>

  <!-- Source plugin for generating source and test-source JARs. -->
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
  </plugin>

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
  </plugin>

  <!-- Coverage analysis for unit tests. -->
  <plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
  </plugin>
</plugins>

There is similar question gpg plugin build failure but nothing helped.

Community
  • 1
  • 1
Rahul Sharma
  • 5,614
  • 10
  • 57
  • 91
  • Run Maven with -X option and redirect the output to a file and check the output of the log for maven-gpg-plugin...Furthermore why have you configured the maven-jar-plugin in your pom ? Is this a packaging jar pom or what? – khmarbaise Aug 10 '16 at 06:05
  • I got exception trace using -X parameter. yes using it to get test jars. – Rahul Sharma Aug 10 '16 at 17:52
  • To get test-jars the configuration is simply wrong. You should define the version via pluginManagement. The life cycle already bind maven-jar-plugin to the life cycle which means it will be executed...so no need to give a supplemental execution...Apart from that a full pom would help... – khmarbaise Aug 11 '16 at 08:19
  • why i am getting maven-gpg-plugin exception even i dont have that plugin in my pom? – Rahul Sharma Aug 11 '16 at 18:27
  • I assume you have inherited from your parent ? Without the full pom file it is impossible to help.. – khmarbaise Aug 11 '16 at 18:30
  • check messages before it: is there any gpg error/warning like `no default secret key: secret key not available` – Kuzeko Nov 30 '16 at 09:20

0 Answers0