[ http://jira.codehaus.org/browse/MNG-2487?page=all ]
Brett Porter closed MNG-2487.
-----------------------------
Assignee: Brett Porter
Resolution: Fixed
applied and reviewed, with the exception of the comments on MCOMPILER-42 (and
likewise omission of the dotnet-resources plugin)
> Dotnet Resources Support (code fix included)
> --------------------------------------------
>
> Key: MNG-2487
> URL: http://jira.codehaus.org/browse/MNG-2487
> Project: Maven 2
> Issue Type: Improvement
> Components: Sandbox
> Environment: Windows XP
> Reporter: James Carpenter
> Assigned To: Brett Porter
> Attachments: masterzip.zip
>
>
> The csharp plugins (currently in the sandbox) do not properly support csharp
> resources. It turns out that solving the problem requires changing several
> of the standard plugins. To resolve the problem I have made a few small
> changes to the following code:
> 1) Created the maven-dotnet-resources-plugin.
> >This plugin is a clone of the standard resources plugin. The only real
> change is to change the expression used in computing the output directory
> >within the @parameter tag of the Mojos. The output directory of the
> maven-dotnet-resources-plugin points at a temporary directory down in
> >the target.
> >@parameter
> expression="${project.build.directory}/csharp-workarea/dotnet-resources-plugin/resources"
>
> >for the DotNetResourcesMojo, similar for the DotNetTestResourcesMojo
> >This is the same expression used for the filteredResourcesDirectory
> instance variable in the modified maven-compiler-plugin.
> >Upon inspection the reader will soon realize the standard and dotnet
> resources plugins should be somehow refactored so as to avoid
> >the gross copy/paste reuse.
> 2) maven-compiler-plugin
> >Added filteredResourcesDirectory and TestResourcesDirectory to the
> CompilerMojo and TestCompilerMojo respectively. This is used to add a
> resourceDir custom compiler configuration whenver the attributes point to
> actual directories.
> 3) plexus-compiler-csharp
> >Added code to leverage the resourceDir compiler argument now being
> passed down by the maven-compiler-plugin.
> 4) Modified the maven-csharp-lifecycle plugin
> >Changed META-INF/plexus/components.xml so as to replace
> maven-resources-plugin with maven-dotnet-resources-plugin
>
> ================================
> Description from new maven-dotnet-resources-plugin (explains the overall
> motivation):
> The maven dotnet resources plugin is almost identical to the standard
> resources plugin. The only difference is the result of
> the resources and testResources goals are copied into special workarea
> directories under target. Unlike javac which produces
> a directory of class files which are typically archived in jar format by the
> jar tool after javac has run, the csc (C# compiler) directly
> produces an archive (a dll containing the dotnet assembly). Consequently,
> csc must be passed each resource using the resource option. The
> csharp compiler plugin and this plugin therefore collaborate. This dotnet
> resources plugin places the resources in a temporary workarea under target
> and the csharp compiler plugin produces resource option arguments to csc for
> every file found there. You will notice all the filter support available in
> the standard resources plugin is also available in the dotnet resources
> plugin.
> =================================
> The attached maven-csharp plugins are currently set to SNAPSHOT as I havn't
> yet created a new inhouse release for them. I'll probably do this as soon as
> I finish this jira issue.
> =================================
> The attached zip file contains relevant patch files along with complete zips
> of the code. You will notice the csharp plugins are slightly improved from
> what is currently in the sandbox. To my knowledge the development of the
> sandboxed csharp plugins is rather stagnated. There is probably enough code
> here to bring the csharp plugins to an alpha release. I would much prefer to
> be using officially released versions rather than having to maintain my own.
> I am happy to have a half hour phone conversation with maven developer with
> commit priviledges who can make this happen.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira