Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-4255

jaxws-tools-maven-plugin output errors when there are multiline values for env properties

XMLWordPrintable

    • Hide

      run this on eg. latest Fedora where there are multiline environment variables defined:

      $ env
      ...
      BASH_FUNC_module%%=() {  _module_raw "$@" 2>&1
      }
      BASH_FUNC_scl%%=() {  if [ "$1" = "load" -o "$1" = "unload" ]; then
       eval "module $@";
       else
       /usr/bin/scl "$@";
       fi
      }
      ...
      

      to reproduce just run the quickstart using the plugin with affected version https://github.com/wildfly/quickstart/tree/main/jaxws-retail

      mvn clean install
      Show
      run this on eg. latest Fedora where there are multiline environment variables defined: $ env ... BASH_FUNC_module%%=() { _module_raw "$@" 2>&1 } BASH_FUNC_scl%%=() { if [ "$1" = "load" -o "$1" = "unload" ]; then eval "module $@" ; else /usr/bin/scl "$@" ; fi } ... to reproduce just run the quickstart using the plugin with affected version https://github.com/wildfly/quickstart/tree/main/jaxws-retail mvn clean install

      We already had some issue reported about this https://issues.redhat.com/browse/WFLY-11049 that has been resolved like env issue back then, extending documentation to "what you may encounter" - it has (to the extend of my knowledge) no effect on produced artifacts by the plugin, it just doesn't seem ok to have output error lines on successful run.

       

      [INFO] --- jaxws-tools-maven-plugin:1.2.3.Final:wsconsume (default) @ jaxws-retail-service ---
      [ERROR] /bin/sh: _module_raw: line 1: syntax error: unexpected end of file
      [ERROR] /bin/sh: error importing function definition for `_module_raw'
      [ERROR] /bin/sh: switchml: line 1: syntax error: unexpected end of file
      [ERROR] /bin/sh: error importing function definition for `switchml'
       

      It turned out the problem is in using very old plugin dependencies:
      similar issue at https://github.com/codehaus-plexus/plexus-utils/issues/14 where the resolution was to use org.codehaus.plexus:plexus-utils:jar:2.0.2 or newer but we are using very old one:

      [INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ jaxws-tools-maven-plugin ---
      [INFO] org.jboss.ws.plugins:jaxws-tools-maven-plugin:maven-plugin:1.2.3.Final
      [INFO] +- org.jboss.ws:jbossws-common-tools:jar:1.2.4.Final:compile
      [INFO] |  +- org.jboss.ws:jbossws-api:jar:1.0.3.Final:compile
      [INFO] |  \- log4j:log4j:jar:1.2.14:compile
      [INFO] +- gnu.getopt:java-getopt:jar:1.0.13:compile
      [INFO] +- org.apache.maven:maven-project:jar:2.2.1:compile
      [INFO] |  +- org.apache.maven:maven-settings:jar:2.2.1:compile
      [INFO] |  +- org.apache.maven:maven-profile:jar:2.2.1:compile
      [INFO] |  +- org.apache.maven:maven-model:jar:2.2.1:compile
      [INFO] |  +- org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
      [INFO] |  |  +- org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
      [INFO] |  |  +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile
      [INFO] |  |  \- backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
      [INFO] |  +- org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
      [INFO] |  +- org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
      [INFO] |  +- org.codehaus.plexus:plexus-utils:jar:1.5.15:compile
      [INFO] |  +- org.apache.maven:maven-artifact:jar:2.2.1:compile
      [INFO] |  \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
      [INFO] |     \- classworlds:classworlds:jar:1.1-alpha-2:compile
      [INFO] +- org.apache.maven:maven-plugin-api:jar:2.2.1:compile
      [INFO] +- junit:junit:jar:4.7:test
      [INFO] \- org.apache.maven.shared:maven-plugin-testing-harness:jar:1.1:test
      [INFO]    +- org.apache.maven:maven-core:jar:2.0:test
      [INFO]    |  +- org.apache.maven.wagon:wagon-file:jar:1.0-alpha-5:test
      [INFO]    |  +- org.apache.maven:maven-plugin-parameter-documenter:jar:2.0:test
      [INFO]    |  +- org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-alpha-5:test
      [INFO]    |  +- org.apache.maven.reporting:maven-reporting-api:jar:2.0:test
      [INFO]    |  |  \- doxia:doxia-sink-api:jar:1.0-alpha-4:test
      [INFO]    |  +- org.apache.maven:maven-error-diagnostics:jar:2.0:test
      [INFO]    |  +- commons-cli:commons-cli:jar:1.0:test
      [INFO]    |  +- org.apache.maven:maven-plugin-descriptor:jar:2.0:test
      [INFO]    |  +- org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:test
      [INFO]    |  +- org.apache.maven:maven-monitor:jar:2.0:test
      [INFO]    |  \- org.apache.maven.wagon:wagon-ssh:jar:1.0-alpha-5:test
      [INFO]    |     \- com.jcraft:jsch:jar:0.1.23:test
      [INFO]    \- org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-7:test
      

      So the minimal expected move here is to explicitly declare dependency on org.codehaus.plexus:plexus-utils:jar:2.0.2 or newer in org.jboss.ws.plugins:jaxws-tools-maven-plugin project.

            rhn-engineering-ema Jim Ma
            jbliznak@redhat.com Jan Blizňák
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: