title: Gradle - SIngle with Multiple Jars into Maven Repository
body: <p>I have a Gradle project which when build creates multiple Jar files based on certain rules like Classes A,B and C goto A.jar, Classes D,E and F goto B.jar and so on.</p>
  
  <p>Now I want to upload these Jar files into Maven repository. Though I am able to do it but I want to put each of these Jars in Maven Repository as a standalone artifact.</p>
  
  <p>For ex: Right now if I have project named MyProject and it has produces 2 Jar files : A.jar and B.jar, then in maven repository i have following structure</p>
  
  <pre><code>-------   Repo
            |
            |----com
                 |
                 |--- project
                      |
                      |---- MyProject
                            |
                            |---- version 1
                              | 
                              |--- A.jar
                              |--- B.jar 
  </code></pre>
  
  <p>But i want the following structure</p>
  
  <pre><code>-------   Repo
            |
            |----com
                 |
                 |--- project
                      |
                      |---- MyProject
                            |
                            |---- A
                              | 
                              |--- Version 1
                                |
                                |--- A.jar
                              |---- B 
                              |
                              |---- Version 1
                                 |
                                 |--- B.jar
  </code></pre>
  
  <p>That means i want to make sure that both A.jar and B.jar are two different artifacts in Maven repository, so that I can maintain different version of two.</p>
  
  <p>Right now, In order to put both the jars in maven repository I made sure I add following piece of code in build.gradle.</p>
  
  <pre><code>artifacts {
    archives A,B    
  }
  </code></pre>
  
  <p>One solution would be to have two different Gradle Projects containing the relevant classes and each project producing its own artefact but in my case this can't be short term solution. we already have something like this planned but that has low priority.</p>