Generate Maven archetype from Java code
问题 I want to know if it's possible to run the maven command: archetype:generate in Java code. I've tried this with the maven embedder, but this library is deprecated. I want to do an archetype:generate from a remote catalog, and capture the required properties of the archetype. The maven command I want to run is for example: mvn archetype:generate \ -DgroupId=com.maven \ -DartifactId=test \ -DarchetypeVersion=1.0-alpha-4 \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DarchetypeArtifactId