You are viewing a plain text version of this content. The canonical link for it is here.
Posted to nmaven-dev@incubator.apache.org by Evan Worley <ev...@gmail.com> on 2007/05/08 01:31:26 UTC

VBAssemblyInfoMarshaller and JavaAssemblyInfoMarshaller

Hello,

I have a question about VBAssemblyInfoMarshaller and
JavaAssemblyInfoMarshaller.  I noticed that neither of these classes are
used, and they don't extend DefaultAssemblyInfoMarshaller, which provides
much of the implementation in the VB and Java assembly info marshallers.

If these classes aren't planned to be used, can they be deleted?  If there
are planned to be used, perhaps they should extend
DefaultAssemblyInfoMarshaller?  We are adding the use of the
AssemblyInformationalVersion to the default marshaller and don't want to
repeat this in the VB and Java marshaller if it is not necessary.

Thanks,
Evan

Re: VBAssemblyInfoMarshaller and JavaAssemblyInfoMarshaller

Posted by Shane Isbell <sh...@gmail.com>.
If the variable makes sense (and exists as an attribute) in all language
contexts and all framework versions, its best to keep all three marshallers
in sync. One thing to be careful of, is that the existing marshallers are
designed to be compatible with framework version 1.1 and higher: using  a
2.0 attribute would brake the existing implementation.

On 5/7/07, Evan Worley <ev...@gmail.com> wrote:
>
> Thanks for the thorough reply,
>
> We don't need to add a new Marshaller as we just added a field to the
> AssemblyInfo and then subsequently used it in the
> DefaultAssemblyInfoMarshaller.  I was just browsing through the classes
> and
> noticed that they write essentially the same info in a different format.
> Since we were adding a new field to AssemblyInfo and the default
> marshaller,
> I was wondering if we should add that field to the VB and the Java
> marshaller as well.
>
> Thanks,
> Evan
>
> On 5/7/07, Shane Isbell <sh...@gmail.com> wrote:
> >
> > Hi Evan,
> >
> > It looks as though you are digging into the internals, which is good.
> Both
> > Java and VB are supported languages. You won't find a compile-time
> > dependency within the code. Take a look under
> > dotnet-core/src/main/resources/ META-INF/nmaven for the config files.
> The
> > way the loading works is that the the plexus container is configured to
> > load
> > the registry-config.xml file (check the RepositoryRegistryImpl
> initialize
> > method). The Registry then passes the assembly-plugins config to the
> > org.apache.maven.dotnet.assembler.impl.AssemblyPluginsRepository, which
> in
> > turns dynamically instantiates the
> > org.apache.maven.dotnet.assembler.impl.VBAssemblyInfoMarshaller and
> > org.apache.maven.dotnet.assembler.impl.JavaAssemblyInfoMarshallerclasses.
> >
> > The DefaultAssemblyInfoMarshaller is final and is not meant to be
> > extended. It should be used by those languages that support the common
> > bracket notation for the attributes. If a language uses a different
> > notation, then the developer should create a new implementation of the
> > AssemblyInfoMarshaller interface. Given this, if you are adding new
> > information to the DefaultAssemblyInfoMarshaller, it won't require a
> > change
> > for VB and Java, unless you change the AssemblyInfoMarshaller interface,
> > which should not be required since you can just add new accessor/mutator
> > methods to the AssemblyInfo class itself.
> >
> > Regards,
> > Shane
> >
> >
> > On 5/7/07, Evan Worley <ev...@gmail.com> wrote:
> > >
> > > Hello,
> > >
> > > I have a question about VBAssemblyInfoMarshaller and
> > > JavaAssemblyInfoMarshaller.  I noticed that neither of these classes
> are
> > > used, and they don't extend DefaultAssemblyInfoMarshaller, which
> > provides
> > > much of the implementation in the VB and Java assembly info
> marshallers.
> > >
> > > If these classes aren't planned to be used, can they be deleted?  If
> > there
> > > are planned to be used, perhaps they should extend
> > > DefaultAssemblyInfoMarshaller?  We are adding the use of the
> > > AssemblyInformationalVersion to the default marshaller and don't want
> to
> > > repeat this in the VB and Java marshaller if it is not necessary.
> > >
> > > Thanks,
> > > Evan
> > >
> >
>

Re: VBAssemblyInfoMarshaller and JavaAssemblyInfoMarshaller

Posted by Evan Worley <ev...@gmail.com>.
Thanks for the thorough reply,

