Hi, 
  I need to invoke the goal archetype:create from a java program using the 
Maven API. 
Actually I've a class that uses a ProcessBuilder, but this is somewhat 
problematic since 
it rely on an external maven installation. This is the "ugly" code:

        String command[] = {
            "mvn",
            "archetype:create",
            "-DarchetypeGroupId=" + 
getArchetypeConfiguration().getArchetypeGroupId(),
            "-DarchetypeArtifactId=" + 
getArchetypeConfiguration().getArchetypeArtifactId(),
            "-DarchetypeVersion=" + 
getArchetypeConfiguration().getArchetypeVersion(),
            "-DgroupId=" + groupId,
            "-DartifactId=" + artifactId,
            "-Dversion=" + version
        };

        ProcessBuilder processBuilder = createProcessBuilder(command, 
groupIdDirectory);
        ... 

How I can invoke a goal using the Maven API? I've found few documentation on 
this topic.

Thanks in advance.

-- 
Best Regards,
Davide Angelocola

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

Reply via email to