# Generate a single Jar files with multiple jar files and wsdl file combined together

**URL:** <https://discuss.gradle.org/t/generate-a-single-jar-files-with-multiple-jar-files-and-wsdl-file-combined-together/43719>\
**Category:** Help/Discuss\
**Created:** [August 22, 2022, 8:04pm UTC](https://discuss.gradle.org/t/generate-a-single-jar-files-with-multiple-jar-files-and-wsdl-file-combined-together/43719 "2022-08-22T20:04:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarun850](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@tarun850](https://discuss.gradle.org/u/tarun850)\
**Post date:** [August 22, 2022, 8:04pm UTC](https://discuss.gradle.org/t/generate-a-single-jar-files-with-multiple-jar-files-and-wsdl-file-combined-together/43719/1 "2022-08-22T20:04:33Z")

</div>

Hi EveryOne,  
I am new to Gradle, any help is much appreciated.

I am trying to generate a JAR (salesforce-soap-connection.jar) file which i want to use as a dependency (Library ) in my project .  
Currently i generate this jar file using the command below and then push the generated jar file in my repo.

> java -classpath ./sf/force-wsc-45.0.0.jar:./sf/js-1.7R2.jar:./sf/ST4-4.3.1.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0\_291.jdk/Contents/Home/lib/tools.jar:./sf/antlr-4.7.2-complete.jar com.sforce.ws.tools.wsdlc ./sf/enterprise.wsdl ./sf/salesforce-soap-connection.jar

Basically i want to do this using Gradle.(instead of running above command ,do exactly what the command does using gradle)

The jar files that are used in the above command should me downloaded from maven repository and only enterprise.wsdl will be present in project/src/main/resources folder.

the generated jar file should be kept at project/lib folder.

This is my build.gradle file. Please suggest what to do next…

```gradle
plugins {
    id 'scala'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.scala-lang:scala-library:2.11.8'
    implementation 'joda-time:joda-time:2.1'
    implementation 'org.joda:joda-convert:2.1.1'
    implementation 'org.slf4j:slf4j-api:1.7.36'
    implementation 'org.apache.logging.log4j:log4j-api:2.6.2'
    implementation 'org.apache.logging.log4j:log4j-core:2.6.2'
    implementation 'com.google.cloud:google-cloud-storage:1.52.0'
    implementation 'com.google.cloud:google-cloud-bigquery:1.110.0'
    implementation 'org.jooq:jooq:3.12.0'
    implementation 'org.jooq:jooq-scala_2.11:3.10.5'
    implementation 'com.google.apis:google-api-services-bigquery:v2-rev459-1.25.0'
    implementation 'org.json:json:20180813'
    implementation 'com.google.code.gson:gson:2.8.3'
    implementation 'org.yaml:snakeyaml:1.25'
    implementation 'com.github.tototoshi:scala-csv_2.11:1.3.6'
    implementation 'org.json4s:json4s-native_2.11:3.6.10'
    implementation 'org.apache.commons:commons-dbcp2:2.0.1'
    implementation 'commons-io:commons-io:2.6'
    implementation fileTree('lib')
}

jar {
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
    manifest {
        attributes "Main-Class": "com.org.loader.main"
    }

    from {
        configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
    }
}

```
