Java Reference
In-Depth Information
Creating the parent project
You don't truly need the parent project, but it does allow you to specify shared dependencies,
such as Java SE 6, Log4J, JUnit, or other items that both the client and the service require. The
parent can declare these dependencies, and also declare its children as the service and client
projects, like this:
<modules>
<module>ws</module>
<module>client</module>
</modules>
The purpose of the parent is so that you can build and deploy the service, then immediately
build the client against it to make sure that any changes in your WSDL are compatible with
your client, and vice versa.
Another reason is so that you have a single umbrella project that makes a convenient target
for integration builds. For example, if you're using something like Cruise Control ( ht-
tp://cruisecontrol.sourceforge.net/ ) or Hudson ( https://hudson.dev.java.net/ ) to perform con-
tinuous integration, it's easier to set up that tool to point to a single POM it needs to build.
However, if you're using a tool like Hudson on its own build server, you will probably need
to set up a profile for the build server to use when it specifies WSDL locations, a path to the
application server it should deploy to, and so on. Here's a quick example:
<profiles>
<!-- For shared Continuous Integration Hudson Build.
Developers should have their own profile set in profiles.xml,
which should be ignored by source repository. -->
<profile>
<id>myProject-integration-profile</id>
<activation>
<!-- This property is passed to Maven from within
the Hudson build configuration on the build server. -->
<property>
<name>integrationBuild</name>
<value>true</value>
</property>
</activation>
<properties>
<glassfish.home>/domains/devtools/glassfish/...</glassfish.home>
<my.wsdl.url>http://example.com:7575/my/
MyService?wsdl</my.wsdl.url>
</properties>
</profile>
</profiles>
Search WWH ::




Custom Search