# Class InvalidMavenPublicationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.gradle.api.GradleException
org.gradle.api.InvalidUserDataException
org.gradle.api.publish.maven.InvalidMavenPublicationException

All Implemented Interfaces:
  `Serializable`

public class InvalidMavenPublicationException extends InvalidUserDataException
Thrown when attempting to publish with an invalid `MavenPublication`.

Since:
  1.5
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InvalidMavenPublicationException(String publicationName, String error)`
  Creates a new `InvalidMavenPublicationException`.
  `InvalidMavenPublicationException(String publicationName, String error, Throwable cause)`
  Creates a new `InvalidMavenPublicationException`.

- ## Method Summary

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### InvalidMavenPublicationException

    public InvalidMavenPublicationException(String publicationName, String error)
    Creates a new `InvalidMavenPublicationException`.
    Since:
      1.5

  - ### InvalidMavenPublicationException

    public InvalidMavenPublicationException(String publicationName, String error, Throwable cause)
    Creates a new `InvalidMavenPublicationException`.
    Since:
      1.5