aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark ""mvn archetype:generate" via a pom instead of command line." Watch ""mvn archetype:generate" via a pom instead of command line." New topic
Author

"mvn archetype:generate" via a pom instead of command line.

Gaurav Upadhyay
Greenhorn

Joined: Oct 11, 2012
Posts: 10
Greetings,

i wrote a custom Maven archetype. The archetype works just fine when i try to invoke it through the command line. I even have some custom properties that i pass ad -D parameters when i use it from the command line.

Is there a way to invoke a custom maven archetype from another pom. Just like another plugin within a pom? I tried using the maven-archetype-plugin's generate goal. The place where i get stuck is on how to pass my custom properties in the plugin <configuration>. Via the command line, this is as easy as passing a -D. If i mention the property directly under configuration, the plugin ignores it.

Please advice on how to invoke the maven archetype plugin's generate goal with custom properties. For example,



the first property is defined in the plugin's configuration, so its taken well. However, the custom property is ignored. How do i get the plugin to take custom properties, like it does when we invoke it from the command line and pass the property as -D.?

thanks
gary.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "mvn archetype:generate" via a pom instead of command line.
 
Similar Threads
Strange problem - works on maven glassfish but not on Tomcat
Richfaces + Spring + Maven Setup help
how do i send a email test report from maven
maven-dependency-plugin stops when a dependency is an open project
Build problem with maven and eclipse web project