We don't need to add a new Marshaller as we just added a field to the
AssemblyInfo and then subsequently used it in the
DefaultAssemblyInfoMarshaller.  I was just browsing through the classes and
noticed that they write essentially the same info in a different format.
Since we were adding a new field to AssemblyInfo and the default marshaller,
I was wondering if we should add that field to the VB and the Java
marshaller as well.

Thanks,
Evan

On 5/7/07, Shane Isbell <sh...@gmail.com> wrote:
>
> Hi Evan,
>
> It looks as though you are digging into the internals, which is good. Both
> Java and VB are supported languages. You won't find a compile-time
> dependency within the code. Take a look under
> dotnet-core/src/main/resources/ META-INF/nmaven for the config files. The
> way the loading works is that the the plexus container is configured to
> load
> the registry-config.xml file (check the RepositoryRegistryImpl initialize
> method). The Registry then passes the assembly-plugins config to the
> org.apache.maven.dotnet.assembler.impl.AssemblyPluginsRepository, which in
> turns dynamically instantiates the
> org.apache.maven.dotnet.assembler.impl.VBAssemblyInfoMarshaller and
> org.apache.maven.dotnet.assembler.impl.JavaAssemblyInfoMarshaller classes.
>
> The DefaultAssemblyInfoMarshaller is final and is not meant to be
> extended. It should be used by those languages that support the common
> bracket notation for the attributes. If a language uses a different
> notation, then the developer should create a new implementation of the
> AssemblyInfoMarshaller interface. Given this, if you are adding new
> information to the DefaultAssemblyInfoMarshaller, it won't require a
> change
> for VB and Java, unless you change the AssemblyInfoMarshaller interface,
> which should not be required since you can just add new accessor/mutator
> methods to the AssemblyInfo class itself.
>
> Regards,
> Shane
>
>
> On 5/7/07, Evan Worley <ev...@gmail.com> wrote:
> >
> > Hello,
> >
> > I have a question about VBAssemblyInfoMarshaller and
> > JavaAssemblyInfoMarshaller.  I noticed that neither of these classes are
> > used, and they don't extend DefaultAssemblyInfoMarshaller, which
> provides
> > much of the implementation in the VB and Java assembly info marshallers.
> >
> > If these classes aren't planned to be used, can they be deleted?  If
> there
> > are planned to be used, perhaps they should extend
> > DefaultAssemblyInfoMarshaller?  We are adding the use of the
> > AssemblyInformationalVersion to the default marshaller and don't want to
> > repeat this in the VB and Java marshaller if it is not necessary.
> >
> > Thanks,
> > Evan
> >
>

Re: VBAssemblyInfoMarshaller and JavaAssemblyInfoMarshaller

Posted by Shane Isbell <sh...@gmail.com>.
Hi Evan,

It looks as though you are digging into the internals, which is good. Both
Java and VB are supported languages. You won't find a compile-time
dependency within the code. Take a look under
dotnet-core/src/main/resources/ META-INF/nmaven for the config files. The
way the loading works is that the the plexus container is configured to load
the registry-config.xml file (check the RepositoryRegistryImpl initialize
method). The Registry then passes the assembly-plugins config to the
org.apache.maven.dotnet.assembler.impl.AssemblyPluginsRepository, which in
turns dynamically instantiates the
org.apache.maven.dotnet.assembler.impl.VBAssemblyInfoMarshaller and
org.apache.maven.dotnet.assembler.impl.JavaAssemblyInfoMarshaller classes.

The DefaultAssemblyInfoMarshaller is final and is not meant to be
extended. It should be used by those languages that support the common
bracket notation for the attributes. If a language uses a different
notation, then the developer should create a new implementation of the
AssemblyInfoMarshaller interface. Given this, if you are adding new
information to the DefaultAssemblyInfoMarshaller, it won't require a change
for VB and Java, unless you change the AssemblyInfoMarshaller interface,
which should not be required since you can just add new accessor/mutator
methods to the AssemblyInfo class itself.

Regards,
Shane


On 5/7/07, Evan Worley <ev...@gmail.com> wrote:
>
> Hello,
>
> I have a question about VBAssemblyInfoMarshaller and
> JavaAssemblyInfoMarshaller.  I noticed that neither of these classes are
> used, and they don't extend DefaultAssemblyInfoMarshaller, which provides
> much of the implementation in the VB and Java assembly info marshallers.
>
> If these classes aren't planned to be used, can they be deleted?  If there
> are planned to be used, perhaps they should extend
> DefaultAssemblyInfoMarshaller?  We are adding the use of the
> AssemblyInformationalVersion to the default marshaller and don't want to
> repeat this in the VB and Java marshaller if it is not necessary.
>
> Thanks,
> Evan
>