title: Build a project using gradle FAILURE: Build failed with an exception
body: <p>I am trying to build an opensource project using gradle, but when I run the "gradle clean" command within my local repository directory the following error message appears.</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  </code></pre>
  
  <ul>
  <li><p>Where:</p>
  
  <blockquote>
    <p>Build file '/home/muhammad/OpenSource/iotsys/iotsys/build.gradle' line: 3</p>
  </blockquote></li>
  <li><p>What went wrong:</p>
  
  <blockquote>
    <p>A problem occurred evaluating root project 'iotsys'.<br>
    Plugin with id 'maven-publish' not found.</p>
  </blockquote></li>
  <li><p>Try:</p>
  
  <blockquote>
    <p>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.</p>
  </blockquote></li>
  </ul>
  
  <blockquote>
    <p>BUILD FAILED</p>
  </blockquote>
  
  <p>my "build.gradle" file look like this</p>
  
  <pre><code>allprojects {
      apply plugin: 'java'
      apply plugin: 'maven-publish'
  apply plugin: 'maven'
  
  group = 'at.ac.tuwien.auto.iotsys'
  version = '0.1'
  sourceCompatibility = 1.6
  
  repositories(){
      mavenCentral()
      mavenRepo url: 'https://repository.jboss.org/nexus/content/repositories/releases/', name: 'JBoss Releases'
      mavenRepo url: 'https://repository.jboss.org/nexus/content/groups/public/', name: 'JBoss Public' }}
  </code></pre>
  
  <p>I am new to gradle and maven. Can any one please help me to solve this issue?</p>