title: Maven: How to use a build.gradle file?
body: <p>I'm a complete beginner with both Maven and Gradle. I have a working Maven project. Now I want to add a bunch of classes from another project which was built using Gradle. I want to take classes from the Gradle project and use it in my Maven project. When I copy the classes into my Maven project, I get a bunch of dependency errors. To resolve those errors I would like to add the required stuff to my <code>pom.xml</code> file.</p>
  
  <p><strong>Basically</strong>, I want to add all dependencies specified in a <code>build.gradle</code> file, to my <code>pom.xml</code> file.</p>
  
  <p>The <code>pom.xml</code> file:</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;myGroupId&lt;/groupId&gt;
    &lt;artifactId&gt;myArtifactId&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.8.0&lt;/version&gt;
          &lt;configuration&gt;
            &lt;release&gt;10&lt;/release&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;  
  
    &lt;/build&gt;
  
    &lt;dependencies&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.jgrapht/jgrapht-core --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jgrapht&lt;/groupId&gt;
          &lt;artifactId&gt;jgrapht-core&lt;/artifactId&gt;
          &lt;version&gt;1.2.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.jgrapht/jgrapht-jdk1.5 --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jgrapht&lt;/groupId&gt;
          &lt;artifactId&gt;jgrapht-jdk1.5&lt;/artifactId&gt;
          &lt;version&gt;0.7.3&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.jgrapht/jgrapht-ext --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jgrapht&lt;/groupId&gt;
          &lt;artifactId&gt;jgrapht-ext&lt;/artifactId&gt;
          &lt;version&gt;1.2.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
        &lt;artifactId&gt;guava&lt;/artifactId&gt;
        &lt;version&gt;27.0-jre&lt;/version&gt;
        &lt;!-- or, for Android: --&gt;
        &lt;!--  &lt;version&gt;27.0-android&lt;/version&gt;  --&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/net.sf.trove4j/trove4j --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.sf.trove4j&lt;/groupId&gt;
          &lt;artifactId&gt;trove4j&lt;/artifactId&gt;
          &lt;version&gt;3.0.3&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  
    &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>The <code>build.gradle</code> file:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
          maven { url 'https://maven.rapidminer.com/content/groups/public/' }
      }   
  }
  
  
  plugins { id 'com.rapidminer.extension' version '0.8.2' }
  
  // Define Maven artifact repositories
  repositories {
      jcenter()
      maven { url 'https://maven.rapidminer.com/content/groups/public/' }
      ivy {
          url "https://github.com/rapidprom/rapidprom-libraries/raw/${project.properties["version"]}/prom/"
          layout "pattern", {
              artifact "[module]-[revision]/[module]-[revision].[ext]"
              artifact "[module]-[revision]/[artifact].[ext]"
              ivy "[module]-[revision]/ivy-[module]-[revision].xml"
          }
      }
      ivy {
          url "https://github.com/rapidprom/rapidprom-libraries/raw/${project.properties["version"]}/thirdparty/lib/"
          layout "pattern", {
              artifact "[module]-[revision]/[module]-[revision].[ext]"
              ivy "[module]-[revision]/ivy-[module]-[revision].xml"
          }
      }
      ivy {
          url "https://github.com/rapidprom/rapidprom-libraries/raw/${project.properties["version"]}/thirdparty/resource/"
          layout "pattern", {
              artifact "[module]-[revision]/[module]-[revision].[ext]"
              ivy "[module]-[revision]/ivy-[module]-[revision].xml"
          }
      }   
  }
  
  extensionConfig {
  
      // The extension name
      name 'RapidProM'
  
      /*
       * The artifact group which will be used when publishing the extensions Jar
       * and for package customization when initializing the project repository.
       *
       */
      groupId = 'org.rapidprom'
  
      /*
       * The extension vendor which will be displayed in the extensions about box
       * and for customizing the license headers when initializing the project repository.
       *
       */
      vendor = "Eindhoven University of Technology"
  
      /*
       * The vendor homepage which will be displayed in the extensions about box
       * and for customizing the license headers when initializing the project repository.
       *
       */
      homepage = "www.rapidprom.org"
  
      // enable shadowJar before rapidminer dependency (otherwise build fails)
      shadowJar {
          zip64 true
      }
  
      // define RapidMiner version and extension dependencies
      dependencies {
          rapidminer '7.2.0'
          //extension namespace: 'text', version: '7.2.0'
      }
  }
  
  // Define third party library dependencies
  dependencies {
  
      compile group:"org.rapidprom", name:"ProM-Framework", version:"31245"
      compile "org.rapidprom:AcceptingPetriNet:6.7.93"
      compile "org.rapidprom:AlphaMiner:6.5.47"
      compile "org.rapidprom:Animation:6.5.50"
      compile "org.rapidprom:ApacheUtils:6.7.88"
      compile "org.rapidprom:BasicUtils:6.7.104"
      compile "org.rapidprom:BPMN:6.5.56"
      compile "org.rapidprom:BPMNConversions:6.5.48"
      compile "org.rapidprom:CPNet:6.5.84"
      compile "org.rapidprom:DataAwareReplayer:6.7.563"
      compile "org.rapidprom:DataPetriNets:6.5.291"
      compile "org.rapidprom:DottedChart:6.5.17"
      compile "org.rapidprom:EvolutionaryTreeMiner:6.7.154"
      compile "org.rapidprom:EventStream:6.5.72"
      compile "org.rapidprom:FeaturePrediction:6.5.61"
      compile "org.rapidprom:Fuzzy:6.5.33"
      compile "org.rapidprom:GraphViz:6.7.185"
      compile "org.rapidprom:GuideTreeMiner:6.5.18"
      compile "org.rapidprom:HeuristicsMiner:6.5.49"
      compile "org.rapidprom:HybridILPMiner:6.7.116"
      compile "org.rapidprom:InductiveMiner:6.7.297"
      compile "org.rapidprom:InductiveVisualMiner:6.7.413"
      compile "org.rapidprom:Log:6.7.293"
      compile "org.rapidprom:LogDialog:6.5.42"
      compile "org.rapidprom:LogProjection:6.5.38"
      compile "org.rapidprom:ModelRepair:6.5.12"
      compile "org.rapidprom:Murata:6.5.54"
      compile "org.rapidprom:PetriNets:6.7.95"
      compile "org.rapidprom:PNetAlignmentAnalysis:6.5.35"
      compile "org.rapidprom:PNAnalysis:6.7.122"
      compile "org.rapidprom:PNetReplayer:6.7.99"
      compile "org.rapidprom:PTConversions:6.5.3"
      compile "org.rapidprom:PomPomView:6.5.36"
      compile "org.rapidprom:SocialNetwork:6.5.35"
      compile "org.rapidprom:StreamAlphaMiner:6.5.15"
      compile "org.rapidprom:StreamAnalysis:6.5.38"
      compile "org.rapidprom:StreamInductiveMiner:6.5.42"
      compile "org.rapidprom:TransitionSystems:6.7.71"
      compile "org.rapidprom:TSPetriNet:6.5.35"
      compile "org.rapidprom:Uma:6.5.46"
      compile "org.rapidprom:Woflan:6.7.59"
      compile "org.rapidprom:XESLite:6.7.217"
      compile "org.rapidprom:Weka:6.7.3"
  }
  </code></pre>