You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Adam Jenkins <ma...@adamjenkins.net> on 2005/05/28 22:40:10 UTC

extending pom structure?

Hi All,

I'm helping out with the maven beehive plugin and wanted some input as
to extending the pom structure (mainly political & process input).  My
thinking is that I want to extend the build element children in a
similar way to aspectj.  So for beehive, in the pom we would have
something like:

<build>
        <beehiveWebServiceSource>...</beehiveWebServiceSource>
        <beehivePageFlowSource>...</beehivePageFlowSource>
        <beehiveXMLBeanSource>...</beehiveXMLBeanSource>
        <beehiveControlsSource>...</beehiveControlsSource>
</build>

I wanted to know if that's acceptable from a maven point of view or if
only core plugins are allowed to change the basic pom structure?  It's
no so much a technical question as an etiquite one :)  Would anyone have
any major objections to an addition like that (obviously only related to
our plugin, so it would have no impact on maven directly), or is the
polite thing to keep everything as properties?

Oh, and Brett...am looking forward to Wednesday.  A few of us are doing
the road trip thing up from Wollongong to catch your lecture at AJUG.
All are very excited.

Cheers
Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: extending pom structure?

Posted by Jason van Zyl <ja...@maven.org>.
On Sun, 2005-05-29 at 06:40 +1000, Adam Jenkins wrote:
> Hi All,
> 
> I'm helping out with the maven beehive plugin and wanted some input as
> to extending the pom structure (mainly political & process input).  My
> thinking is that I want to extend the build element children in a
> similar way to aspectj.  So for beehive, in the pom we would have
> something like:
> 
> <build>
>         <beehiveWebServiceSource>...</beehiveWebServiceSource>
>         <beehivePageFlowSource>...</beehivePageFlowSource>
>         <beehiveXMLBeanSource>...</beehiveXMLBeanSource>
>         <beehiveControlsSource>...</beehiveControlsSource>
> </build>
> 
> I wanted to know if that's acceptable from a maven point of view or if
> only core plugins are allowed to change the basic pom structure?  It's
> no so much a technical question as an etiquite one :)  Would anyone have
> any major objections to an addition like that (obviously only related to
> our plugin, so it would have no impact on maven directly), or is the
> polite thing to keep everything as properties?

We don't even do it with the aspectj plug-in in m2. There are some very
basic elements in the <build/> element but we are intentionally pushing
anything a specific plug-in needs to its corresponding <configuration/>
element. 

So we wouldn't extend the POM for beehive requirements but you have
total freedom to define what configuration you might like for the
beehive plug-in. So you might have something like the following:

...
<build>
  <plugins>
    <plugin>
      <artifactId>maven-beehive-plugin</artifactId>
      <configuration>
        <webServiceSource>...</webServiceSource>
        <pageFlowSource>...</pageFlowSource>
        <xmlBeanSource>...</xmlBeanSource>
        <controlSource>...</controlSource>
      </configuration>
    </plugin>
  </plugins>
</build>
...

And you may have default values for those things, which we highly
recommend, and then the configuration becomes even easier (and more
standard for your users). Though with our inheritance mechanism setting
default configurations for a set of projects is now pretty easy.

So the plan is extension via plug-in and you can define whatever
configuration model you like as the <configuration/> element actually
maps to fields and objects in your mojo (a plug-in is made up of one or
more mojos where a mojo is akin to an ant task). It works in a similar
fashion to XStream if you're familiar with that tool. Essentially your
configuration is an object model.

Hope that helps.

-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

the course of true love never did run smooth ...

 -- Shakespeare


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: extending pom structure?

Posted by Adam Jenkins <ma...@adamjenkins.net>.
>Great! Is there anything in particular you'd like to hear about?

I think just general direction is a big thing.  Maven 1 was a bit of a
steep learning curve and a big deal to "officially" move to from ant.
We're just now at the stage where the very senior developers are
comfortable with maven 1 and everyone else is just coming to grips with
it.  I think everyone is kind of dreading having to go through it all
again...change is a slow beast in the finance industry :).  

We've also got a whole bunch of custom plugins that I don't think anyone
is particularly looking to rewrite and 12 projects all with their own
maven.xml, so integration with existing structures will be hot in our
minds as well.

Personally, I'm interested in hearing about what you guys see that I
don't.  I think maven 1 is a massive leap forward for java build
management and is pretty close to perfection.  If someone were to ask
how to improve it, I'd probably say 'doco' and that's about it.  I'm
interested to see what I'm missing.  

So, all in all, looking forward to it :)  Hopefully I can get up to
speed with maven 2 before Wednesday so I can hit you up for some tip
with respect to this beehive plugin.

See you there.
Adam

On Sun, 2005-05-29 at 10:31 +1000, Brett Porter wrote:
> Adam Jenkins wrote:
> 
> >Hi All,
> >
> >I wanted to know if that's acceptable from a maven point of view or if
> >only core plugins are allowed to change the basic pom structure?  
> >
> Jason answered your question with regard to m2 and gives all the 
> reasoning. If you are using m1, these settings would be in 
> project.properties (eg maven.beehive.controlSource, etc).
> No plugins are able to change the basic pom structure actually - it is 
> built on java code, not a DOM.
> 
> >Oh, and Brett...am looking forward to Wednesday.  A few of us are doing
> >the road trip thing up from Wollongong to catch your lecture at AJUG.
> >All are very excited.
> >  
> >
> Great! Is there anything in particular you'd like to hear about?
> - Brett
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: extending pom structure?

Posted by Brett Porter <br...@apache.org>.
Adam Jenkins wrote:

>Hi All,
>
>I wanted to know if that's acceptable from a maven point of view or if
>only core plugins are allowed to change the basic pom structure?  
>
Jason answered your question with regard to m2 and gives all the 
reasoning. If you are using m1, these settings would be in 
project.properties (eg maven.beehive.controlSource, etc).
No plugins are able to change the basic pom structure actually - it is 
built on java code, not a DOM.

>Oh, and Brett...am looking forward to Wednesday.  A few of us are doing
>the road trip thing up from Wollongong to catch your lecture at AJUG.
>All are very excited.
>  
>
Great! Is there anything in particular you'd like to hear about?

- Brett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org