Hello Mark,

thanks a lot - where do you get such information from?
From my point of view maven is not well documentated, isn't it?

can i get your shared component somewhere before it's submitted and
is there already a jira entry to vote for it?

greetings
Martin

Mark Hobson schrieb:
On 03/05/07, Martin Bengl <[EMAIL PROTECTED]> wrote:
hello folks,

I use following solution (with maven 2.0.4) to create a MavenProject at
runtime to extract informations like artifactId and groupid - this could
be also done by manually parsing the xml file - but i think its a better
way to use the maven classes.

File pomFile = new File("pom.xml");
MavenProjectBuilder projectBuilder;
ArtifactRepository localRepository;

MavenProject pom = projectBuilder.build(pomFile, localRepository,
(ProfileManager)null );

My Question is: From which object can I receive a profileManager
instance? (the projectBuilder and localRepository are defined as plexus
components, the profileManager isn't!)

To simply parse the pom into a MavenProject, use something like:

MavenXpp3Reader reader = new MavenXpp3Reader();
Model model = reader.read(myreader);
MavenProject project = new MavenProject(model);

I've got a shared component to help with introspecting the Maven
environment, as you describe, which I'm hoping to submit when I get a
chance.

Cheers,

Mark

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