On 10/5/05, Jason van Zyl <[EMAIL PROTECTED]> wrote: > On Wed, 2005-10-05 at 18:56 +0000, John Fallows wrote: > > Is it possible to customize the syntax of pom.xml without impacting > > the rest of the Maven2? > > In theory yes, but would we want to allow that I don't know. What do you > want to customize? Is is something generally useful that might be > incorporated into Maven itself?
Not really - it's more of an intermediate step to aid initial Maven2 adoption for an existing build system. Over time we'll hopefully be able to consume pom.xml directly. We'll be sure to file any necessary enhancements or bugs that would otherwise prevent our migration to the standard pom.xmlsyntax. > > For example, could one provide a CustomMavenProjectBuilder and then > > register it as a Plexus MavenProjectBuilder component? > > Yes. > > > How would Maven2 decide which implementation to use, if both the > > Default and Custom implementations were registered on the M2 > > classpath? > > Plexus allows multiple implementations of a component which you select > by a component id or role hint as we call it in Plexus. You would make > your new component and would have to change the components.xml in maven- > project and it would work but I don't know if that's something I'd like > to see as a common occurrence. Agreed 100%. To get this working, we'd register a custom implementation with the same <role>, but a different <role-hint>, say <role-hint>custom-syntax</role-hint>? Then we would have to directly update META-INF/plexus/components.xml to add that <role-hint> to the <requirements> section of whatever consumes the MavenProjectBuilder <role>, right? Does that mean we'd need to update the following from maven-core-2.0.jar!/META-INF/plexus/components.xml? <component> <role>org.apache.maven.Maven</role> <implementation>org.apache.maven.DefaultMaven</implementation> <requirements> <requirement> <role>org.apache.maven.project.MavenProjectBuilder</role> <role-hint>custom-syntax</role-hint> </requirement> <requirement> <role>org.apache.maven.lifecycle.LifecycleExecutor</role> </requirement> <requirement> <role>org.apache.maven.usability.diagnostics.ErrorDiagnostics</role> </requirement> <requirement> <role>org.apache.maven.execution.RuntimeInformation</role> </requirement> </requirements> </component> I was wondering if it was possible to put this in a different JAR, and leave maven-core-2.0.jar unchanged. This seems to imply that the <role> org.apache.maven.Maven</role> would need it's own <role-hint> as well. Is there a convenient way to get Maven2 to use a custom <role-hint> when discovering the <role>org.apache.maven.Maven</role> during "mvn" invocation? Kind Regards, John Fallows > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > jvz. > > Jason van Zyl > jason at maven.org <http://maven.org> > http://maven.apache.org > > you are never dedicated to something you have complete confidence in. > No one is fanatically shouting that the sun is going to rise tomorrow. > They know it is going to rise tomorrow. When people are fanatically > dedicated to political or religious faiths or any other kind of > dogmas or goals, it's always because these dogmas or > goals are in doubt. > > -- Robert Pirzig, Zen and the Art of Motorcycle Maintenance > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >