[ 
http://jira.codehaus.org/browse/MWAS-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=165399#action_165399
 ] 

Chris Graham commented on MWAS-30:
----------------------------------

Whilst I understand your concerns. I tend to take a wider view of things. I see 
the role of the plugin to set up and run tasks in any environment. 

Running a Hudson slave (which we can not really do in this case anyway) is a 
Hudson specific solution. Other CI tools may not be able to manage.

I do realise that I may be one of the few (only?) who need it, but nevertheless 
I still need it.

However, I just discovered yesterday that I need the same functionality (call a 
different script) which will allow me to filter the input parameters.

Under WebSphere Process Server (WPS) on AIX, ws_ant (not ws_ant.sh, btw) does 
not accept the standard -noinput switch. If you pass it, it fails with the 
error listed below.

The same rev of WPS (6.0.2.4) under Windows accepts the parameter (it either 
accepts it or is silently ignores it - either way it does not fail).

Here is a section of output:

[INFO] [was6:ejbdeploy {execution: default}]
[WARNING] Legacy mode - jdkComplianceLevel will NOT be taken into consideration 
(default will be used)
[INFO] All Parameters           [-buildfile 
/var/WebSphere/Hudson/jobs/eswm-TranServ-S4_ReconReport/workspace/S4_ReconReport_WPSEjb/target/was6-maven-plugin/was6plugin-build.xml
 -noinput wsEjbDeploy]
[INFO] Unknown argument: -noinput
[INFO] ant [options] [target [target2 [target3] ...]]
[INFO] Options: 
[INFO]   -help                  print this message
[INFO]   -projecthelp           print project help information
[INFO]   -version               print the version information and exit
[INFO]   -diagnostics           print information that might be helpful to
[INFO]                          diagnose or report problems.
[INFO]   -quiet, -q             be extra quiet
[INFO]   -verbose, -v           be extra verbose
[INFO]   -debug                 print debugging information
[INFO]   -emacs                 produce logging information without adornments
[INFO]   -logfile <file>        use given file for log
[INFO]     -l     <file>                ''
[INFO]   -logger <classname>    the class which is to perform logging
[INFO]   -listener <classname>  add an instance of class as a project listener
[INFO]   -buildfile <file>      use given buildfile
[INFO]     -file    <file>              ''
[INFO]     -f       <file>              ''
[INFO]   -D<property>=<value>   use value for given property
[INFO]   -propertyfile <name>   load all properties from file with -D
[INFO]                          properties taking precedence
[INFO]   -inputhandler <class>  the class which will handle input requests
[INFO]   -find <file>           search for buildfile towards the root of the
[INFO]                          filesystem and use it
[INFO] 
[INFO] Return code: 0

This error occurs directly from maven - so Hudson is not an issue at all.

So I had to make use of the alternateScript parameter so that I can filter the 
parameters:

#!/bin/sh

echo "All Parameters Passed In         [...@]"

# Loop until all parameters are used up
while [ "$1" != "" ]; do

    if [ $1 != "-noinput" ]; then
        params=$params" "$1
    fi

    # Shift all the parameters down by one
    shift

done

echo "Filtered Parameters Passed On    [$params]"

unset WAS_USER_SCRIPT

/usr/WebSphere602/ProcServer/bin/ws_ant $params

echo "ws_ant returned $?"

exit $?


Now I get:

[INFO] [was6:ejbdeploy {execution: default}]
[WARNING] Legacy mode - jdkComplianceLevel will NOT be taken into consideration 
(default will be used)
[INFO] All Parameters Passed In         [-buildfile 
/var/WebSphere/Hudson/jobs/eswm-TranServ-S4_ReconReport/workspace/S4_ReconReport_WPSEjb/target/was6-maven-plugin/was6plugin-build.xml
 -noinput wsEjbDeploy]
[INFO] Filtered Parameters Passed On    [ -buildfile 
/var/WebSphere/Hudson/jobs/eswm-TranServ-S4_ReconReport/workspace/S4_ReconReport_WPSEjb/target/was6-maven-plugin/was6plugin-build.xml
 wsEjbDeploy]
