Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4-incubating
-
None
Description
Current Situation
Currently, code that handles AssemblyInfo.cs(.vb) is cluttered all over the project.
- AbstractCompilerMojo (compile phase) patches AssemblyInfo-versions for **/AssemblyInfo(.cs|.vb)
- AssemblyInfoGeneratorMojo (generate-sources phase) uses AssemblyInfo + AssemblyInfoMarshaller to generate new AssemblyInfos
The AssemblyInfoMarshaller does have a read implementation, but it's half-baked.
Solution
I think everything should be unified according to these rules:
- Make the name of AssemblyInfo and COPYRIGHT configurable (includes NPANDAY-406)
- generate-sources: If no AssemblyInfo found, generate one to target. Else copy the existing one.
- Never change the original AssemblyInfo file
- Make sure, AssemblyInfo file is not overridden by default compiler copy
- process-sources: Read the AssemblyInfo (Marshaller.unmarshal), patch it, and write it back using marshal-Method.
- Expose all attributes to the pom (copyright, description, ...)
- Allow custom assemblyinfo attributes to be specified in the pom