stoicflame / enunciate-gradle

Gradle plugin for Enunciate
Apache License 2.0
5 stars 4 forks source link

Cant exclude specific resource #27

Closed mtnoronha closed 4 years ago

mtnoronha commented 4 years ago

Hi, I'm trying to exclude a specific resource from Enunciate using gradle.

This is the relevant part of my build.gradle:

buildscript{ 
    repositories {
        maven { 
            url "https://repo.maven.apache.org/maven2"
        }

        maven {
          url "https://plugins.gradle.org/m2/"
        }
    }

    dependencies {          
        classpath group: 'gradle.plugin.com.webcohesion.enunciate', name: 'enunciate-gradle', version: '2.10.1'
    }
}

apply plugin: 'com.webcohesion.enunciate'

tasks.enunciate {
    File enunciateDistDir = file("build/libs/docs")
    doFirst {
        enunciateDistDir.deleteDir()
        enunciateDistDir.mkdirs()
                //also tried exclude here. 
    }
        //Tried all these 
    exclude "package.resource.service.AuthorizationService.java" 
    exclude "package.resource.service.AuthorizationService" 
    exclude "package.resource.service.AuthorizationService*" 
    exclude "package.resource.service.AuthorizationService**"
    export("docs", enunciateDistDir)
}

I also tried excluding the entire package, just to test. And nothing. Looks like I'm doing it wrong. Can someone please help? :D

mtnoronha commented 4 years ago

Also tried including only one resource, but same issue.

jskov-jyskebank-dk commented 4 years ago

It is an ant pattern, it goes something like "*/AuthorizationService." Paths (in the filesystem sense), not packages (in java sense).