Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile(group: 'org.springframework.cloud', name: 'spring-cloud-starter-zookeeper-discovery', version:'2.1.0.RELEASE') { exclude(module: 'zookeeper') }, optional, it's not work #44

Open
halower opened this issue Mar 24, 2019 · 1 comment

Comments

@halower
Copy link

halower commented Mar 24, 2019

 compile(group: 'org.springframework.cloud', name: 'spring-cloud-starter-zookeeper-discovery', version:'2.1.0.RELEASE',optional) {
        exclude(module: 'zookeeper')
    }

it's not work,too

my maven code is

    <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
            <version>${spring-cloud-zookeeper.version}</version>
            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.zookeeper</groupId>
                    <artifactId>zookeeper</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
@shepherdviolet
Copy link

shepherdviolet commented Sep 9, 2019

'optional' is a closure.... so....

compile(group: 'org.springframework.cloud', name: 'spring-cloud-starter-zookeeper-discovery', version:'2.1.0.RELEASE') {
exclude(module: 'zookeeper')
// Manually call the code in the closure ...........
//project.ext.optionalDeps << it
optionalDeps << it
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants