boothen / gradle-wsimport

Yet Another WsImport Gradle Plugin.
https://plugins.gradle.org/plugin/uk.co.boothen.gradle.wsimport
Apache License 2.0
12 stars 11 forks source link

When declaring multiple wsdl files only the first one is processed #30

Closed mrodal closed 8 months ago

mrodal commented 8 months ago

Like reported on this issue: https://github.com/boothen/gradle-wsimport/issues/26 Only that I dont have multiple top level wsimport tasks. Here's my only task:

wsimport {
    includeDependencies = false
    target = "2.2"

    wsdl "service1.wsdl"
    wsdl "service2.wsdl"
}

If I comment out the service1 line, then it processes service2.wsdl

boothen commented 8 months ago

Hi @mrodal,

Might be something simple like using equals when assigning the wsdl files. i.e.

wsimport {
    includeDependencies = false
    target = "2.2"

    wsdl = "service1.wsdl"
    wsdl = "service2.wsdl"
}

I can't see why it isn't working otherwise.

Cheers, Matt.

mrodal commented 8 months ago

Hi @boothen , Its still doing the same 😕 Is it working correctly for you? I tried with a empty project and the issue remains, this is the whole build.gradle:

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.2'
    id 'io.spring.dependency-management' version '1.1.4'
    id "uk.co.boothen.gradle.wsimport" version "0.21"
}

group = 'com.santander.ws-demo'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = '17'
}

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-web-services'
    implementation 'org.springframework.ws:spring-ws-security'
    implementation 'org.apache.ws.security:wss4j:1.6.19'
    compileOnly 'org.projectlombok:lombok'
    developmentOnly 'org.springframework.boot:spring-boot-devtools'
    annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
    useJUnitPlatform()
}

wsimport {
    wsdl = "service1.wsdl"
    wsdl = "service2.wsdl"
}
boothen commented 8 months ago

What version of Gradle are you using? Have you tried setting different packages for each wsdl? Just in case there's a naming clash causing the issue.

wsimport {
    wsdl ("service1.wsdl") {
        packageName("com.different.package.service1")
    }
    wsdl ("service2.wsdl") {
        packageName("com.different.package.service2")
    }
}
mrodal commented 8 months ago

The issue persists, only the first one is processed.. I tried with both gradle 8.5 and 7.2, same behaviour

boothen commented 8 months ago

If you add

    verbose = true
    quiet = false
    debug = true
    xdebug = true

can you see 2nd file being processed?

mrodal commented 8 months ago

Found the issue, I was executing this task: image

Didnt know I had to gradle sync for new tasks to be generated for each file image

Thank you for the help!