Hi,

The best example of using the embedder is now actually the front-end command line harness which starts up maven in the way you are most accustomed:

http://svn.apache.org/viewcvs.cgi/maven/components/trunk/maven-cli/ src/main/java/org/apache/maven/cli/MavenCli.java?rev=392327&view=markup

Every option that is processed from the command line is dealt with in that class and that class uses the embedder. The setup is still a tad convoluted but the CLI and embedded use are now identical provided you setup the execution request properly. It's not well documented but MavenCli.java is the authoritative usage pattern right now.

You'll have to go digging but that's all you get for now.

jason.


On 27 Apr 06, at 5:20 PM 27 Apr 06, Kristian Nordal wrote:

Hi,

Sorry for cross-posting. Guess the dev list is more suitable than the users.

When I'm executing a MavenEmbedder (trunk version), I have a problem with it
trying to update the plugins defined in my POM. These plugins are not
available when I run the embedder, so I would like to either remove them from the MavenProject, or define in some way that I don't want maven to
check for updates.

I've tried removing the plugin from the MavenProject's "pluginArtifacts",
removing it with MavenProject's PluginManager, and from the
pluginArtifactMap (all of these before I run .execute(..)). This doesn't
seem to help. So I'm lost in trying to do this via the MavenProject. I
couldn't find a property for this in the MavenExecutionRequest either. Is this possible to do in some way? Either manually through MavenProject, or some other way. Is a property for that missing from MavenExecutionRequest?

I used to create MavenExecutionRequest's Settings instance from
MavenSettingsBuilder, but saw that MavenEmbedder had a buildSettings (...) method that enables me to set "pluginUpdateOverride" to false. But even if I
set this property, maven tries to update the plugin when I execute the
embedder.

Sorry if I'm clueless here, but I can't figure out how this works.

--
Cheers,
Kristian

Jason van Zyl
[EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to