I am trying to use resource filtering to generate the SOAP addresses for WSDLs. But somehow it is not working. I have written the plugin and resource element as:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<id>process-urls</id>
<phase>clean</phase>
<goals>
<goal>resources</goal>
</goals>
<inherited>false</inherited>
<configuration>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
<filters>
<filter>src/main/resources/PO/WSDLFiles/ProcessOrder.wsdl</filter>
<filter>src/main/resources/DAC/WSDLFiles/InternalRequest.wsdl</filter>
</filters>
<overwrite>true</overwrite>
</configuration>
</execution>
</executions>
</plugin>
<resources>
<resource>
<directory>src/main/resources/</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
I have some profile values defined under, ${protocol}
, ${fullhostname}
and ${port}
The WSDL tag, that I want to get modified is like:
<service name="ProcessOrderService">
<port name="ProcessOrderSoapHttpPort" binding="tns:ProcessOrderSoapHttpBinding">
<soap:address location="${protocol}://${fullhostname}:${port}/PO/services/ProcessOrderSoapHttpPort"/>
</port>
</service>
When I run my pom file which also has a CXF plugin to generate classes I see that the URL in the JAVA objects get generated with:
${protocol}://${fullhostname}:${port}/PO/services/ProcessOrderSoapHttpPort
It just picks up the string as-is, with no values applied. Can you please tell me what I am doing wrong? I am guessing the "" in the WSDL attribute is causing the problem but I might be wrong.