Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-183

yang-maven-plugin-it may fail if build is called with the -s settings

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    Description

      Lets assume you want to build yangtools with a user setting file different that the one assumed by maven, like in the case of autorelease. So let say we call the build with:

      mvn -s mysettings.xml clean install

      lets assume mysettings.xml is defining some mirrors or adding extra repos, the yang-maven-plugin-it may fail in the execution of:

      yang/yang-maven-plugin-it/src/test/java/org/opendaylight/yangtools/yang2sources/plugin/it/YangToSourcesPluginTestIT.java

      when resolving artifacts in the org.apache.maven.it.Verifier invocation, because the settings.xml supplied in the build is not considered in the Verifier invocation.

      The fix to this would be to apply the verifier.addCliOptions("-s " + filesettings);

      assuming that the surefire/failsafe plugin could get that from the parent execution, or by passing an environment variable.

      The first option even if more easy to understand will stumble upon:
      https://jira.codehaus.org/browse/SUREFIRE-790

      while the second one is not very convenient because will proliferate variables to just pass the settings to a sub-maven process.
      The bug is opened mostly for tracking of the issue, and maybe because someone could find a smart way to address it.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            gmeo@cisco.com Giovanni Meo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: