I'm trying to create a maven project programmatically by running a java application. In the application, I have set the pom file as:
request.setPomFile(new File(thePomFile));
request.setGoals( Collections.singletonList( "archetype:generate" ) );
This is a pom file with archetype info that I want to use since I have my own project structure.
Two questions:
- I get an error saying "No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)"; why is this even though I provided the archetype pom file?
- I also get "[WARNING] Property groupId is missing. Add -DgroupId=someValue [WARNING] Property artifactId is missing. Add -DartifactId=someValue [WARNING] Property package is missing. Add -Dpackage=someValue"; how to I supply these information to the request. The api doesn't seem to have it.
I tried looking up the api docs, and other stackoverflow questions but couldn't find anything close to this. Thank you!