[EMAIL PROTECTED] wrote:
Hi

Now that I got it running, I have discovered something that may be an error in 
the DefaultExecutionRequest:

This is how I run it:

                MavenExecutionRequest request = new 
DefaultMavenExecutionRequest()
                                .setBasedir(new File("E:/Test")).setGoals(goals)
                                .setLocalRepositoryPath(
                                                
embedder.getLocalRepositoryPath(settings)).setSettings(
                                                
settings).setProperties(properties).addEventMonitor(
                                                new DefaultEventMonitor(new 
ConsoleLogger(
                                                                
ConsoleLogger.LEVEL_DISABLED, "logger")));


The problem is that is is ignoring the ".setBasedir(new File("E:/Test"))" and creating 
the project in the current directory ( I am running the "archetype:create" goal). Is this a known 
error or am I presuming wrong here.

This might be a issue with the archetype mojo.

Try this:

* Create a pom.xml under foo/
* mvn -f foo/pom.xml archetype:create ..

If the files are created in the current directory that's an issue with the Mojo. I've used the embedder successfully myself so I'm pretty sure that it works as expected, though I haven't used it without a pom.xml under the basedir.

--
Trygve

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

Reply via email to