Hi,

indeed, there seems to be something wrong at some other place. I'm also looking
a bit at the code, but I still have a question about the purpose of using a
basedir: for plugins which do not operate on an existing maven project (e.g. the
archetype), having such a basedir is fine and intuitive, but what about plugins
which work on a given POM file? E.g. let's again consider the eclipse:eclipse
goal: what is it supposed to do if on the MavenExecutionRequest for the goal
you set the basedir "/basedir" and the POM file "/pomdir/pom.xml"? For me, the
basedir is completely ignored and the directory where the POM file resides
is taken to be the basedir, i.e. the ".classpath" and ".project" files are
output to the directory where the POM file is. I personally think that this
behavior is actually OK, since I doubt that the eclipse plugin (and similarly
other project-attached plugins) support outputting their files to some place
which is not the project root. Or does the basedir play some other role?

Strangely enough, you nevertheless must set a basedir e.g. for the
eclipse:eclipse goal since otherwise you get a NullPointerException at some
point. I would rather expect that plugins working on a POM file do not require
it to be set as it seems to be ignored anyway.

Any comments/clarifications?

Best regards,
  Ovidio

[EMAIL PROTECTED] wrote:
Hi

Yes, I actually had that line in, and it did printed the current directory, not 
the one given by the .setBaseDir call. That was why I wrote that something must 
be wrong in another bean, and queried about which bean is responsible for 
setting the parameters. The odd thing is as I wrote that the eclipse:eclipse 
archetype does it right.

Hermod

-----Original Message-----
From: Trygve Laugstøl [mailto:[EMAIL PROTECTED]
Sent: Friday, June 02, 2006 12:10 PM
To: Maven Developers List
Subject: Re: creating a new project with the MavenEmbedder


[EMAIL PROTECTED] wrote:

Hi

Something must be wrong in another place. The eclipse:eclipse goal excutes ok 
with the supplied (i.e correct) basedir, but the MavenArchetypeMojo for some 
reason is supplied the working directory, which is not what is supplied in the 
call.


You mean if you add this:

   System.out.println("basedir: " + basedir.getAbsolutePath() );

it will give you the current directory instead of the one you give the embedder? If it do give the correct value it got to be an issue with something inside the Archetype core itself.


Here is the patch :


The patch looks correct.

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



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

Reply via email to