Reputation: 11
I have to create lightweight java client. So I got 1 WSDL and few XSD Schema files from server, I`m using java17 and maven wsimport plugin this way:
<build>
<plugins>
<plugin>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<wsdlDirectory>${basedir}/src/main/resources</wsdlDirectory>
<sourceDestDir>${basedir}/src/main/java</sourceDestDir>
<bindingDirectory>src/main/resources</bindingDirectory>
<bindingFiles>
<bindingFile>OCISchemaLogin.xsd</bindingFile>
<bindingFile>OCISchemaUser.xsd</bindingFile>
<bindingFile>OCISchemaGroup.xsd</bindingFile>
</bindingFiles>
<extension>true</extension>
</configuration>
<executions>
<execution>
<id>myProjID</id>
<phase>generate-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlFiles>
<wsdlFile>WebService.wsdl</wsdlFile>
</wsdlFiles>
<packageName>my.package.name.soapClient</packageName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
And it works well, I got my classes, builed successfully project and did some server calls, but service has a lot of stuff, and i got around ~800 java classes in my project, but Im using only 7 of them. How can I generate only few certain classes ?
Im trying to find how to exclude other classes, but found only how to use certain source binding files with option but its not what I need, maybe theres some extra VM options? I also can remove them manualy, but this building have to be run on Jenkins side, and i need some better solution
Upvotes: 0
Views: 47