[INFO] Buildfile: 
/var/WebSphere/Hudson/jobs/eswm-TranServ-S4_ReconReport/workspace/S4_ReconReport_WPSEjb/target/was6-maven-plugin/was6plugin-build.xml
[INFO] 
[INFO] wsEjbDeploy:
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Starting workbench.
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   o0829.13
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Creating the project.
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Opening: /S4_ReconReport_WPSEjb.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Setting project description. 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Setting output location for: 'S4_ReconReport_WPSEjb' 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Setting classpath for: S4_ReconReport_WPSEjb 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Creating resource /S4_ReconReport_WPSEjb/ejbModule. 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Importing JAR..META-INF/ibm-ejb-jar-bnd.xmi
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Importing 
JAR..com/ibm/issw/reconreport/formatworkbook.dtd
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Importing JAR..com/ibm/issw/reconreport/workbook.dtd
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Importing 
JAR..com/ibm/issw/reconreport/ReportGenerator.class
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Importing 
JAR..com/ibm/issw/reconreport/task/ReconReportTaskBean.class
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Importing JAR..META-INF/ejb-jar.xml
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Importing 
JAR..META-INF/maven/com.ibm.sct.transerv/S4_ReconReport_WPSEjb/pom.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Importing 
JAR..META-INF/maven/com.ibm.sct.transerv/S4_ReconReport_WPSEjb/pom.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Looking for validation messages owned by uninstalled 
validators...
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Looking for validation messages owned by uninstalled 
validators...done.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Validating
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Removing Map Validator messages on S4_ReconReport_WPSEjb 
has started...
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Messages removed.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validation of S4_ReconReport_WPSEjb by Map Validator has 
started...
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validation of S4_ReconReport_WPSEjb by Map Validator is 
complete. All known p
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Removing EJB Validator messages on S4_ReconReport_WPSEjb 
has started...
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Messages removed.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validation of S4_ReconReport_WPSEjb by EJB Validator has 
started...
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validating 
com.ibm.issw.reconreport.task.ReconReportTaskBean.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validating com.ibm.websphere.scheduler.TaskHandler.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validating com.ibm.websphere.scheduler.TaskHandlerHome.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validation of S4_ReconReport_WPSEjb by EJB Validator is 
complete. All known p
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Removing EJB WebSphere Extension Validator messages on 
S4_ReconReport_WPSEjb 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Messages removed.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validation of S4_ReconReport_WPSEjb by EJB WebSphere 
Extension Validator has 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Validation of S4_ReconReport_WPSEjb by EJB WebSphere 
Extension Validator is c
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Generating deployment code
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Processing session bean: ReconReportTask
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Refreshing: /S4_ReconReport_WPSEjb/ejbModule.
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Building: /S4_ReconReport_WPSEjb
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Invoking Java Builder on /S4_ReconReport_WPSEjb.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Preparing for build
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Cleaning output folder
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Analyzing sources
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Compiling 
S4_ReconReport_WPSEjb/ejbModule/com/ibm/websphere/scheduler
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Build done
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Invoking Validation on /S4_ReconReport_WPSEjb.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Invoking Library Copying Builder on 
/S4_ReconReport_WPSEjb.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy]   Invoking Structured Document and Model Builder on 
/S4_ReconReport_WPSEjb.
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Invoking RMIC.
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Generating DDL
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Writing output file
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] Shutting down workbench.
[INFO] 
[INFO] [wsejbdeploy]                                                            
                    
[INFO] [wsejbdeploy] EJBDeploy complete.
[INFO] [wsejbdeploy] 0 Errors, 0 Warnings, 0 Informational Messages
[INFO] 
[INFO] BUILD SUCCESSFUL
[INFO] Total time: 32 seconds
[INFO] ws_ant returned 0
[INFO] Return code: 0
[INFO] ejbDeploy finished

Because this error occurs under pure Maven and only on AIX with WPS, I would 
like this patch (and I've already got a documentation update for it) committed 
so that I can kill two birds with one stone.

It enables me to run ejbDeploy with WPS 6.0.2.4, *AND* run everything under 
Hudson as well whilst targeting an alternate WebSphere base version.

Thanks.

-Chris


> Target alternate WebSphere Installation when run under WebSphere
> ----------------------------------------------------------------
>
>                 Key: MWAS-30
>                 URL: http://jira.codehaus.org/browse/MWAS-30
>             Project: Maven 2.x WebSphere 6 Plugin
>          Issue Type: New Feature
>         Environment: AIX, more than one version of WebSphere installed and 
> running on the one machine.
>            Reporter: Chris Graham
>            Assignee: David J. M. Karlsen
>         Attachments: MWAS30-1.patch
>
>
> If you are running Maven under a CI tool under WebSphere 6.1, all processes 
> spawned by the CI tool will automatically inherit the WAS 6.1 environment 
> variables. That will present a problem if you need to have the 
> was6-maven-plugin target a different version of WebSphere, eg 6.0.2.
> When the was6-maven-plugin calls ws_ant.(sh|bat) it calls setupCmdLine which 
> initialises most of the variables. There is one variable that points to the 
> specific instance/node/cluster/cell configuration, WAS_USER_SCRIPT.
> If this variable is not removed when calling a WebSphere 6.0.2 ws_ant, when 
> setupCmdLine is called it will still use the WAS 6.1 one that it inherited 
> when it was spawned.
> This patch provides an extra parameter, alternateScript, that will be run in 
> preference to ws_ant, thus allow it the ability to perform what ever setup is 
> necessary. In this case, simply unset the WAS_USER_SCRIPT variable. The 
> script pointed to by the alternateScript parameter still needs to call ws_ant 
> using the passed in parameters.
> This is in and working when run from Maven called by Hudson running under WAS 
> 6.1 but needing to target WAS 6.0.2.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to