Convert BDD-Security''s build.gradle to mvn pom

Content of build_nino.gradle

apply plugin: ''groovy''
apply plugin: ''java''
apply plugin: ''idea''
apply plugin: ''maven''
def cucumberVersion = "1.2.4"

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    compile group: ''net.masterthought'', name: ''cucumber-reporting'', version: "1.4.0"
    testCompile ''junit:junit:4.11''
    testCompile "info.cukes:cucumber-junit:$cucumberVersion"
    testCompile "info.cukes:cucumber-java:$cucumberVersion"
    testCompile "info.cukes:cucumber-picocontainer:$cucumberVersion"

    testCompile ''org.glassfish.jersey.core:jersey-client:2.15''
    testCompile ''com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.4.1''
    testCompile ''org.glassfish.jersey.media:jersey-media-moxy:2.15''
    testCompile ''org.apache.cxf:cxf-rt-rs-client:3.1.1''  //Jersey client
    testCompile ''junit:junit-dep:4.11''
    testCompile ''org.hamcrest:hamcrest-all:1.3''
    testCompile (''org.seleniumhq.selenium:selenium-java:2.53.1'') { exclude group: ''junit'' }
    testCompile ''org.seleniumhq.selenium:selenium-api:2.53.1''
    testCompile ''log4j:log4j:1.2.17''
    testCompile ''args4j:args4j:2.0.16''
    testCompile ''commons-configuration:commons-configuration:1.8''
    testCompile ''uk.com.robust-it:cloning:1.9.0''
    testCompile ''jline:jline:2.6''
    testCompile ''com.googlecode.java-diff-utils:diffutils:1.2.1''
    //testCompile ''org.apache.httpcomponents:httpcore:4.2.5''
    testCompile ''org.codehaus.jackson:jackson-mapper-asl:1.9.12''
    testCompile ''commons-jxpath:commons-jxpath:1.3''
    testCompile ''org.glassfish.jersey.core:jersey-client:2.6''
    testCompile ''org.glassfish.jersey.connectors:jersey-apache-connector:2.6''
    testCompile ''net.htmlparser.jericho:jericho-html:3.3''
    testCompile ''edu.umass.cs.benchlab:harlib:1.1.2''
    testCompile ''org.zaproxy:zap-clientapi:1.0.0''
    testCompile files ("lib/zap-client-1.0.0.jar", "lib/nessus-java-client-0.1-SNAPSHOT.jar","lib/jssylze-0.2-SNAPSHOT.jar")
}

task writeNewPom << {
    pom {
        project {
            groupId ''org.example''
            artifactId ''test''
            version ''1.0.0''
        
            inceptionYear ''2008''
            licenses {
                license {
                    name ''The Apache Software License, Version 2.0''
                    url ''http://www.apache.org/licenses/LICENSE-2.0.txt''
                    distribution ''repo''
                }
            }
        }
    }.writeTo("pom.xml")
}

Run:

$ gradle -b build_nino.gradle writeNewPom

Add below contents before dependencies tag

 <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.gpars</groupId>
        <artifactId>gpars</artifactId>
        <version>1.2.1</version>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>net.masterthought</groupId>
        <artifactId>cucumber-reporting</artifactId>
        <version>1.4.0</version>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

Ref

Apache Maven Archiver – Set Up The Classpath
Generating pom.xml from gradle

Show Comments