Uploaded image for project: 'NPanday'
  1. NPanday
  2. NPANDAY-378

malformed npanday-settings.xml should fail the build

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4-incubating
    • 1.4-incubating
    • Maven Plugins
    • None

    Description

      Steps to reproduce:

      1) Add an unrecognized tag in your npanday-settings.xml.
      2) Open and build a project
      2) Notice the results:

      Actual Behavior: NPanday was able to build the project successfully but a XmlPullParserException was thrown:

      [INFO] [NPanday.Plugin.Settings.JavaBinding:generate-settings

      {execution: default-generate-settings}

      ]
      org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'localRepository' (position: START_TAG seen ...xmlns:xsd="http://www.w3.org/2001/XMLSchema">\r\n <localRepository>... @3:20)
      at npanday.model.settings.io.xpp3.NPandaySettingsXpp3Reader.parseNPandaySettings(NPandaySettingsXpp3Reader.java:508)
      at npanday.model.settings.io.xpp3.NPandaySettingsXpp3Reader.read(NPandaySettingsXpp3Reader.java:876)
      at npanday.model.settings.io.xpp3.NPandaySettingsXpp3Reader.read(NPandaySettingsXpp3Reader.java:887)
      at npanday.vendor.impl.SettingsRepository.load(SettingsRepository.java:86)
      at NPanday.Plugin.Settings.SettingsGeneratorMojo.isFrameworkVersionExisting(SettingsGeneratorMojo.java:218)
      at NPanday.Plugin.Settings.SettingsGeneratorMojo.preExecute(SettingsGeneratorMojo.java:180)
      at npanday.plugin.AbstractMojo.execute(AbstractMojo.java:98)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)

      Expected Behavior: Project should not build successful but instead throw an error informing user that npanday-settings.xml is malformed (e.g unrecognized tag)

      Attachments

        Activity

          People

            apadilla Adelita Padilla
            apadilla Adelita Padilla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: