We do a similar thing.  I follow along with your pom file, and the wsant
task, however, not your other output.  Our snippets as follows:

POM:

                      <execution>
                        <id>deploy-snapshot</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>wsStopApp</goal>
                            <goal>wsUninstallApp</goal>
                            <goal>wsDefaultBindings</goal>
                            <goal>installApp</goal>
                            <goal>wsAdmin</goal>
                        </goals>
                        <configuration>
                            <port>${soapPort}</port>
                            <host>${wasHostname}</host>
                            <targetCluster>${targetCluster}</targetCluster>
                            <server>${serverName}</server>
                            <virtualHost>${virtualHost}</virtualHost>
                            <forceBindings>true</forceBindings>
                            <args>
                                <arg>-earName</arg>
                                <arg>${project.build.finalName}</arg>
                                <arg>-s</arg>
                            </args>
                            <script>${mapModulesScript}</script>
                        </configuration>
                    </execution>

was6plugin-build.xml:

  <target name="wsAdmin">
    <taskdef name="wsAdmin"
classname="com.ibm.websphere.ant.tasks.WsAdmin"/>
    <!--
        fileEncoding=""
         -->
    <wsAdmin wasHome="C:\SDP75\runtimes\base_v61"
script="d:\path\to\script\MapModules.py" conntype="SOAP" host="localhost"
port="8880" user="user" password="password" jvmMaxMemory="256M"
failonerror="false">
      <arg value="-earName"/>
      <arg value="earName.ear"/>
      <arg value="-s"/>
    </wsAdmin>

When I run maven, either in the normal mode or with the -X flag, I do not
see the output that you see.  The way it is formatted, it is almost as if
the options you want passed to the jython script are being passed to the
wsadmin script.  However, I had thought the way the wsadmin script worked
was that any arguments it didn't recognize would automatically go to the
called script.  However, I do see this in our case:

[INFO] wsAdmin:
[INFO]   [wsadmin] WASX7209I: Connected to process "server1" on node
localhostNode01 using SOAP connector;  The type of process is:
UnManagedProcess
[INFO]   [wsadmin] WASX7303I: The following options are passed to the
scripting environment and are available as arguments that are stored in the
argv variable: "[-earName, earName.ear, -s]"

I'm assuming you do not see that last line?

Lastly, I just wanted to throw this out there:  RAD uses the base install of
WAS.  The argument you're passing in deals with a cluster.  Does your script
support being run on a base installation of WAS?


On Fri, Aug 20, 2010 at 10:36 AM, Matt Goodwin <[email protected]> wrote:

>   It looks like I'm effectively calling wsAdmin with my script and
> parameters specified. However my arguments are not passed to the script.  I
> saw this issue was created in http://jira.codehaus.org/browse/MWAS-3 but
> all it says is that the issue was fixed (not sure how).
>
> I have the following pom.xml:
> ...<snip>
>
> <
> plugin>
>
>   <groupId>*org*.*codehaus*.*mojo*</groupId>
>
>   <artifactId>was6-*maven*-*plugin*</artifactId>
>
>   <version>1.1.1</version>
>
>   <executions>
>
>     <
> execution>
>
>     <id>stop-clones</id>
>
>     <phase>integration-test</phase>
>
>     <goals>
>
>       <goal>wsAdmin</goal>
>
>     </goals>
>
>     <configuration>
>
>     <wasHome>${was6.wasHome}</wasHome>
>
>     <language>${was6.language}</language>
>
>     <username>${was6.*username*}</username>
>
>     <password>${was6.password}</password>
>
>     <server>${was6.server}</server>
>
>     <node>${was6.node}</node>
>
>     <targetCluster>${was6.targetCluster}</targetCluster>
>
>     <targetCell>${was6.targetCell}</targetCell>
>
>     <targetNode>${was6.targetNode}</targetNode>
>
>     <targetServer>${was6.targetServer}</targetServer>
>
>     <failOnError>${was6.failOnError}</failOnError>
>
>     <updateExisting>${was6.updateExisting}</updateExisting>
>
>     <conntype>${was6.*conntype*}</conntype>
>
>     <port>${was6.port}</port>
>
>     <verbose>${was6.verbose}</verbose>
>
>     <language>${was6.language}</language>
>
>     <script>${was6.scriptFile}</script>
>
>     <args>
>
>       <param>${was6.targetCluster}</param>
>
>       <param>${was6.targetCell}</param>
>
>     </args>
>
>     </configuration>
>
>   </execution>
>
> </
> executions>
>
> </plugin>
> ...<snip>
>
> the wsant file contains the args:
> <snip>...
>   <target name="wsAdmin">
>     <taskdef name="wsAdmin"
> classname="com.ibm.websphere.ant.tasks.WsAdmin"/>
>     <!--
>                 fileEncoding=""
>                  -->
>     <wsAdmin wasHome="C:\Program Files\IBM\SDP\runtimes\base_v61"
> script="&quot;C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\AppS
> vr01\scripts\stopClones.py&quot;" lang="jython" conntype="SOAP"
> host="xxx.xxx.xxx.xxxx" port="10003" jvmMaxMemory="256M" failonerror="true">
>       <arg value="MyCluster"/>
>       <arg value="MyCell"/>
>     </wsAdmin>
>   </target>
> ...</snip>
>
> and the following output from the maven execution where my script and
> arguments look like their being read:
>
> [INFO]   [wsadmin] 'com.ibm.wsspi.bootstrap.WSPreLauncher'
> [INFO]   [wsadmin] '-nosplash'
> [INFO]   [wsadmin] '-application'
> [INFO]   [wsadmin] 'com.ibm.ws.bootstrap.WSLauncher'
> [INFO]   [wsadmin] 'com.ibm.ws.runtime.WsAdmin'
> [INFO]   [wsadmin] '-f'
> [INFO]   [wsadmin] '"C:\Program
> Files\IBM\SDP\runtimes\base_v61\profiles\AppSvr01\scripts\stopClones.py"'
> [INFO]   [wsadmin] '-lang'
> [INFO]   [wsadmin] 'jython'
> [INFO]   [wsadmin] '-conntype'
> [INFO]   [wsadmin] 'SOAP'
> [INFO]   [wsadmin] '-host'
> [INFO]   [wsadmin] 'was01.lab01.fls01.consert.com'
> [INFO]   [wsadmin] '-port'
> [INFO]   [wsadmin] '10003'
> [INFO]   [wsadmin] 'Consert01OpsCenterCluster'
> [INFO]   [wsadmin] 'Consert01Cell'
> [INFO]   [wsadmin]
> [INFO]   [wsadmin] The ' characters around the executable and arguments are
> [INFO]   [wsadmin] not part of the command.
>
> It's just that nothing gets passed to the script apparently.  Is there a
> fix/workaround for this?
>
> Thanks,
>
> Matt
>
>
>
>

Reply via email to