gradlejbosssar

gradle: how to assemble a JBoss sar file


Is there a gradle plugin that allows me to assemble a JBoss sar file including its jboss-service.xml deployment descriptor file? Thanks for any tips on how best to do this.


Solution

  • Here is how I assembled a JBoss sar file using the Jar task:

    sourceSets {
        main {
            java {
                srcDir 'src/main/java'
                include '**/mypackage/service/*'
            }
        }
    }
    
    jar {
        extension = "sar"
        metaInf {
            from('src/mypackage/service') { 
                include 'jboss-service.xml'
            }
        }
    }