You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-users@incubator.apache.org by Octavian <h....@gmail.com> on 2014/09/11 13:08:08 UTC
Add metadata to AssemblyInfo.cs file from pom.xml
Hello,
How can I add information like AssemblyCompany, AssemblyCopyright,
AssemblyProduct
from the configuration tag of
the org.apache.npanday.plugins:maven-compile-plugin?
I see that there is <assemblyInfo>, but the properties that I put there are
added as CustomStringAttribute in the AssemblyInfo.cs.
Thanks,
Octavian
Re: Add metadata to AssemblyInfo.cs file from pom.xml
Posted by Brett Porter <br...@apache.org>.
These are currently derived from the Maven POM:
String description = ( mavenProject.getDescription() != null ) ? mavenProject.getDescription() : "";
String version = ( mavenProject.getVersion() != null ) ? mavenProject.getVersion() : "";
String name = mavenProject.getName();
Organization org = mavenProject.getOrganization();
String company = ( org != null ) ? org.getName() : "";
...
assemblyInfo.setProduct( company + "-" + name );
That's in components/dotnet-assembler/src/main/java/npanday/assembler/impl/AssemblerContextImpl.java
If you're interested in improving on this, perhaps you could submit a patch to add additional configuration to the generate goal to override any of those with a speificed value. That code is in plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/AssemblyInfoGeneratorMojo.java
Cheers,
Brett
On 11 Sep 2014, at 11:08 pm, Octavian <h....@gmail.com> wrote:
> Hello,
>
> How can I add information like AssemblyCompany, AssemblyCopyright,
> AssemblyProduct
> from the configuration tag of
> the org.apache.npanday.plugins:maven-compile-plugin?
>
> I see that there is <assemblyInfo>, but the properties that I put there are
> added as CustomStringAttribute in the AssemblyInfo.cs.
>
> Thanks,
> Octavian