On 9/7/05, Trygve Laugstøl <[EMAIL PROTECTED]> wrote: <snip> > > > > > > ok. in my current understanding, the m1 plugins do actually use much > more > > properties than they declare. they use the pom, the common properties, > then > > their own props, even some undocumented one or other plugin's > properties. > > the m2's mojos make a better job at defining what they actually use. > > you mentioned that reusing single mojo is ok without plexus. So chaining > > multiple mojos is better done with plexus? > > It depends on your use case, I'm imagining two major use cases: > > 1) Reusing a single Mojo as it has a smaller/easier/better/whatever API to > some other tool or functionality. Then you would instanciate the plugin > yourself, call the required setters and call execute(). > > 2) You'd like to execute a whole build and then you should just embed > Maven as you're basically doing the same as we are in MavenCli. > > I'm not entirely sure of what you are referring to when you'd like to > chain Mojos, but I suspect that it would fall under variant 2. > > well, as I noticed in other thread about plexus classloading, it isn't (will it?) possible to refer to outside of the mojo when running within plexus. That's however important for IDE integration. that thread was about eclipse but my usecase is netbeans. What netbeans does with ant based projects is to have ant targets that when run within IDE do stuff like initiate debugging, profiling, deployment etc. My idea was to wrap the IDE's own ant tasks into a mojo somehow and reuse it. (haven't really tried, it's just a wild idea) However plexus' classloading will stop me do it (?). So the idea was to run at least part of the build outside of the plexus container. The IDE integration will have all the populated Mavenproject and other instances, so that's not a problem.
but then again I would be better off just ignoring maven/mojo completely and just call the ant tasks directly. Sorry for thinking out loud. It's probably a wrong way to approach the problem. Milos
