Hi

I actually don't have a pom.xml yet, cause I'm running archetype:create for
creating the new project and  the pom.xml

Embedder doesn't care about user.dir or basedir parameters.

You guys think that is a bug?

Regards,

João Kreuzberg

On 8/9/07, Brett Porter <[EMAIL PROTECTED]> wrote:
>
> I think that the embedder might re-set user.dir to the location of the
> POM (though you seem to be setting that yourself to the same location,
> so I'm not sure why that would be a problem...)
>
> Not sure that helps, just a thought.
>
> - Brett
>
> On 09/08/07, Maria Odea Ching <[EMAIL PROTECTED]> wrote:
> > Hi Joao,
> >
> > I'm not sure what the problem is.. the configuration below seems to be
> > correct.
> >
> > -Deng
> >
> > João Kreuzberg wrote:
> > > Maria,
> > >
> > > I tried the user.dir within the command line and it works just fine.
> > >
> > > When I try to execute it using maven-embedder
> > >
> > > it just ignores the base directory.
> > >
> > > Here is how I'm using it:
> > >
> > >         MavenExecutionRequest executionRequest = new
> > > DefaultMavenExecutionRequest();
> > >
> > >         executionRequest.setGoals(Arrays
> > >                 .asList(new String[] { "archetype:create" }));
> > >
> > >         Properties params = new Properties();
> > >
> > >         params.put("groupId", groupId);
> > >         params.put("artifactId", artifactId);
> > >         params.put("version", version == null ? "1.0" : version);
> > >         params.put("archetypeGroupId", archetypeGroupId);
> > >         params.put("archetypeArtifactId", archetypeArtifactId);
> > >         params.put("archetypeVersion", archetypeVersion);
> > >         params.put("remoteRepositories", remoteRepo);
> > >         params.put("user.dir", validProjectLocation);
> > >
> > >         executionRequest.setProperties(params);
> > >
> > >         executionRequest.setBaseDirectory(new
> File(validProjectLocation));
> > >
> > >         MavenExecutionResult result = this.getEmbedder
> > > ().execute(executionRequest);
> > >
> > >
> > > in this case, validProjectLocation  is E:\myproject
> > >
> > > but this is what I get on the console
> > >
> > > [INFO] Parameter: groupId, Value: com.myproject
> > > [INFO] Parameter: packageName, Value: com.myproject
> > > [INFO] Parameter: basedir, Value: C:\dev\eclipse
> > > [INFO] Parameter: package, Value: com.myproject
> > > [INFO] Parameter: version, Value: 1.0
> > > [INFO] Parameter: artifactId, Value: myproject
> > > [INFO] ********************* End of debug info from resources from
> generated
> > > POM ***********************
> > >
> > > It's ignoring the user.dir parameter
> > >
> > > I also tried basedir instead, but does not work
> > >
> > > Am I missing something?
> > >
> > > Best Regards,
> > >
> > > João Kreuzberg
> > >
> > > On 8/7/07, João Kreuzberg <[EMAIL PROTECTED]> wrote:
> > >
> > >> YES,
> > >>
> > >> that works :)
> > >>
> > >> Thanks so much,
> > >>
> > >> Best regards,
> > >>
> > >> João Kreuzberg
> > >>
> > >> On 8/7/07, Maria Odea Ching < [EMAIL PROTECTED]> wrote:
> > >>
> > >>> Hi,
> > >>>
> > >>> You've got the wrong parameter name.. it should be user.dir instead
> of
> > >>> basedir.
> > >>>
> > >>> HTH,
> > >>> Deng
> > >>>
> > >>> João Kreuzberg wrote:
> > >>>
> > >>>> Hello guys,
> > >>>>
> > >>>> I'm having a problem with create:archetype
> > >>>>
> > >>>> on the site is says it has a -Dbasedir parameter
> > >>>> but it doesn't seems to work
> > >>>> I tried mvn archetype:create -DgroupId=joao -DartifactId=joao
> > >>>>
> > >>> -Dbasedir=C:\
> > >>>
> > >>>> but it does not create the project on the specified dir
> > >>>> it creates on the current dir
> > >>>> any thoughts?
> > >>>>
> > >>>> Best regards,
> > >>>>
> > >>>>
> > >>>>
> > >>>
> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >>> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>>
> > >>>
> > >>>
> > >> --
> > >> João Kreuzberg
> > >>
> > >
> > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Brett Porter
> Blog: http://www.devzuz.org/blogs/bporter/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
João Kreuzberg

Reply via email to