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

[regression introduced by 186] JavaBindings-Generator for .NET-Mojos is fragile (and not working for NPanday.Plugin.SettingsGenerator)

    XMLWordPrintableJSON

Details

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

    Description

      When building plugins\netplugins\NPanday.Plugin.Settings

      [INFO] [mojo-generator:generate-bindings {execution: default-generate-bindings}]
      [INFO] NPANDAY-068-005: Choose executable path's parent as execution path: C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Settings\target
      NPanday: Start Process = 28.03.2011 09:32:20
      "targetAssemblyFile=C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Settings\target\NPanday.Plugin.Settings.dll" "outputDirectory=C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Settings" "groupId=npanday.plugin" "artifactId=NPanday.Plugin.Settings" "artifactVersion=2.0-SNAPSHOT" "startProcessAssembly=C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Settings\target\NPanday.Plugin.MojoGenerator.exe" "pluginArtifactPath=C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Settings\target\NPanday.Plugin.dll"
      Creating Plugin Domain Manager
      Loading Generator: C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Settings\target
      Creating Plugin Domain Manager
      Assembly :mscorlib
      Assembly :NPanday.Plugin
      Assembly :NPanday.Plugin.Settings
      File Exists = True
      System.InvalidOperationException: There is an error in XML document (1, 1). ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
         at System.Xml.XmlTextReaderImpl.Throw(Exception e)
         at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
         at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
         at System.Xml.XmlReader.MoveToContent()
         at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderModel.Read50_project()
         --- End of inner exception stack trace ---
         at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
         at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
         at NPanday.Plugin.MojoGenerator.Generator.BuildPluginProject(AppDomain applicationDomain, FileInfo pluginArtifact, FileInfo outputDirectory, String groupId, String artifactId, String version)
      NPanday: End Process = 28.03.2011 09:32:20; exit code = 0
      [INFO] snapshot npanday:dotnet-repository:2.0-SNAPSHOT: checking for updates from apache.snapshots
      [INFO] [repository:convert-artifact {execution: default-convert-artifact}]
      28.03.2011 09:32:22 info.aduna.lang.service.ServiceRegistry <init>
      INFO: Registered service class org.openrdf.query.parser.serql.SeRQLParserFactory
      

      I just had a quick look into 'dotnet\assemblies\NPanday.Plugin.MojoGenerator\src\main\csharp\NPanday\Plugin\MojoGenerator\Generator.cs'. It's just taking the first embedded resource.

      TextReader reader = new StreamReader(Assembly.GetExecutingAssembly().
      GetManifestResourceStream(Assembly.GetExecutingAssembly().GetManifestResourceNames()[0]));
      XmlSerializer serializer = new XmlSerializer(typeof(NPanday.Model.Pom.Model));
      

      This needs to be improved.

      Attachments

        Issue Links

          Activity

            People

              lcorneliussen Lars Corneliussen
              lcorneliussen Lars Corneliussen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: