You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by "Lars Corneliussen (JIRA)" <ji...@apache.org> on 2011/05/02 18:58:03 UTC

[jira] [Resolved] (NPANDAY-398) [regression introduced by 186] MojoGenerator can't generate .NET-Mojos referencing a newer NPanday.Plugin.dll

     [ https://issues.apache.org/jira/browse/NPANDAY-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Corneliussen resolved NPANDAY-398.
---------------------------------------

    Resolution: Fixed

Fixed in trunk, r1098732

> [regression introduced by 186] MojoGenerator can't generate .NET-Mojos referencing a newer NPanday.Plugin.dll
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: NPANDAY-398
>                 URL: https://issues.apache.org/jira/browse/NPANDAY-398
>             Project: NPanday
>          Issue Type: Bug
>          Components: Maven Plugins
>    Affects Versions: 1.3.1-incubating
>            Reporter: Lars Corneliussen
>            Assignee: Lars Corneliussen
>             Fix For: 1.3.1-incubating
>
>
> When building NPanday against a released version (e.g. trunk -> 1.3-incubating), there is a problem generating Mojos.
> The .NET-based Plugins we release should reference NPanday.Plugin.dll from the reactor using ${project.version} - in the current case 1.3.1-incubating-SNAPSHOT. But then the MojoGenerator is used from the bootstrap-version (1.3-incubating). This one also references (is compiled against) NPanday.Plugin of 1.3-incubating.
> Now, since NPanday.Plugin is strong-named the "old" MojoGenerator reflects on the "new" .NET-based Mojos and runs into a version conflict.
> In order to fix this, we have to relax the versioning in MojoGenerator by listening to AppDomain.AssemblyResolve event and help finding the right version.
> I'm not sure if we can "downgrade" the version for the Plugin reference, or if we need to load the newer NPanday.Plugin into the AppDomain and use that instead.
> {code}
> NPanday: Start Process = 12.04.2011 09:38:38
> "targetAssemblyFile=C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Addin\target\NPanday.Plugin.Addin.dll" "outputDirectory=C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Addin" "groupId=npanday.plugin" "artifactId=NPanday.Plugin.Addin" "artifactVersion=1.3.1-incubating-SNAPSHOT" "startProcessAssembly=C:\Workbench\NPanday\svn-trunk\target\NPanday.Plugin.MojoGenerator.exe" "pluginArtifactPath=C:\Workbench\NPanday\svn-trunk\target\NPanday.Plugin.dll"
> Creating Plugin Domain Manager
> Loading Generator: C:\Workbench\NPanday\svn-trunk\plugins\netplugins\NPanday.Plugin.Addin\target
> Creating Plugin Domain Manager
> Assembly :mscorlib
> Assembly :NPanday.Plugin
> Assembly :NPanday.Plugin.Addin
> [INFO]
> [INFO] Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'NPanday.Plugin.FieldAttribute' to type 'NPanday.Plugin.FieldAttribute'.
> [INFO]    at NPanday.Plugin.Generator.JavaClassUnmarshaller.convert(Type abstractMojoType, String groupId)
> [INFO]    at NPanday.Plugin.Generator.JavaClassUnmarshaller.GetMojosFor(String assemblyName, String groupId)
> [INFO]    at NPanday.Plugin.Generator.JavaClassUnmarshaller.GetMojosFor(String assemblyName, String groupId)
> [INFO]    at NPanday.Plugin.MojoGenerator.Generator.BuildPluginProject(AppDomain applicationDomain, FileInfo pluginArtifact, FileInfo outputDirectory, String groupId, String artifactId, String version)
> [INFO]    at NPanday.Plugin.MojoGenerator.Generator.Main(String[] args)
> NPanday: End Process = 12.04.2011 09:38:57; exit code = -532459699
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira