Hi

I'll give it a try. If it does not work, I'll look into what goes on in 
DefaultMavenExecutionRequest.


Hermod

-----Original Message-----
From: Trygve Laugstøl [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 30, 2006 1:55 PM
To: Maven Developers List
Subject: Re: creating a new project with the MavenEmbedder


[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]


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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

Reply via email to