Comments (5)
Workaround is:
xsd2java{
generatedXsdDir = file("generated-sources")
}
from wsdl2java.
Thanks for the. I am not sure how we can avoid this, as it is the "@OutputDirectory" annotation wich creates this in the first place. If I remove the annotation, the task will stop beeing incremental as I see it. Or do you have a solution for this @fowlie ?
Maybe the cleanest solution would be to extract the xsd-task into a separate plugin instead of mixing it into the wsdl2java plugin?
from wsdl2java.
You don't have to declare the output directory to get incremental build. But I think it's a good practise. Why? If someone is clever enough (new junior developer in the team) changes a generated java class, they might think it's all fine. Because their changes will stay there the whole time, until one day someone changes the input source files and the java classes are regenerated.
If you do a change in a generated file, then the change will be lost on the next build, and then you'd immediately realize that you've just changed a generated file.
To get the build incremental, it's enough with the input annotation. So that every time the source files gets updated, the java classes are regenerated. And when they don't change, Gradle will skip the task. That's the most important thing.
@shalugin any particular reason you don't want the directory to be created even if it's empty? In our team, we have everything generated inside the build directory. That way you can clean everything with the gradle clean command.
from wsdl2java.
Okey, now I understand your problem. 😄 You are not using xsd2java at all! So the problem is that the tasks have different output paths. One way to easily solve this could be to always put generated code in e.g. build/generated-sources. And then the generatedWsdlDir would be relative to that directory.
from wsdl2java.
One way to easily solve this could be to always put generated code in e.g. build/generated-sources.
I think, that is the best solution.
Another one is not to execute xsd2java or wsdl2java by default. And execute it only when it called explicitly.
For example:
compileJava.dependsOn xsd2java
from wsdl2java.
Related Issues (20)
- Deploy new release to bintray HOT 1
- NEGOTIATE authentication error: No valid credentials provided (Mechanism level: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt))
- Copy to target folder does not overwrite classes
- Java 11 No class def JAXBException
- issue with commons-io
- doesn't work with bloop HOT 2
- WSDL2Java Plugin generatedWsdlDir exception
- conflict with other jaxb version?
- Failed to access the WSDL at: file:./src/main/resources/wsdl/some_service.wsdl HOT 1
- Could not resolve no.nils:wsdl2java:0.12 Jcenter down HOT 1
- Compatibility with gradle 7.0 HOT 8
- Gradle 7 missing input/output annotations HOT 2
- Unable to load class 'com.sun.xml.bind.Utils'. HOT 2
- Feature request: support JAXB 3.0 HOT 2
- Configuration with name 'compile' not found with Gradle 7.4
- Namespace-package mapping drops www
- java.lang.NoClassDefFoundError: jakarta/xml/bind/JAXBException HOT 4
- Jaxbexception: classes not present in jax context
- Library not available on maven repository
- wsdl2Java build error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wsdl2java.