On Jan 18, 2008 11:43 AM, Thomas Tardy <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I haven't managed to get the example from Peter Pilgrim's blog working. In
> the example they use the ant task. The problem I faced was, that you have
> to
> initialize the runtime with lot of properties and I wasn't feeling like
> finding all the required properties.
>
> Therefore I'm unsing the bat-file or shellscript included in each
> websphere
> installation. It's setting up all the requiered properties. And in the
> poms
> of my ejb projects it's looking like this.
>
> <plugins>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <phase>verify</phase>
> <configuration>
> <tasks>
> <property name="mvn.classpath" refid="
> maven.runtime.classpath" />
> <exec
> executable="${custom.was.home}/bin/ejbdeploy.bat"
> failonerror="true" os="Windows XP">
> <arg value="${project.build.directory
> }/${project.artifactId}-${project.version}.jar" />
> <arg
> value="${project.build.directory}/ejbdeply-working"
> />
> <arg value="${project.build.directory
> }/${project.artifactId}-${project.version}-OUTPUT.jar" />
> <arg value="-cp" />
> <arg value="${mvn.classpath}" />
> </exec>
> <exec
> executable="${custom.was.home}/bin/ejbdeploy.sh"
> failonerror="true" os="Linux">
> <arg value="${project.build.directory
> }/${project.artifactId}-${project.version}.jar" />
> <arg
> value="${project.build.directory}/ejbdeply-working"
> />
> <arg value="${project.build.directory
> }/${project.artifactId}-${project.version}-OUTPUT.jar" />
> <arg value="-cp" />
> <arg value="${mvn.classpath}" />
> </exec>
> <move file="${project.build.directory}/${
> project.artifactId}-${project.version}.jar" tofile="${
> project.build.directory}/${project.artifactId}-${project.version}-
> INPUT.jar"
> />
> <move file="${project.build.directory}/${
> project.artifactId}-${project.version}-OUTPUT.jar" tofile="${
> project.build.directory}/${project.artifactId}-${project.version}.jar" />
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
>
> It's working fine. The only condition you have is that you have access to
> a
> Websphere installation on the machine you are building the ejb.
> The ${custom.was.home} property is the path to the root directory of your
> Websphere installation.
>
> Hope this helps!
>
> Kind Regards,
> Thomas
>
>
Thanks Thomas .Whats your custom.was.home variable pointing to?
On the Windows platform , the plugin seems to battle with directory names
that have spaces in them.On my work machine , I'm using the RAD 6 and my
executable is pointing to "C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\bin\wsdeploy.bat"
which the plugin doesn't seem to like very much , complaining that :
[INFO] [exec:exec {execution: BankComponentEJB}]
[DEBUG] executable "C:\Program
Files\IBM\Rational\SDP\6.0\runtimes\base_v6\bin\wsdeploy.bat" not found in
place, assuming it is in the PATH.
[INFO] 'C:\Program' is not recognized as an internal or external command,
[INFO] operable program or batch file.
--
"Don't take the name of root in vain."
Jeff Mutonho
Cape Town
South Africa
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042