When I attempt to run \"mvn generate-sources\" this is my output :
SLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".
SLF4J: Defaulting to n
I see some people prefer to generate sources into the target via jaxws-maven-plugin AND make this classes visible in source via build-helper-maven-plugin. As an argument for this structure
the version management system (svn/etc.) would always notice changed sources
With git it is not true. So you can just configure jaxws-maven-plugin
to put them into your sources, but not under the target folder. Next time you build your project, git will not mark these generated files as changed. Here is the simple solution with only one plugin:
org.codehaus.mojo
jaxws-maven-plugin
2.6
org.jvnet.jaxb2_commons
jaxb2-fluent-api
3.0
com.sun.xml.ws
jaxws-tools
2.3.0
wsimport
som.path.generated
-Xfluent-api
true
true
${project.build.sourceDirectory}
src/main/resources/META-INF/wsdl
META-INF/wsdl/soap.wsdl
Additionally (just to note) in this example SOAP classes are generated with Fluent API, so you can create them like:
A a = new A()
.withField1(value1)
.withField2(value2);