On Wed, Sep 07, 2005 at 05:45:38PM +0200, Milos Kleint wrote: > 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.
I don't understand what you're trying to do here? Are you trying to run Mojos in NetBeans or are you trying to run the NetBeans Ant tasks as Mojos in Maven? The reason for putting the Mojos in separate class loaders are simply because they have their own versions of the dependencies and thus needs to be separated. This also results in Mojos not been able to communicate directly but rather have to go through the (currently rather non-existing) Mojo API. Please try to explain to me a bit more what you are trying to do and I'm sure that we can figure something out. > > 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. -- Trygve
signature.asc
Description: Digital signature
